Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vapoursynth as vs
- import nnedi3_resample as edi
- core = vs.get_core()
- src = core.ffms2.Source("C:/U.S. Theatrical Trailer (Red Band).m2ts23.mkv")
- blksize=16
- overlap=8
- pad = blksize + overlap
- deint = core.fmtc.bitdepth(src, bits=16).std.CropRel(left=250, right=250)
- deint = core.fmtc.resample(deint, deint.width+pad, deint.height+pad, sw=deint.width+pad, sh=deint.height+pad, kernel="point")
- RGB = edi.nnedi3_resample(deint, deint.width, deint.height,csp=vs.RGB48, fast=False)
- OPPF = core.bm3d.RGB2OPP(RGB, 1)
- OPP = core.fmtc.bitdepth(OPPF, bits=16, flt=False, dmode=1, fulls=True, fulld=True)
- super = core.mv.Super(OPP)
- bvec2 = core.mv.Analyse(super, isb = True, delta = 2, blksize=blksize, overlap=overlap, truemotion=False)
- bvec1 = core.mv.Analyse(super, isb = True, delta = 1, blksize=blksize, overlap=overlap, truemotion=False)
- fvec1 = core.mv.Analyse(super, isb = False, delta = 1, blksize=blksize, overlap=overlap, truemotion=False)
- fvec2 = core.mv.Analyse(super, isb = False, delta = 2, blksize=blksize, overlap=overlap, truemotion=False)
- ref = core.mv.Degrain2(OPP, super, bvec1,fvec1,bvec2,fvec2, 425)
- ref = core.fmtc.bitdepth(ref, flt=True)
- flt = core.bm3d.VFinal(OPPF, ref, radius=1, matrix=100, sigma=[11,7,7]).bm3d.VAggregate(radius=1, sample=1)
- """
- denf = core.bm3d.OPP2RGB(flt, sample=1)
- den = core.fmtc.bitdepth(denf, bits=16, flt=False, dmode=0)
- den = edi.nnedi3_resample(den[0:55], 946, 720, matd="709", fulld=False, csp=vs.YUV444P16, fulls=True, src_width=1420, src_height=1080, curves="709", curved="709", mats="RGB", sigmoid=True, kernel="spline64") + edi.nnedi3_resample(den[55::], 946, 720, matd="709", fulld=False, csp=vs.YUV444P16, fulls=True, src_width=1420, src_height=1080, curves="709", curved="709", mats="RGB", sigmoid=True, invks=True)
- """
- flt.set_output()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement