NV12格式和UV面 [英] NV12 format and UV plane

查看:1032
本文介绍了NV12格式和UV面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点困惑的NV12格式。我期待的页面理解的格式。
我目前了解的是,如果你有 640×480 diminsion的图像或视频,然后在Y架飞机将是具有 640× 480 字节,U和V两个平面有二分之六百四十点¯x二分之四百八十○。这并不意味着,美飞机具有二分之六百四十点¯x二分之四百八十○和V平面有二分之六百四十点¯x二分之四百八十○都只有二分之六百四十点¯x二分之四百八十○字节。所以在出缓冲器字节数组的总数会。
2乘以(二分之六百四十○)*(二分之四百八十○),因为紫外线飞机将需要两个字节。

i am a little confused about the NV12 format. i am looking the this page to understand the format. What i currently understand is that if you have an image or video of 640 x 480 diminsion then the Y plane will be having 640 x 480 bytes and U and V both planes have 640/2 x 480/2. It does not mean that U plane have 640/2 x 480/2 and V plane have 640/2 x 480/2 both have only 640/2 x 480/2 bytes. so the total number of bytes in out buffer array will be. 2 is multiplied with (640/2) * (480/2) because uv plane will take two bytes.

byte [] myArray new byte[(640 * 480) + (2 * (640/2) * (480/2)) ];



所以,问题是,我在一个正确的方式了解它? 。和我我使得指定的NV12格式的格式字节数组

so the question is that i am understanding it in a right way? and am i making the byte array in the format that specify the NV12 format.

推荐答案

的NV12格式二次采样为4:2 :0

The NV12 format is subsampled as 4:2:0

一帧的总大小为宽x高x 3/2 其中,W是宽度和H是高度。

The total size of a frame is W x H x 3 / 2 Where W is width and H is height.

1帧的VGA分辨率是460800字节,其中

1 frame in vga resolution is 460800 bytes, where


  • Y-部分是640×480字节

  • 的Cb-部分是640 * 480/4 = 76800字节

  • 铬部分是640 * 480/4 = 76800字节

希望这回答你的问题...

Hope this answers your question...

这篇关于NV12格式和UV面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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