You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only time nnedi3 is used inside GradFun3 is with resizer="lineart_rpow2" or resizer="lineart_rpow2_bicubic". Also, it is not called directly but within 4re's nnedi3_rpow2.py, so it would have to be changed in his script.
A quick and dirty way for you would be to add core.nnedi3.nnedi3 = core.nnedi3cl.NNEDI3CL right below of core = vs.get_core() inside nnedi3_rpow2.py.
NNEDI3 is used directly in JIVTC, though. There I might add automatic detection of znedi in the future.
Since DescaleAA is hardcoded to use rpow=2 anyway, you could drop this thing in and lose the nnedi3_rpow2 dependency altogether
deflumadouble(clip, w, h, nsize=0, nns=3, qual=2, opencl=False):
core=vs.core# Resizing between nnedi3 calls can either be faster or slower# When doubling from 720p to 1080p, the 2nd nnedi3 call will be interpolating a 2560x720 clip# It's faster to downscale to 720x1920, transpose, then interpolate the 1920x720 clip# However, it is counter-intuitive to do this with i.e. 720x480 to 1920x1080# So it needs to be decided on a case-by-case basisresize_last=clip.width*2<=wifopenclandhasattr(core, 'nnedi3cl'):
# only nnedi3cl has a dw parameter anyway so it's easier to just stick it hereifresize_last:
nnclip=core.nnedi3cl.NNEDI3CL(clip, field=0, dh=True, dw=True, nsize=nsize, nns=nns, qual=qual)
returncore.resize.Spline36(nnclip, w, h, src_left=0.5, src_top=0.5)
nnedi3=core.nnedi3cl.NNEDI3CLelifhasattr(core, 'znedi3'):
nnedi3=core.znedi3.nnedi3else:
nnedi3=core.nnedi3.nnedi3nnclip=core.std.Transpose(clip)
nnclip=nnedi3(nnclip, field=0, dh=True, nsize=nsize, nns=nns, qual=qual)
ifresize_last:
src_left=0.5else:
src_left=0nnclip=core.resize.Spline36(nnclip, height=w, src_top=0.5)
nnclip=core.std.Transpose(nnclip)
nnclip=nnedi3(nnclip, field=0, dh=True, nsize=nsize, nns=nns, qual=qual)
returncore.resize.Spline36(nnclip, w, h, src_left=src_left, src_top=0.5)
Activity
Frechdachs commentedon Feb 24, 2018
The only time nnedi3 is used inside GradFun3 is with
resizer="lineart_rpow2"orresizer="lineart_rpow2_bicubic". Also, it is not called directly but within 4re'snnedi3_rpow2.py, so it would have to be changed in his script.A quick and dirty way for you would be to add
core.nnedi3.nnedi3 = core.nnedi3cl.NNEDI3CLright below ofcore = vs.get_core()insidennedi3_rpow2.py.NNEDI3 is used directly in JIVTC, though. There I might add automatic detection of znedi in the future.
Frechdachs commentedon Feb 24, 2018
Or rather just change every occurrence of
core.nnedi3.nnedi3. It's only two times in the script.kgrabs commentedon Jun 13, 2020
Since DescaleAA is hardcoded to use
rpow=2anyway, you could drop this thing in and lose the nnedi3_rpow2 dependency altogether