Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vapoursynth as vs
- import mvsfunc as mvf
- import awsmfunc as awf
- import vsutil
- import fvsfunc as fvf
- import vsTAAmbk as taa
- import hysteria as hys
- from lvsfunc import*
- from nnedi3_rpow2 import *
- core = vs.get_core()
- path=r'D:\Sync\Demon Slayer -Kimetsu no Yaiba- Mugen Train Movie v3 2020 1080p BluRay REMUX AVC AC3 5.1 Dual Audio -ZR-.mkv'
- src=core.ffms2.Source(path)
- credits=src[161091:168024]
- src=src[0:161091]
- #src=core.resize.Bicubic(clip=src, width=1920, height=1080, format=vs.RGB24, matrix_in_s="709")
- #basic=core.bm3d.Basic(input=src,profile="fast")
- #src=mvf.BM3D(src, sigma=1, radius1=1)
- #src=core.bm3d.Final(input=src,ref=basic)
- #src=fvf.Depth(src, 32)
- #planes=vsutil.split(src)
- #src=core.std.ShufflePlanes(clips=src, planes=0, colorfamily=vs.GRAY)
- #h = 855
- #w=vsutil.get_w(h)
- #b, c = 1/5, 2/5
- #descaled=core.descale.Debicubic(planes[0],w,h,b,c)
- #upscaled = nnedi3_rpow2(descaled, 2).resize.Spline36(1920, 1080)
- #planes=[upscaled,planes[1],planes[2]]
- #src=vsutil.join(planes)
- #src=vsutil.depth(src,16)
- #y=vsutil.get_y(src)
- #t=core.tcanny.TCanny(y,planes=0).std.Maximum()
- #smooth = core.bilateral.Bilateral(t, sigmaS=6.4, sigmaR=0.009)
- #noise = core.std.MakeDiff(t, smooth) # subtract filtered clip from source leaving the filtered difference
- #t=core.std.MakeDiff(t, noise) # subtract diff clip to prevent clipping (doesn't apply to 32 bit)
- #aa=taa.TAAmbk(src, aatype=-3, preaa=-1, strength=0, mtype=2, opencl=True)
- #src=core.std.MaskedMerge(src,aa,y)
- #src=hys.Hysteria(src)
- #maxvalue=(1 << vsutil.get_depth(y)) - 1
- #w = [5]*3 + [-3]*5
- #weights = [w[-i:] + w[:-i] for i in range(4)]
- #c = [core.std.Convolution(y, (w[:4]+[0]+w[4:]), saturate=False) for w in weights]
- #c=core.std.Expr(c, 'x y max z max a max')
- #t=core.std.Minimum(t,coordinates=[1, 0, 1, 0, 0, 1, 0, 1])
- #ret=core.retinex.MSRCP(y, sigma=[50, 200, 350], upper_thr=0.005)
- #sobelx=core.std.Convolution(y,[-5,-4,0,4,5,-8,-10,0,10,8,-10,-20,0,20,10,-8,-10,0,10,8,-5,-4,0,4,5])
- #sobely=core.std.Convolution(y,[-5,-8,-10,-8,-5,-4,-10,-20,-10,-4,0,0,0,0,0,4,10,20,10,4,5,8,10,8,5])
- #smask=core.std.Expr([sobelx,sobely],'x dup * y dup * + sqrt').std.Maximum().std.Maximum().std.Maximum().std.Inflate()
- #mask=core.std.Expr([c,t],f'x y + {maxvalue} min')
- #deband1=core.neo_f3kdb.Deband(src,range=20,y=64,cb=48,cr=48)
- #deband2=core.neo_f3kdb.Deband(src,range=18,y=48,cb=32,cr=32)
- #deband1=core.std.MaskedMerge(deband1,src,mask)
- #deband2=core.std.MaskedMerge(deband2,src,smask)
- src=awf.FrameInfo(src,"Source").set_output()
Advertisement
Add Comment
Please, Sign In to add comment