这是一个非常古老的问题,但之前接受的答案是不正确的,所以发布一个正确的答案。
视频范围与全范围是指亮度和色度分量占据的范围。视频范围定义了“动态余量”、亮度和色度值,这些值通常不会被占用,但会在信号通过各种可能引入信号增益或衰减的模拟过程转换时保留信号。
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'.
如果您可以选择格式,则最好使用全范围变体,因为它可以更准确地量化信号值。