Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vapoursynth as vs
- from vapoursynth import core
- import atomchtools as at
- import cooldegrain as cd
- import psutil
- p_handle = psutil.Process()
- p_handle.cpu_affinity([0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22])
- core.max_cache_size = 12000
- def denoise_deband(clip):
- clip16 = clip.fmtc.bitdepth(bits=16)
- mask16 = at.retinex_edgemask(clip16, sigma=1.5).std.Expr('x 2.7 *')
- pfclip = core.dfttest.DFTTest(clip16, tbsize=1, slocation=[0.0,0.4, 0.1,0.86, 0.3,2.4, 0.5,4.2, 0.7,6.5, 1.0,10.0], planes=0)
- denc16 = cd.CoolDegrain(clip16, bits=16, tr=1, thsad=80, thsadc=80, blksize=8, pf=pfclip)
- debc16 = core.f3kdb.Deband(denc16, range=7, y=44, cb=36, cr=36, grainy=64, grainc=42, output_depth=16)
- return core.std.MaskedMerge(debc16, clip16, mask16, first_plane=True)
- source = core.dgdecodenv.DGSource(r'N:\Encoding\World_Trigger\index\VOL17_01.dgi')
- source = core.std.Trim(source, 0, 32708)
- source.set_output(1)
- denoise_deband(source).set_output(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement