420YpCbCr8BiPlanarVideoRange到YUV420?/如何将Y和Cbcr平面复制到单平面? [英] 420YpCbCr8BiPlanarVideoRange To YUV420 ?/How to copy Y and Cbcr plane to Single plane?

查看:514
本文介绍了420YpCbCr8BiPlanarVideoRange到YUV420?/如何将Y和Cbcr平面复制到单平面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AVFoundation捕获了视频。我已设置(视频设置)并获取outputsamplebuffer kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange格式。但我需要YUV420格式进行进一步处理。

i have captured video using AVFoundation .i have set (video setting )and get in outputsamplebuffer kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange format. But i need YUV420 format for further processing .

我的疑问是

1. <$ c $之间的差异c> 420YpCbCr8BiPlanarVideoRange,420YpCbCr8BiPlanarFULLRange,420YpCbCr8PlanarFullRange,420YpCbCr8Planar 和YUV420?

2.我可以将420YpCbCr8BiPlanarVideoRange转换为YUV420吗?

3.如何转换YUV420 To 32BGRA?

1.difference among 420YpCbCr8BiPlanarVideoRange,420YpCbCr8BiPlanarFULLRange, 420YpCbCr8PlanarFullRange,420YpCbCr8Planar and YUV420 ?
2.how can i convert 420YpCbCr8BiPlanarVideoRange to YUV420 ?
3. How to Convert YUV420 To 32BGRA ?

4)
或其他一些方法这样做???这是任何开源库或Apple Framework ....

4) or some other Way to do this??? that is Any open source library or Apple Framework....

我已经完成了Accelerate框架......它有以下<$ c $的图片转换c> planar8,planerF,RGBA8888 等...任何方式与 32BGRA / YUV420 / 420YpCbCr8BiPlanarVideoRange 相等的那些格式并做我的要求??? ??

i have gone through Accelerate framework ...... it has image conversion for following planar8,planerF,RGBA8888 etc... Any way to equal those formats with 32BGRA/YUV420/ 420YpCbCr8BiPlanarVideoRange and Do my requirement?????

提前致谢

提前感谢

推荐答案

主要区别在于:

如果您有双平面格式,那么Y数据(亮度)和CbCr数据(色度或颜色信息)位于称为平面的两个独立的存储区域中。您可以使用索引为0的 CVPixelBufferGetBaseAddressOfPlane 来获取Y数据,使用索引1来获取CbCr数据。如果格式为平面,则两种数据都在同一平面上(首先是所有Y值,然后是所有Cb值,最后是Cr值)。

If you have a biplanar format, then the Y data (luminance) and the CbCr data (chroma or color information) are in two separate memory areas called planes. You can use CVPixelBufferGetBaseAddressOfPlane with index 0 to get the Y data and index 1 to get the CbCr data. If the format is planar, then both kinds of data are in the same plane (first all the Y values, then all Cb values and finally the Cr values).

如果您具有全范围格式,则0到255的值将用于每个亮度或色度值。 视频范围格式仅使用16到235之间的值(由于某些历史原因)。

If you have a full range format, then the values from 0 to 255 are used for each luma or chroma value. Video range format only use values from 16 to 235 (for some historical reasons).

术语 420 表示多少亮度和格式包含多少色度信息。它基本上表示每个像素都有亮度信息,每个2x2块都有色度信息。

The term 420 indicates how much luma and how much chroma information the format contains. It basically says that there is luma information for each pixel and chroma information for each 2x2 block.

YUV420是 - 据我所知 - 不是精确指定的格式。它通常用于平面YpCbCr 420格式。

YUV420 is - as far as I can tell - not a precisely specified format. It is often use for a planar YpCbCr 420 format.

这篇关于420YpCbCr8BiPlanarVideoRange到YUV420?/如何将Y和Cbcr平面复制到单平面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆