-->

`CMPixelFormatType`和`CVPixelFormatType`之间的区别?(Diff

2019-11-05 00:04发布

CMPixelFormatType常数是的一个子集CVPixelFormatType常数 。

此外,在CMPixelFormatType评论,它说:

在一般情况下,corevideo的CVPixelFormatType常数可能太习惯。

什么是这两组常数的区别? 为什么是CMPixelFormatType常量只有一个子集CVPixelFormatType常数? 他们是特殊的?

Answer 1:

Update: Nope, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange (not defined in CMPixelFormatType) is also supported.


My guess is that the subset of pixel formats defined by CMPixelFormatType are the ones that are actually supported in macOS/iOS whereas the pixel formats defined by CVPixelFormatType are all the known pixel formats in the world.

This is hinted in the Pixel Format Identifiers documentation:

Core Video does not provide support for all of these formats; this list defines only their names.



文章来源: Difference between `CMPixelFormatType` and `CVPixelFormatType`?