Closed ViRb3 closed 1 year ago
Why is this happening though?
Thanks
This may be caused by https://github.com/EleonoreMizo/fmtconv/issues/38. It has been fixed but but a new release has not yet been pushed.
Makes sense, thank you! @WolframRhodium in your fix commit above, can I ask why you are doing:
if rescale > 1:
clip = core.resize.Lanczos(clip, int(clip_org.width * scale), int(clip_org.height * scale), filter_param_a=4)
else:
if clip_org.format.bits_per_sample != 32:
clip = core.resize.Point(clip, format=vs.RGBS)
clip = core.fmtc.resample(clip, scale=rescale, kernel="lanczos", taps=4, fh=1/rescale, fv=1/rescale)
if clip_org.format.bits_per_sample == 16:
clip = core.resize.Point(clip, format=vs.RGBH)
Wouldn't the following single line cover the entire rescale part:
clip = core.resize.Lanczos(clip, int(clip_org.width * scale), int(clip_org.height * scale), filter_param_a=4)
Sub-1 scale would work. All color spaces would work too. Is there any benefit to using fmtconv
instead of the built-in functions?
Because the cv2.resize
used by the author is not an ordinary lanczos-4 resize (downsampling without anti-aliasing) and has to be implemented in fmtc.
I have the following:
I get a crash like:
I can work around by omitting scale and then manually rescaling like:
Why is this happening though?
Thanks