当前位置:网站首页>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
边栏推荐
- Sword finger offer 38 Arrangement of strings
- Folio. Ink is a free, fast and easy-to-use image sharing tool
- SQL statement
- Competition question 2022-6-26
- National intangible cultural heritage inheritor HD Wang's shadow digital collection of "Four Beauties" made an amazing debut!
- How to improve the level of pinduoduo store? Dianyingtong came to tell you
- 2 power view
- Virtual machine network, networking settings, interconnection with host computer, network configuration
- Basic operations of database and table ----- set the fields of the table to be automatically added
- Leetcode sum of two numbers
猜你喜欢
NLP fourth paradigm: overview of prompt [pre train, prompt, predict] [Liu Pengfei]
You are using pip version 21.1.1; however, version 22.0.3 is available. You should consider upgradin
Force buckle 9 palindromes
Leetcode skimming questions_ Invert vowels in a string
SPI communication protocol
A basic lintcode MySQL database problem
使用npm发布自己开发的工具包笔记
500 lines of code to understand the principle of mecached cache client driver
2022 PMP project management examination agile knowledge points (8)
【clickhouse】ClickHouse Practice in EOI
随机推荐
安装php-zbarcode扩展时报错,不知道有没有哪位大神帮我解决一下呀 php 环境用的7.3
Computer graduation design PHP part-time recruitment management system for College Students
阿里测开面试题
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
Force buckle 1020 Number of enclaves
MySQL learning notes - subquery exercise
Redis-列表
Selenium waiting mode
正则表达式:示例(1)
【Flask】官方教程(Tutorial)-part3:blog蓝图、项目可安装化
竞赛题 2022-6-26
Folio. Ink is a free, fast and easy-to-use image sharing tool
dried food! Accelerating sparse neural network through hardware and software co design
02.Go语言开发环境配置
Redis string type
国家级非遗传承人高清旺《四大美人》皮影数字藏品惊艳亮相!
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
How to upgrade kubernetes in place
01.Go语言介绍
Numpy array index slice