1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _V4L2-PIX-FMT-M420:
4
5**************************
6V4L2_PIX_FMT_M420 ('M420')
7**************************
8
9Format with ½ horizontal and vertical chroma resolution, also known as
10YUV 4:2:0. Hybrid plane line-interleaved layout.
11
12
13Description
14===========
15
16M420 is a YUV format with ½ horizontal and vertical chroma subsampling
17(YUV 4:2:0). Pixels are organized as interleaved luma and chroma planes.
18Two lines of luma data are followed by one line of chroma data.
19
20The luma plane has one byte per pixel. The chroma plane contains
21interleaved CbCr pixels subsampled by ½ in the horizontal and vertical
22directions. Each CbCr pair belongs to four pixels. For example,
23Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
24Y'\ :sub:`10`, Y'\ :sub:`11`.
25
26All line lengths are identical: if the Y lines include pad bytes so do
27the CbCr lines.
28
29**Byte Order.**
30Each cell is one byte.
31
32
33.. flat-table::
34    :header-rows:  0
35    :stub-columns: 0
36
37    * - start + 0:
38      - Y'\ :sub:`00`
39      - Y'\ :sub:`01`
40      - Y'\ :sub:`02`
41      - Y'\ :sub:`03`
42    * - start + 4:
43      - Y'\ :sub:`10`
44      - Y'\ :sub:`11`
45      - Y'\ :sub:`12`
46      - Y'\ :sub:`13`
47    * - start + 8:
48      - Cb\ :sub:`00`
49      - Cr\ :sub:`00`
50      - Cb\ :sub:`01`
51      - Cr\ :sub:`01`
52    * - start + 16:
53      - Y'\ :sub:`20`
54      - Y'\ :sub:`21`
55      - Y'\ :sub:`22`
56      - Y'\ :sub:`23`
57    * - start + 20:
58      - Y'\ :sub:`30`
59      - Y'\ :sub:`31`
60      - Y'\ :sub:`32`
61      - Y'\ :sub:`33`
62    * - start + 24:
63      - Cb\ :sub:`10`
64      - Cr\ :sub:`10`
65      - Cb\ :sub:`11`
66      - Cr\ :sub:`11`
67
68
69**Color Sample Location:**
70
71
72
73.. flat-table::
74    :header-rows:  0
75    :stub-columns: 0
76
77    * -
78      - 0
79      -
80      - 1
81      - 2
82      -
83      - 3
84    * - 0
85      - Y
86      -
87      - Y
88      - Y
89      -
90      - Y
91    * -
92      -
93      - C
94      -
95      -
96      - C
97      -
98    * - 1
99      - Y
100      -
101      - Y
102      - Y
103      -
104      - Y
105    * -
106    * - 2
107      - Y
108      -
109      - Y
110      - Y
111      -
112      - Y
113    * -
114      -
115      - C
116      -
117      -
118      - C
119      -
120    * - 3
121      - Y
122      -
123      - Y
124      - Y
125      -
126      - Y
127