1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _V4L2-PIX-FMT-YUV422P:
4
5*****************************
6V4L2_PIX_FMT_YUV422P ('422P')
7*****************************
8
9
10Format with ½ horizontal chroma resolution, also known as YUV 4:2:2.
11Planar layout as opposed to ``V4L2_PIX_FMT_YUYV``
12
13
14Description
15===========
16
17This format is not commonly used. This is a planar version of the YUYV
18format. The three components are separated into three sub-images or
19planes. The Y plane is first. The Y plane has one byte per pixel. The Cb
20plane immediately follows the Y plane in memory. The Cb plane is half
21the width of the Y plane (and of the image). Each Cb belongs to two
22pixels. For example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`,
23Y'\ :sub:`01`. Following the Cb plane is the Cr plane, just like the Cb
24plane.
25
26If the Y plane has pad bytes after each row, then the Cr and Cb planes
27have half as many pad bytes after their rows. In other words, two Cx
28rows (including padding) is exactly as long as one Y row (including
29padding).
30
31**Byte Order.**
32Each cell is one byte.
33
34
35
36
37.. flat-table::
38    :header-rows:  0
39    :stub-columns: 0
40
41    * - start + 0:
42      - Y'\ :sub:`00`
43      - Y'\ :sub:`01`
44      - Y'\ :sub:`02`
45      - Y'\ :sub:`03`
46    * - start + 4:
47      - Y'\ :sub:`10`
48      - Y'\ :sub:`11`
49      - Y'\ :sub:`12`
50      - Y'\ :sub:`13`
51    * - start + 8:
52      - Y'\ :sub:`20`
53      - Y'\ :sub:`21`
54      - Y'\ :sub:`22`
55      - Y'\ :sub:`23`
56    * - start + 12:
57      - Y'\ :sub:`30`
58      - Y'\ :sub:`31`
59      - Y'\ :sub:`32`
60      - Y'\ :sub:`33`
61    * - start + 16:
62      - Cb\ :sub:`00`
63      - Cb\ :sub:`01`
64    * - start + 18:
65      - Cb\ :sub:`10`
66      - Cb\ :sub:`11`
67    * - start + 20:
68      - Cb\ :sub:`20`
69      - Cb\ :sub:`21`
70    * - start + 22:
71      - Cb\ :sub:`30`
72      - Cb\ :sub:`31`
73    * - start + 24:
74      - Cr\ :sub:`00`
75      - Cr\ :sub:`01`
76    * - start + 26:
77      - Cr\ :sub:`10`
78      - Cr\ :sub:`11`
79    * - start + 28:
80      - Cr\ :sub:`20`
81      - Cr\ :sub:`21`
82    * - start + 30:
83      - Cr\ :sub:`30`
84      - Cr\ :sub:`31`
85
86
87**Color Sample Location:**
88
89
90
91.. flat-table::
92    :header-rows:  0
93    :stub-columns: 0
94
95    * -
96      - 0
97      -
98      - 1
99      - 2
100      -
101      - 3
102    * - 0
103      - Y
104      - C
105      - Y
106      - Y
107      - C
108      - Y
109    * - 1
110      - Y
111      - C
112      - Y
113      - Y
114      - C
115      - Y
116    * - 2
117      - Y
118      - C
119      - Y
120      - Y
121      - C
122      - Y
123    * - 3
124      - Y
125      - C
126      - Y
127      - Y
128      - C
129      - Y
130