View Full Version : 16-bit Convert YV12 to YV24
MysteryX
3rd June 2016, 04:55
What's the right way to convert YV12 clip to YV24 using 16-bit-depth?
I'm thinking of this, but is it the right way or will it add distortion?
Dither_convert_8_to_16()
Dither_resize16(Width, Height, csp="YV24")
MysteryX
3rd June 2016, 07:18
I read that ConvertToYV24 uses Bicubic by default. I just tried this but the output is considerably different than with ConvertToYV24.
Dither_resize16(Width, Height, kernel="Bicubic", csp="YV24")
MysteryX
3rd June 2016, 07:31
Ah! Got it. This works :)
Dither_resize16(Width, Height/2, kernel="Bicubic", csp="YV24")
Motenai Yoda
3rd June 2016, 13:15
you can either use spline36/blackman(minlobe) to reduce chroma blurring, and dither_resize16nr to avoid halo and ringing caused by sharper resize.
or
Dither_resize16nr(Width(),Height()/2,csp="YV24", kernel="bicubic",invks=true)
http://i.imgur.com/nprHbl6.png
MysteryX
3rd June 2016, 15:42
I wasn't totally satisfied with the results I was getting.
invks allows reversing the kernel to get back the original picture? Great!
I might have to experiment with the various kernels and compare the image quality after converting back and forth.
Dither_resize16nr(Width(),Height()/2,csp="YV24", kernel="spline36")
[process in YV24]
Dither_resize16nr(Width(),Height()/2,csp="YV12", kernel="spline36", invks=true)
Motenai Yoda
4th June 2016, 16:30
Dither_resize16nr(Width(),Height()/2,csp="YV24", kernel="spline36")
[process in YV24]
Dither_resize16nr(Width(),Height()/2,csp="YV12", kernel="spline36", invks=true)
inversing kernel don't works well other than with bilinear or bicubic
also it can't reconstruct the exact image, but something lookalike
(debilinear/debicubic do a better job but are for downscaling and rgb/yv12 only)
MysteryX
5th June 2016, 07:19
You are right, it looks better without invks. Bicubic appears too soft to me. Spline36 appears closer to what ConvertToYV24/ConvertToYV12 produces, although they say they use Bicubic.
For this script, this is what's giving the best results so far
Dither_convert_8_to_16()
Dither_resize16nr(Width, Height/2, kernel="Spline36", csp="YV24")
KNLMeansCL(D=1, A=2, h=2.1, cmode=true, device_type="GPU", device_id=0, lsb_inout=true)
SuperResXBR(5, 1, 0.15, XbrStr=2.7, XbrSharp=1.3, MatrixIn="601", lsb_in=true, lsb_out=true)
Dither_resize16nr(Width, Height/2, kernel="Spline36", csp="YV12")
DitherPost()
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.