YUV Vs NV12
上一篇 /
下一篇 2010-06-07 15:08:33
/ 个人分类:Codec
51Testing软件测试网[
R(wX
IQnAlso please refer to: http://kurtxue.spaces.live.com/Blog/cns!3FDA83D39D3B011!308.entry and http://www.sensoray.com/support/frame_grabber_capture_modes.htm
[sl;`%KK8D0
YUV
Y=Luminance, U=Normalised BY, V=Normalised RY.
The system of representing video as luminance, U or approximately blue to yellow color content and V or approximately red to cyan color content.. Another name, not rigorously correct, for analog component video or Y, Pb, Pr. (YCbCr)
The Y in YUV stands for "luma," which is brightness, or lightness, and black and white TVs decode only the Y part of the signal. U and V provide color information and are "color difference" signals of blue minus luma (B-Y) and red minus luma (R-Y). Through a process called "color space conversion," the video camera converts the RGB data captured by its sensors into either composite analog signals (YUV) or component versions (analog YPbPr or digital YCbCr). For rendering on screen, all these color spaces must be converted back again to RGB by the TV or display system.
4:2:0
Describes a picture where the chrominance is sampled at half the rate relative to luminance, in both the horizontal and vertical planes.
4:4:4就是不做下采样, OO表示Cb/Cr, XX表示亮度, 如下为444
一种444的存储格式 A为alpha值
4:2:2
4:2:0
]n)s `D0
5Z9RFV{/b0The most common video cards support packed YUV mode, YUY2 (4:2:2) and/or NV12 (4:2:0) natively. The byte ordering for YUY2 is as follows:51Testing软件测试网 aae;[P-UH
#hY3b$v
To0H0
Y0 _.cW9d3C
^'tp0 |
U051Testing软件测试网%Bm5M+jP |
Y151Testing软件测试网YTC,ox |
V051Testing软件测试网 |YR} }a&^3g*Sr |
Y251Testing软件测试网#vG'P5B4rdb[C } |
U2 j.r?7utm+F0 |
Y3 {L `#Uq"h
A0 |
V2 0@+J*B%K+s&Rk0 |
Y4 !lFS3_TL0 |
U4 U&I.~3F[ PN0 |
Y5 ;K
Q.U}{8v0 |
V451Testing软件测试网JpwCpE/ht6_7xP$_8[ | |
XTj,qYI1P0
-cs,A9P)O:P"Q8m-q0
51Testing软件测试网"V(\H8AHZM7c*F0L 51Testing软件测试网9m;h g G8Qx{
51Testing软件测试网W%H5P"z%HY'sL*o j h9x3} kYUY2 format(4:2:2 = width*height Y values, width*height /2 Cr,Cb values = 2*W*H total bytes)
_D]D5s9L.e_I0
NV12
YUV 4:2:0 image with a plane of 8 bit Y samples followed by an interleaved U/V plane containing 8 bit 2x2 subsampled colour difference samples.
| Horizontal
| Vertical
|
Y Sample Period
| 1
| 1
|
V (Cr) Sample Period
| 2
| 2
|
U (Cb) Sample Period
| 2
| 2 |
j@ QJ].Zl7zQn0Microsoft defines this format as follows:
#E0\f
_:p_8` Z0 "A format in which all Y samples are found first in memory as an array of unsigned char with an even number of lines (possibly with a larger stride for memory alignment), followed immediately by an array of unsigned char containing interleaved Cb and Cr samples (such that if addressed as a little-endian WORD type, Cb would be in the LSBs and Cr would be in the MSBs) with the same total stride as the Y samples. This is the preferred 4:2:0 pixel format."
a$bwFDNyCFj0
*S+tw muu0
5h5o Q5g'{ eyEw0NV12 is a quasi-planar format and has all the Y components first in memory followed by at array of UV packed components. For a 640x480 NV12 image, the layout is as follows:
{Ao.y_r)[ ^1]0
51Testing软件测试网Y%s |#p*m I
Y051Testing软件测试网 Ad{8S)G`y%J] |
Y151Testing软件测试网
h3VX(M:f |
Y3 :BCZ$`yRr!c0 |
… X+Yld-b@5C0 |
… %H n'r!SnB*R0 |
…51Testing软件测试网YI vK:S |
… h&g%T oC\$?0 |
-T*H9I"m b5{0 |
51Testing软件测试网MO0t@3A
Ql |
51Testing软件测试网tsP le |
… G(}#~&wl0 |
_']zk,fM%X*Cyid$g0 |
d/u8r:XrZg
J7v0 |
51Testing软件测试网~WAF;? |
51Testing软件测试网.Ud^feD0]\ |
51Testing软件测试网fw bbD w!vo |
51Testing软件测试网"o"}(@
bk |
51Testing软件测试网0n*d,e"U4s\{N
N |
~$ANA)cExD;]C0 |
51Testing软件测试网n ~UbO&Vba(C |
… (bL4Ez Y@#\(nY0 |
51Testing软件测试网jrqX9K3eM\5M9m |
51Testing软件测试网z+VqP|D0bnfv |
51Testing软件测试网
o II}f_ |
'M,A,tK nuE@0 |
51Testing软件测试网-LdC&I:N |
9`F|H9VS%z0 |
3EJM{]r
ye0 |
qL8X/_T
GG0 |
N2f;v&]*mMy0 |
… "RxG-X"n(l(R'L y#K0 |
51Testing软件测试网9s#}#N5GKA |
Z$I,sN`%V0V1k5^Ie O0 |
…51Testing软件测试网[-zfT!JnG,S |
…51Testing软件测试网
s~Y*Fa!i2{%^FW |
…51Testing软件测试网+|0xSC {]rue |
… :yW8R"sv2y"?y0 |
51Testing软件测试网B;W
q Yy(f |
Y30179851Testing软件测试网(B~,_+\?:AAE |
Y301799 %I(j[2dh`3my3^q0 |
U051Testing软件测试网t|d%h2[h a w4lf |
V0 bL!e$`c4|[R0 |
U151Testing软件测试网w8@:b0d9y
z |
V151Testing软件测试网/ntVeO
c |&M'Zd |
… aQ*ECQ6J0 |
…51Testing软件测试网?+HVwH |
…51Testing软件测试网fQ(q@3HQ |
\4ddz
Z$ay3t~hue0 |
.sM1bA,X+aa)Q0 |
(m9c'D%k h+b)ru0 |
… W3I2|(hS)a E][
p0 |
… 7d@r0?'R:IN0 |
… 3Xw%f,j^[&a0 |
…51Testing软件测试网v0]&x;n q~
{ |
…51Testing软件测试网S4EwNa!Pqh |
…51Testing软件测试网bx1B#~j |
… )L#YuD,Fek%N
\0 |
… _B;s(F!c-et0 |
U76799
P&U
Xc5Z0 |
V7679951Testing软件测试网{
M To
|3Z O_ | |
D/V2@4hxQ051Testing软件测试网['u0F dp%`v |ZR
7T)mx6s)qaB?J0[0
%B!g`oroX0
51Testing软件测试网`U3Q|Y0n
Qs!a6S3]b0
5wG0dKe/E+g0 51Testing软件测试网 n"M5k5f(X)R|5~E
+R2q fGAL?,^0
8h
y$|ZW
b3K0
51Testing软件测试网quYb9d/W.X9C
'@7[6?`1^,M7Kx-s0
51Testing软件测试网R ^}(E7H&z3s 51Testing软件测试网i
e5H\L8C
51Testing软件测试网s2\"H6^ Z"x
Y4@[
'f-Wfm.ZD0
'kEqb
b6D f"~}0NV12 format( 640*480 Y values, 640 *480 /4 Cr and Cb values = 3/2 H*W total )51Testing软件测试网{.V#|8y F [X
收藏
举报
TAG: