当前位置:网站首页>Audio and video engineer YUV and RGB detailed explanation
Audio and video engineer YUV and RGB detailed explanation
2022-07-06 02:05:00 【Siege lion hundred miles】
Color space Color Space
Color space color space is the organization of color . With the help of color space and testing for physical devices , You can get a fixed analog and digital representation of color . Color space can be defined only by arbitrarily selecting some colors , For example, a color system is just a set of color samples , Then define a name and code for each color ; It can also be based on rigorous mathematical definitions , such as Adobe RGB
、sRGB
.
Color model
RGB It's a kind of Color model
( In fact, it can also be called color coding method ), Describe colors by a set of numbers . It is a additive model , Itself cannot represent absolute color space . But through the description of standard color space Adobe RGB
and sRGB
The combination of , You can determine the color of a pixel . Through this process , Colors in images and documents , It can be determined .( Therefore, it is combined with the description of different color spaces , You can see different effects on the monitor ).
YUV It is adopted by European television system Color coding method
( Belong to PAL), yes PAL and SECAM Simulate the color space of color TV system .
YUV Usually used for color images / Color space of video processing . It encodes color images / video , At the same time, considering the properties of human eyes , These properties allow the bandwidth of chrominance components to be reduced without perceptual distortion . Use YUV Color space helps images / video compression . It was originally used for analog television broadcasting . Color space YUV、YIQ、YCbCr and YPbPr All belong to YUV family .Y’UV, YUV, YCbCr,YPbPr And other proper nouns can be called YUV, There's overlap .「Y」 Indicates brightness (Luminance、Luma),「U」 and 「V」 It's chromaticity 、 concentration (Chrominance、Chroma).
Why is there YUV
Y’UV The invention of color TV is due to the transition period between color TV and black-and-white TV . Black and white video only Y(Luma,Luminance) video , That's the gray scale value . The customization of color TV specifications is based on YUV/YIQ To process color TV signals . hold UV See it as a symbol of chromaticity . be left over Y The signal is the same as that of black-and-white TV , This can solve the compatibility problem . meanwhile Y’UV The biggest advantage is that it only needs to occupy very little bandwidth .
In terms of historical evolution , among YUV and Y’UV Usually used to encode analog signals of TV , and YCbCr It is used to describe digital image signals , Suitable for film and picture compression and transmission , for example MPEG,JPEG.
YUV sampling
YUV 4:4:4 sampling
, every last Y Corresponding to a group of UV component , One YUV Occupy 8+8+8 = 24bits 3 Bytes .
YUV 4:2:2 sampling
, Every two Y Share a group UV component , One YUV Occupy 8+4+4 = 16bits 2 Bytes .
YUV 4:2:0 sampling
, Every four Y Share a group UV component , One YUV Occupy 8+2+2 = 12bits 1.5 Bytes .
YUV Format
YUV The format is divided into two formats : Compact format (packed format): take Y,U,V The value is stored as Macro Pixels array , and RGB Is stored in a similar manner . Flat format (planar format): take Y,U,V The three fragments of are placed in different matrices .
Start talking is : about planar Of YUV Format , First, store all pixels in a row Y, And then it stores all the pixels U, And then all the pixels V. about packed Of YUV Format , Every pixel point Y,U,V Is a continuous cross storage .
YUV420 type
1.YUV420p and YUV420sp difference
because YUV420 More commonly used , Here we will focus on YUV420.YUV420 Divided into two :YUV420p and YUV420sp. Let's first look at a brain map , Just have an impression of these types .
YUV420P
YUV420SP
2.YUV420p and YUV420sp Specific classification and details
YUV420p: Also called planer Flat pattern ,Y ,U,V And then different planes , That is, there are three planes .
I420: Also called YU12, Android mode . The storage order is save first Y, Save again U, Last deposit V.YYYYUUUVVV
YV12: The storage order is save first Y, Save again V, Last deposit U.YYYVVVUUU
UV420sp: Also called bi-planer or two-planer Biplane ,Y A plane ,UV Cross store on the same plane .
NV12:IOS There is only one mode . The storage order is save first Y, Again UV Alternate storage .YYYYUVUVUV
NV21: Android mode . The storage order is save first Y, Save again U, Again VU Alternate storage .YYYYVUVUVU
RGB and YUV Transformation between
HDTV(BT.601) Of RGB and YUV Conversion between .
HDTV(BT.709) Of RGB and YUV Conversion between .
YIQ yes NTSC Color space used by color TV
YDbDr, yes SÉCAM Color space used in
YCbCr yes YUV Scale and offset versions of the color space .Y Of 8 Bit range from 16 A to 235.Cb and Cr For the range of 16-240.YCbCr be used for JPEG Compress .
If RGB The range of data is 0-255( Black and white ), It's like PC As is common in , Then the following equation should be used to maintain the correct black and white level :
Standard setting body – International Telecommunication Union radio communication department (ITU-R)
ITU-R primary CCIR, stay 1982 Formulated in BT.601 standard ( It's also called Rec.601).
The color coding system confirmed by this standard is called YCbCr 4:2:2, It is used to digitally encode the interlaced digital video analog signal .
FFmpeg/WebRTC/RTMP/NDK/Android Advanced development of audio and video streaming media Interview questions 、 Learning materials 、 Teaching videos and learning roadmap can be added if necessary Learning exchange group perhaps Data acquisition
边栏推荐
- Basic operations of databases and tables ----- unique constraints
- Derivation of Biot Savart law in College Physics
- Selenium waiting mode
- [network attack and defense training exercises]
- selenium 等待方式
- dried food! Accelerating sparse neural network through hardware and software co design
- Redis-列表
- Online reservation system of sports venues based on PHP
- [depth first search notes] Abstract DFS
- Cookie concept, basic use, principle, details and Chinese transmission
猜你喜欢
抓包整理外篇——————状态栏[ 四]
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
【clickhouse】ClickHouse Practice in EOI
Exness: Mercedes Benz's profits exceed expectations, and it is predicted that there will be a supply chain shortage in 2022
2022 PMP project management examination agile knowledge points (8)
[flask] official tutorial -part3: blog blueprint, project installability
How does redis implement multiple zones?
Initialize MySQL database when docker container starts
Basic operations of databases and tables ----- unique constraints
Redis-字符串类型
随机推荐
Basic operations of databases and tables ----- default constraints
同一个 SqlSession 中执行两条一模一样的SQL语句查询得到的 total 数量不一样
MySQL learning notes - subquery exercise
It's wrong to install PHP zbarcode extension. I don't know if any God can help me solve it. 7.3 for PHP environment
leetcode-两数之和
Basic operations of databases and tables ----- non empty constraints
selenium 等待方式
Xshell 7 Student Edition
Pangolin Library: subgraph
[flask] official tutorial -part1: project layout, application settings, definition and database access
干货!通过软硬件协同设计加速稀疏神经网络
Reasonable and sensible
500 lines of code to understand the principle of mecached cache client driver
竞价推广流程
Card 4G industrial router charging pile intelligent cabinet private network video monitoring 4G to Ethernet to WiFi wired network speed test software and hardware customization
Leetcode skimming questions_ Invert vowels in a string
Dynamics 365 开发协作最佳实践思考
通过PHP 获取身份证相关信息 获取生肖,获取星座,获取年龄,获取性别
Grabbing and sorting out external articles -- status bar [4]
Computer graduation design PHP college classroom application management system