Two (of the three supported) pixel formats on the iPhone 4S are:
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
Does anyone know the difference, and are there any consequences/advantages of using one over the other?
The descriptions from Apple are basically identical: http://developer.apple.com/library/mac/#documentation/QuartzCore/Reference/CVPixelFormatDescriptionRef/Reference/reference.html
Video range means that the Y component only uses the byte values from 16 to 235 (for some historical reasons). Full range uses the full range of a byte, namely 0 to 255.
The chroma components (Cb, Cr) always use full range.
This is a really old question, but the previously accepted answer is incorrect, so posting a correct answer.
Video-range vs full-range refers to the range occupied by the luma and chroma components. Video range defined "headroom", luma and chroma values that would not normally be occupied, but which would preserve the signal as it transitioned through various analogue processes which might introduce gain or attenuation of the signal.
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
8-bit 4:2:0 Component Y'CbCr format. Each 2x2 pixel block is represented
by 4 unsigned eight bit luminance values and two unsigned eight bit
chroma values. The chroma plane and luma plane are separated in memory. The
luminance components have a range of [16, 235], while the chroma value
has a range of [16, 240]. This is consistent with the CCIR601 spec.
'420v' is the Apple Core Video four-character code for this pixel format.
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
8-bit 4:2:0 Component Y'CbCr format. Each 2x2 pixel block is represented
by 4 unsigned eight bit luminance components and two unsigned eight bit
chroma components. The chroma plane and luma plane are separated in memory. The
luminance components have a range of [0, 255], while the chroma value
has a range of [1, 255].
'420f' is the Apple Core Video four-character code for this pixel format.
The equivalent Microsoft fourCC is 'NV12'.
If you have a choice of format, the full-range variant is preferable, since it will more accurately quantize the signal values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With