Difference between revisions of "YUV"

From VideoLAN Wiki
Jump to navigation Jump to search
(→‎YUV 4:2:0 (I420/YV12): Added description of J420)
(→‎YUV 4:2:2: Added description of J422)
Line 35: Line 35:
 
NV21 is like [[NV12]], but with '''U''' and '''V''' order reversed: it starts with '''V'''.
 
NV21 is like [[NV12]], but with '''U''' and '''V''' order reversed: it starts with '''V'''.
  
== YUV 4:2:2 ==
+
== YUV 4:2:2 (I422/J422) ==
 
=== I422 ===
 
=== I422 ===
 
In I422, like in [[I420]], you have one luma  plane '''''Y''''' and 2 chroma planes '''U''', '''V'''.
 
In I422, like in [[I420]], you have one luma  plane '''''Y''''' and 2 chroma planes '''U''', '''V'''.
Line 43: Line 43:
  
 
For a 2x2 group of pixels, you have 4 Y samples and 2 U and 2 V sample.
 
For a 2x2 group of pixels, you have 4 Y samples and 2 U and 2 V sample.
 +
 +
=== J422 ===
 +
J422 is exactly like [[I422]], but with a full range ("digital", 0-255) luma ('''''Y''''') component instead of limited range ("analog", 16-235). The chroma planes are exactly the same as in [[I422]].
  
 
= Packed formats =
 
= Packed formats =

Revision as of 09:53, 27 January 2012

YUV is a class of pixel formats used in Video application and in VLC media player.

YUV is also colorspace and the way to represent pixels colors is based on Luminance and Chrominance.

This pages explains the most useful ones in VLC media player.

Planar formats

YUV 4:2:0 (I420/J420/YV12)

I420

In I420, you have one luma "luminance" plane Y and 2 chroma planes U, V.

In I420, chroma planes (blue and red projections) are subsampled in both the horizontal and vertical dimensions by a factor of 2.

For a 2x2 group of pixels, you have 4 Y samples and 1 U and 1 V sample.

J420

J420 is exactly like I420, but with a full range ("digital", 0-255) luma (Y) component instead of limited range ("analog", 16-235). The chroma planes are exactly the same as in I420.

YV12

YV12 is exactly like I420, but with U and V order reversed.

NV12/NV21

NV12

Related to I420, in NV12, you have one luma "luminance" planes Y and one plane with U and V data interleaved. NV12 is considered as semiplanar.

In NV12, chroma planes (blue and red) are subsampled in both the horizontal and vertical dimensions by a factor of 2.

For a 2x2 group of pixels, you have 4 Y samples and 1 U and 1 V sample.

NV21

NV21 is like NV12, but with U and V order reversed: it starts with V.

YUV 4:2:2 (I422/J422)

I422

In I422, like in I420, you have one luma plane Y and 2 chroma planes U, V.

However, in I422, chroma planes (blue and red projections) are subsampled just in the horizontal dimension by a factor of 2. There is the same amount of lines than in the luma.

For a 2x2 group of pixels, you have 4 Y samples and 2 U and 2 V sample.

J422

J422 is exactly like I422, but with a full range ("digital", 0-255) luma (Y) component instead of limited range ("analog", 16-235). The chroma planes are exactly the same as in I422.

Packed formats

In packed formats, you usually have only one plane, with all the luma and chroma data interleaved.

UYVY

Know as UYVY, Y422, UYNV

In UYVY, the chroma samples are sub-sampled by a factor of 2.

In UYVY, the succession for 2 pixels, starts by U then one luma, then V again and then another luma.

YUY2

Know as YUY2, YUYV, V422, YUNV

In YUY2, the chroma samples are sub-sampled by a factor of 2.

In YUY2, the succession for 2 pixels, starts by one luma, thenU, then another luma and then V again.

YVYU

YVYU is just like YUY2, but with U and V order reversed.


This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
Please read the Documentation Editing Guidelines before you edit the documentation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.