Advertisement
Guest User

Untitled

a guest
Mar 13th, 2022
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import vapoursynth as vs
  2. import vsutil
  3. import kagefunc as kgf
  4. import fvsfunc as fvf
  5. import mvsfunc as mvf
  6. import awsmfunc as awf
  7.  
  8. from vapoursynth import core
  9. core.max_cache_size = 16000
  10.  
  11. src = core.lsmas.LWLibavSource(r"D:\Videos\Anime\Paprika\Paprika 2006 1080p GBR Blu-ray AVC DTS-HD MA 5.1-AdBlue\BDMV\STREAM\00000.m2ts")
  12.  
  13. src = fvf.Depth(src, 16)
  14.  
  15. cropped = core.resize.Point(src, src_top=1, resample_filter_uv="bicubic")
  16. cropped = core.std.Crop(cropped, top=20, bottom=22)
  17.  
  18. edged = awf.bbmod(cropped, top=2, bottom=2, left=1, right=1)
  19.  
  20. debandmask = kgf.retinex_edgemask(edged).std.Binarize(20000).std.Maximum().std.Inflate()
  21. debanded = core.neo_f3kdb.Deband(edged, y=50, cr=35, cb=35, grainy=0, grainc=0, range=20, output_depth=16, keep_tv_range=True)
  22. debanded = core.std.MaskedMerge(debanded, edged, debandmask)
  23.  
  24. grained = kgf.adaptive_grain(debanded, strength=0.25, static=False)
  25.  
  26. filtered = mvf.Depth(grained, 10, dither=7)
  27.  
  28. final = filtered
  29.  
  30. final.set_output()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement