V4L2_PIX_FMT_M420 — Format with ½ horizontal and vertical chroma resolution, also known as YUV 4:2:0. Hybrid plane line-interleaved layout.


M420 is a YUV format with ½ horizontal and vertical chroma subsampling (YUV 4:2:0). Pixels are organized as interleaved luma and chroma planes. Two lines of luma data are followed by one line of chroma data.

The luma plane has one byte per pixel. The chroma plane contains interleaved CbCr pixels subsampled by ½ in the horizontal and vertical directions. Each CbCr pair belongs to four pixels. For example, Cb0/Cr0 belongs to Y'00, Y'01, Y'10, Y'11.

All line lengths are identical: if the Y lines include pad bytes so do the CbCr lines.

Example 2.37. V4L2_PIX_FMT_M420 4 × 4 pixel image

Byte Order. Each cell is one byte.

start + 0:Y'00Y'01Y'02Y'03
start + 4:Y'10Y'11Y'12Y'13
start + 8:Cb00Cr00Cb01Cr01
start + 16:Y'20Y'21Y'22Y'23
start + 20:Y'30Y'31Y'32Y'33
start + 24:Cb10Cr10Cb11Cr11

Color Sample Location. 

 0 1 2 3
0Y Y Y Y
  C   C 
1Y Y Y Y
2Y Y Y Y
  C   C 
3Y Y Y Y