poisondeathray
19th January 2018, 04:48
Converting RGB to YUV and downscaling produces artifacts with some resizers under certain conditions
Vapoursynth R42.1
Test source 10bit RGB 2048x960 dpx patttern 0-1023 gradients for R,G,B,greyscale
http://www.mediafire.com/file/71x5rz8feku2bku/RGB_10bit_grad.7z
Lossy preview just to get point across
https://s9.postimg.org/5x35vk6lb/artifact_preview.jpg (https://postimages.org/)
import vapoursynth as vs
core = vs.get_core()
v = core.imwri.Read(r'F:\_Video Tests\10bit Pattern Tests\RGB_10bit_grad.dpx')
v = core.resize.Bicubic(v, width=1024 , height=480, format=vs.YUV420P10, matrix_s="709", range_s="full")
v.set_output()
Observations:
-Bicubic and Spline16 for YUV420P10 affected . Not for other formats like YUV422P10, YUV444P10, P8's not affected
-Super secret "slow" mode switch , cpu_type="none", fixes it
-Other resizers Spline36, Lanczos, Point not affected on this test
-Full vs. limited range YUV does not affect (but "full" was used in this example)
Vapoursynth R42.1
Test source 10bit RGB 2048x960 dpx patttern 0-1023 gradients for R,G,B,greyscale
http://www.mediafire.com/file/71x5rz8feku2bku/RGB_10bit_grad.7z
Lossy preview just to get point across
https://s9.postimg.org/5x35vk6lb/artifact_preview.jpg (https://postimages.org/)
import vapoursynth as vs
core = vs.get_core()
v = core.imwri.Read(r'F:\_Video Tests\10bit Pattern Tests\RGB_10bit_grad.dpx')
v = core.resize.Bicubic(v, width=1024 , height=480, format=vs.YUV420P10, matrix_s="709", range_s="full")
v.set_output()
Observations:
-Bicubic and Spline16 for YUV420P10 affected . Not for other formats like YUV422P10, YUV444P10, P8's not affected
-Super secret "slow" mode switch , cpu_type="none", fixes it
-Other resizers Spline36, Lanczos, Point not affected on this test
-Full vs. limited range YUV does not affect (but "full" was used in this example)