Log in

View Full Version : Feeding x264cli RGB10bit per channel tifs and swscale planar YUV conversion matrix


sub24ox7
1st September 2011, 19:39
I have some 10bit source tifs I would feed to x264 cli build with lavf support like so just for an example (x264 --seek 1 --frames 21312 --fps 24 -o output.mkv "2Kimages-tif\%08d.tif") They are
full RGB (0 - 1023) per channel so when converting is there anyway to know what colorimetry is used when converting to planar yuv 10bit? As for output when decoded and going from 10bit to 8 bit It would obey (--colorprim bt709 or --colormatrix bt709) or rec709. I need to learn what planar YUV 10 bit format you are using and and the color matrix would depend entirely upon the matrix math used and what floating point values are given as this is the difference between SD 601 and HD 709 of course the bt and rec are whether full range levels are use [0 - 255] or [16 - 235] which is really only applicable to 8bit per channel color. So whatever matrix math you use with swscale for the input RGB to planar YUV will effect the matrix used of course upon decoding and they both need to be the same. So I figure you are using either the SD 601 or HD 709 matrix math and I need to know which is used and whether it would be possible to implement the parameter to select which is used.

sub24ox7
1st September 2011, 21:20
It would be some much easier to be able to select the matrix through a parameter in x264 cli and as more 10bit sources become available this will be handy.
I am ready for native 10bit support in avisynth that would be so helpful and I could add it for mxfsource. So unless there is an option to select the matrix with x264 cli what would you recommend
to use for batch conversion of 10bit tif images to planar YUV with REC709

sub24ox7
2nd September 2011, 07:44
Well most of the files I have are actually 12bit per channel native but I can produce 16 bit images from them. Anyway I guess I can load 16 bit tiffs and manipulate them with dithertools so I can get the correct matrix and yuv.
Truly is sad that higher bitdepth support won't be implemented in avisynth.