当前位置:网站首页>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
边栏推荐
- [flask] static file and template rendering
- selenium 等待方式
- Alibaba canal usage details (pit draining version)_ MySQL and ES data synchronization
- 01.Go语言介绍
- 【Flask】官方教程(Tutorial)-part1:项目布局、应用程序设置、定义和访问数据库
- leetcode3、實現 strStr()
- Force buckle 9 palindromes
- Apicloud openframe realizes the transfer and return of parameters to the previous page - basic improvement
- NumPy 数组索引 切片
- Flutter Doctor:Xcode 安装不完整
猜你喜欢
SPI communication protocol
PHP campus financial management system for computer graduation design
Maya hollowed out modeling
Mongodb problem set
A basic lintcode MySQL database problem
NLP fourth paradigm: overview of prompt [pre train, prompt, predict] [Liu Pengfei]
Using SA token to solve websocket handshake authentication
Kubernetes stateless application expansion and contraction capacity
干货!通过软硬件协同设计加速稀疏神经网络
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
01.Go语言介绍
Extracting key information from TrueType font files
Jisuanke - t2063_ Missile interception
Redis list
Computer graduation design PHP animation information website
dried food! Accelerating sparse neural network through hardware and software co design
FTP server, ssh server (super brief)
Publish your own toolkit notes using NPM
[solution] every time idea starts, it will build project
Executing two identical SQL statements in the same sqlsession will result in different total numbers
Genius storage uses documents, a browser caching tool
Unreal browser plug-in
Blue Bridge Cup embedded_ STM32_ New project file_ Explain in detail
SQL statement
PHP campus movie website system for computer graduation design
阿里测开面试题
【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
Get the relevant information of ID card through PHP, get the zodiac, get the constellation, get the age, and get the gender
插卡4G工业路由器充电桩智能柜专网视频监控4G转以太网转WiFi有线网速测试 软硬件定制