YUV Formats
来源:互联网 发布:中国人口数据 编辑:程序博客网 时间:2024/05/21 17:23
YUV Color Space
Color is decomposed in three components.
Y: represents Luminance.
U (Cb): is the Chroma channel, U axis, blue component.
V (Cr): is the Chroma channel, V axis, red component.
The first reason to use the YUV decomposition is that a conversion of an RGB signal (such as the one used on computer monitors) to YUV requires just a linear transform, which is really easy to do with analogue circuitry and it is cheap to compute numerically.
The second reason that YUV allows separating the color information from the luminance component (which we perceive as brightness). For this reason YUV is used worldwide for television and motion picture encoding standards such as PAL, SECAM and for JPEG/MPEG compression. Since the human eye is also much more responsive to luminance, JPEG compresses more heavily the chroma channels which are less likely to cause perceptible differences in the resulting image.
There are several YUV formats. There are interleaved formats and planar formats (also called packed formats). The main difference is how they are stored in memory.
Interleaved images have all color components needed to represent a pixel placed at the same place in memory. For planar formats the data is not interleaved, but stored separately for each color channel (also called color plane).
For filter writers this means that they can write one simple function that is called three times, one for each color channel, assuming that the operations are channel-independent (which is not always the case). Again, using aligned for both color and luma channels will allow easy memory access. The use of a planar format gives in most cases a significant speedup, since all bytes of each plane can be treated the same way. It can also give a speedup because your filter doesn't have to work on all planes, if it only modifies one or two of them.
4:4:4 Format (Base YUV Format)
In this format size of matrices of Y, U and V value are as same as RGB.
Image size: 176x144.
RGB: 3 matrices in size of 176x144.
YUV: 3 matrices in size of 176x144.
4:2:2 Format (Known as YUY2)
However in 4:2:2 format Y value is 176x144 but U and V values are half sizes, 88x72.
Image size: 176x144.
RGB: 3 matrices in size of 176x144.
Y: 176x144.
U: 88x72.
V: 88x72.
YUY2 colorformat
YUY2 is an interleaved image format. Bytes are arranged in memory like this:
YUYV|YUYV|YUYV|YUYV|YUYV|YUYV|...^first byte in a row.
So when converting back to RGB color space each U and V value is used four times to complete the conversion. Figure 1 shows the usage of the 4:2:2 format while converting back to RGB.
Figure 1. YUV 4:2:2 format.
- YUV Formats
- YUV Formats
- YUV Formats
- YUV Formats
- [zz]YUV Formats
- YUV pixel formats
- YUV pixel formats
- YUV pixel formats
- YUV pixel formats
- YUV pixel formats
- YUV pixel formats
- Understanding YUV data formats
- yuv pixel formats
- Video Rendering with 8-Bit YUV Formats
- Video Rendering with 8-Bit YUV Formats
- Video Rendering with 8-Bit YUV Formats
- Video Rendering with 8-Bit YUV Formats
- formats
- wpf动态创建DataGrid
- IOS开发常用数学函数
- iOS事件拦截(实现触摸任意位置隐藏指定view)
- C++ 显示类型的转换----static_cast
- 微信433天之内完成用户数从零到一亿的增长过程
- YUV Formats
- 服务器iptables配置(1)
- Java Socket图片文件传输
- CString常用的成员函数简介(一)
- OpenGL ES 2.0 for iPhone Tutorial 1
- MySql数据库优化方案 MySql参数设置
- JDK版本与eclipse兼容问题
- PB11.5,PB12 web项目初探
- 希尔排序