【问题标题】:Difference between full-range (420f) and video range (420v) for YCrCb pixel formats on iOSiOS 上 YCrCb 像素格式的全范围 (420f) 和视频范围 (420v) 之间的差异
【发布时间】:2012-04-24 23:42:45
【问题描述】:

iPhone 4S 上的两种(三种支持的)像素格式是:

kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange

有谁知道其中的区别,使用其中一个有什么后果/优势吗?

来自苹果的描述基本一致:http://developer.apple.com/library/mac/#documentation/QuartzCore/Reference/CVPixelFormatDescriptionRef/Reference/reference.html

【问题讨论】:

  • 除了 Codo 的回答之外,我建议观看 WWDC 2011 视频会话 419“在 iOS 上使用 AVFoundation 从相机捕获”,其中对此进行了详细说明。
  • 420f 420v的视频可以跳到25:30
  • 这是 WWDC 2011 的演讲:developer.apple.com/videos/play/wwdc2011/419/?time=1527(预先搜索到 25:27,他们讨论了这个问题)

标签: ios image colors avfoundation


【解决方案1】:

视频范围意味着 Y 分量仅使用从 16 到 235 的字节值(出于某些历史原因)。全范围使用一个字节的全范围,即 0 到 255。

色度分量(Cb、Cr)始终使用全范围。

【讨论】:

  • 没错,但是,420YpCbCr10BiPlanarVideoRange 怎么样?
【解决方案2】:

这是一个很老的问题,但之前接受的答案不正确,所以发布一个正确答案。

视频范围与全范围是指亮度和色度分量占据的范围。视频范围定义了“动态余量”、亮度和色度值,这些值通常不会被占用,但会在信号通过各种可能引入信号增益或衰减的模拟过程转换时保留信号。

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'.

如果您可以选择格式,则最好使用全频变体,因为它可以更准确地量化信号值。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-12
    • 2014-03-09
    • 2011-11-15
    • 1970-01-01
    • 2015-02-24
    • 1970-01-01
    • 2013-11-01
    • 2011-10-07
    相关资源
    最近更新 更多