Skip to content

Commit

Permalink
Mise à jour du script
Browse files Browse the repository at this point in the history
Ça devrait être plus rapide.
  • Loading branch information
Ichunjo committed Sep 15, 2020
1 parent 3f1b857 commit 6bbaae9
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions vpy/debandgrain.vpy
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
from lvsfunc.denoise import detail_mask
import vapoursynth as vs
import placebo # https://github.com/Ichunjo/vardefunc/blob/master/placebo.py

from vsutil import depth

import lvsfunc as lvf # https://github.com/Irrational-Encoding-Wizardry/lvsfunc
import vapoursynth as vs # https://github.com/vapoursynth/vapoursynth/releases
core = vs.core

clip = video_in

dither = core.resize.Bicubic(clip, format=vs.YUV420P16)
dither = depth(clip, 16)

lineart_mask = lvf.denoise.detail_mask(dither, brz_a=3000, brz_b=1500)

#deband = core.neo_f3kdb.Deband(dither, 17, 56, 48, 48, 24, 0, 2, keep_tv_range=True) # https://github.com/HomeOfAviSynthPlusEvolution/neo_f3kdb/releases
deband = placebo.deband(dither, 17, 5, 1, 0)
deband = core.std.MaskedMerge(deband, dither, lineart_mask)


grain = core.grain.Add(deband, 1, constant=False) # https://github.com/HomeOfVapourSynthEvolution/VapourSynth-AddGrain


line_m = detail_mask(dither, brz_a=3000, brz_b=1500)
db = core.neo_f3kdb.Deband(dither, 17, 56, 48, 48, 24, 0, 2, keep_tv_range=True)
db = core.std.MaskedMerge(db, dither, line_m)
grain = core.grain.Add(db, 1, constant=False)
out = core.resize.Bicubic(grain, format=vs.YUV420P8, dither_type='error_diffusion')
out = depth(grain, 8)
# out = depth(grain, 10)

out.set_output()

0 comments on commit 6bbaae9

Please sign in to comment.