YUV / YCbCr to RGB Histogram Gaps?
Posted: 2010-11-28T02:40:54-07:00
When attempting to create an RGB conversion from YUV / YCbCr AVI file, the resultant image appears to exhibit gaps in the histogram values.
The most rudimentary attempt from a YUV encoded H264 series fails to provide a smooth histogram and results in approximately 35 notable gaps in the channels:
More complicated attempts including use of a colorspace component also deliver gap filled histograms. It seems no amount of sampling or depth can provide smoothed histograms:
Even raw decomposing and recomposing in compositing software exhibits these gaps:
Resultant images appear to exhibit this behavior in all situations, despite more accurate representations achieved via other tools.
Is it possible that all of the YUV / YCbCr transforms make the (erroneous) assumption that the data is pre-clamped to analog 16-235 values and stretching the 16-235 values to 0-255?
If this is the case, is there a flag to assert that unclamped maximum / full range is extracted? In theory, there should be 10 effective bits of data available in 4:2:2 data, and as such, it would seem logical to be able to extract all of the available data, perhaps more so considering the extremely deep bit depths that Imagemagick can account for? What about deeper YCbCr bit depths such as 4:4:4?
Apologies in advance if I have made a gross mistake.
The most rudimentary attempt from a YUV encoded H264 series fails to provide a smooth histogram and results in approximately 35 notable gaps in the channels:
Code: Select all
convert MVI_0000.AVI[0] out.tiff
Code: Select all
convert MVI_0000.AVI[0] -colorspace ycbcr -sampling-factor 4:4:4 -depth 16 -size 1920x1088 -interlace plane out.ycbcr
Code: Select all
convert MVI_0000.AVI -colorspace ycbcr
Is it possible that all of the YUV / YCbCr transforms make the (erroneous) assumption that the data is pre-clamped to analog 16-235 values and stretching the 16-235 values to 0-255?
If this is the case, is there a flag to assert that unclamped maximum / full range is extracted? In theory, there should be 10 effective bits of data available in 4:2:2 data, and as such, it would seem logical to be able to extract all of the available data, perhaps more so considering the extremely deep bit depths that Imagemagick can account for? What about deeper YCbCr bit depths such as 4:4:4?
Apologies in advance if I have made a gross mistake.