20

Can you please help me understand what are the differences between YUV420 and YUV422 format? I read this, http://www.fourcc.org/yuv.php, but I can't find the difference.

And does "YUV420" and "YUV420 SP" mean the same thing? And does "YUV422" and "YUV422 I" mean the samet thing?

Thank you.

deltheil
  • 15,496
  • 2
  • 44
  • 64
michael
  • 106,540
  • 116
  • 246
  • 346

1 Answers1

25

4:2:2: The two chroma components are sampled at half the sample rate of luma: the horizontal chroma resolution is halved.

4:2:0: The two chroma components are sampled at half the sample rate of luma both horizontally and vertically (i.e. there's one U and one V per 2x2 group of Ys).

For info regarding other variations, see this, this and this.

Michael
  • 57,169
  • 9
  • 80
  • 125
  • Thanks. If I want to break up an image to 4:2:2 format, the Y plane size is width*height, the U, V plane sizes are width/2*height/2. For 4:2:0 case, what are the size for Y, U, V planes? – michael Apr 01 '14 at 18:06
  • 2
    Shouldn't the size of your chroma planes be `width/2 * height` for 4:2:2? The chroma resolution is halved horizontally, but not vertically. – Michael Apr 01 '14 at 18:10
  • 1
    What is the difference between NV21/NV12 and YUV422? – michael Apr 02 '14 at 18:22
  • 2
    NV21/NV12 are variants of YUV420. The difference is in how the components are laid out in memory. This is explained in the first of the reference links in my answer. – Michael Apr 02 '14 at 18:35