blob: d986393aa9344e7918447c22621740dab14098a8 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
3.. _V4L2-PIX-FMT-YUV422M:
Mauro Carvalho Chehab9aff73d2016-07-07 16:16:21 -03004.. _v4l2-pix-fmt-yvu422m:
Markus Heiser5377d912016-06-30 15:18:56 +02005
6************************************************************
7V4L2_PIX_FMT_YUV422M ('YM16'), V4L2_PIX_FMT_YVU422M ('YM61')
8************************************************************
9
Markus Heiser5377d912016-06-30 15:18:56 +020010
11V4L2_PIX_FMT_YVU422M
12Planar formats with ½ horizontal resolution, also known as YUV and YVU
134:2:2
14
15
16Description
17===========
18
19This is a multi-planar format, as opposed to a packed format. The three
20components are separated into three sub-images or planes.
21
22The Y plane is first. The Y plane has one byte per pixel. For
23``V4L2_PIX_FMT_YUV422M`` the Cb data constitutes the second plane which
24is half the width of the Y plane (and of the image). Each Cb belongs to
25two pixels. For example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`,
26Y'\ :sub:`01`. The Cr data, just like the Cb plane, is in the third
27plane.
28
29``V4L2_PIX_FMT_YVU422M`` is the same except the Cr data is stored in the
30second plane and the Cb data in the third plane.
31
32If the Y plane has pad bytes after each row, then the Cb and Cr planes
33have half as many pad bytes after their rows. In other words, two Cx
34rows (including padding) is exactly as long as one Y row (including
35padding).
36
37``V4L2_PIX_FMT_YUV422M`` and ``V4L2_PIX_FMT_YVU422M`` are intended to be
38used only in drivers and applications that support the multi-planar API,
39described in :ref:`planar-apis`.
40
Mauro Carvalho Chehab056d2ee2016-07-04 13:58:01 -030041**Byte Order.**
Markus Heiser5377d912016-06-30 15:18:56 +020042Each cell is one byte.
43
44
45
Mauro Carvalho Chehab5bd4bb72016-08-17 08:14:19 -030046
Markus Heiser5377d912016-06-30 15:18:56 +020047.. flat-table::
48 :header-rows: 0
49 :stub-columns: 0
Markus Heiser5377d912016-06-30 15:18:56 +020050
Laurent Pinchartc2b66ca2016-09-05 08:44:34 -030051 * - start0 + 0:
52 - Y'\ :sub:`00`
53 - Y'\ :sub:`01`
54 - Y'\ :sub:`02`
55 - Y'\ :sub:`03`
56 * - start0 + 4:
57 - Y'\ :sub:`10`
58 - Y'\ :sub:`11`
59 - Y'\ :sub:`12`
60 - Y'\ :sub:`13`
61 * - start0 + 8:
62 - Y'\ :sub:`20`
63 - Y'\ :sub:`21`
64 - Y'\ :sub:`22`
65 - Y'\ :sub:`23`
66 * - start0 + 12:
67 - Y'\ :sub:`30`
68 - Y'\ :sub:`31`
69 - Y'\ :sub:`32`
70 - Y'\ :sub:`33`
71 * -
72 * - start1 + 0:
73 - Cb\ :sub:`00`
74 - Cb\ :sub:`01`
75 * - start1 + 2:
76 - Cb\ :sub:`10`
77 - Cb\ :sub:`11`
78 * - start1 + 4:
79 - Cb\ :sub:`20`
80 - Cb\ :sub:`21`
81 * - start1 + 6:
82 - Cb\ :sub:`30`
83 - Cb\ :sub:`31`
84 * -
85 * - start2 + 0:
86 - Cr\ :sub:`00`
87 - Cr\ :sub:`01`
88 * - start2 + 2:
89 - Cr\ :sub:`10`
90 - Cr\ :sub:`11`
91 * - start2 + 4:
92 - Cr\ :sub:`20`
93 - Cr\ :sub:`21`
94 * - start2 + 6:
95 - Cr\ :sub:`30`
96 - Cr\ :sub:`31`
Markus Heiser5377d912016-06-30 15:18:56 +020097
98
99**Color Sample Location..**
100
101
102
103.. flat-table::
104 :header-rows: 0
105 :stub-columns: 0
106
Laurent Pinchartc2b66ca2016-09-05 08:44:34 -0300107 * -
108 - 0
109 -
110 - 1
111 - 2
112 -
113 - 3
114 * - 0
115 - Y
116 - C
117 - Y
118 - Y
119 - C
120 - Y
121 * - 1
122 - Y
123 - C
124 - Y
125 - Y
126 - C
127 - Y
128 * - 2
129 - Y
130 - C
131 - Y
132 - Y
133 - C
134 - Y
135 * - 3
136 - Y
137 - C
138 - Y
139 - Y
140 - C
141 - Y