04.05.2024, 13:48
Ok, I will also release the new version tomorrow.
Thanks,
Dan
I rewrote the "degrain" function as following
I prefer that in Hybrid the Degrain will display only integer values from 1 to 5.
So that in the future I can decide to implement a different mapping and/or denoise/degrain function, without the need to change the input.
If you prefer you can call this parameter also "DegrainFactor".
Thanks
Thanks,
Dan
(04.05.2024, 12:55)Selur Wrote: Ps.: uploaded a test version which does include KNLMeans, but not havsfunc.
I rewrote the "degrain" function as following
def vs_degrain(clip: vs.VideoNode = None, strength: int = 0, device_id: int = 0) -> vs.VideoNode:
if strength == 0:
return clip
match strength:
case 1:
dstr = 1.5
dtmp = 1
case 2:
dstr = 2.5
dtmp = 1
case 3:
dstr = 3.5
dtmp = 1
case 4:
dstr = 5.5
dtmp = 2
case 5:
dstr = 8.5
dtemp = 2
case _:
raise vs.Error("ddeoldify: not supported strength value: " + strength)
clip = clip.resize.Bicubic(format=vs.YUV444PS, matrix_s="709", range_s="full")
clip = vs.core.knlm.KNLMeansCL(clip=clip, d=dtemp, a=2, s=4, h=dstr, channels='Y', device_type="gpu", device_id=device_id)
clip = clip.resize.Bicubic(format=vs.RGB24, matrix_in_s="709", range_s="full", dither_type="error_diffusion")
return clip
I prefer that in Hybrid the Degrain will display only integer values from 1 to 5.
So that in the future I can decide to implement a different mapping and/or denoise/degrain function, without the need to change the input.
If you prefer you can call this parameter also "DegrainFactor".
Thanks