Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-yuv422m.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-YUV422M:
4 .. _v4l2-pix-fmt-yvu422m:
5
6 ************************************************************
7 V4L2_PIX_FMT_YUV422M ('YM16'), V4L2_PIX_FMT_YVU422M ('YM61')
8 ************************************************************
9
10 *man V4L2_PIX_FMT_YUV422M(2)*
11
12 V4L2_PIX_FMT_YVU422M
13 Planar formats with ½ horizontal resolution, also known as YUV and YVU
14 4:2:2
15
16
17 Description
18 ===========
19
20 This is a multi-planar format, as opposed to a packed format. The three
21 components are separated into three sub-images or planes.
22
23 The Y plane is first. The Y plane has one byte per pixel. For
24 ``V4L2_PIX_FMT_YUV422M`` the Cb data constitutes the second plane which
25 is half the width of the Y plane (and of the image). Each Cb belongs to
26 two pixels. For example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`,
27 Y'\ :sub:`01`. The Cr data, just like the Cb plane, is in the third
28 plane.
29
30 ``V4L2_PIX_FMT_YVU422M`` is the same except the Cr data is stored in the
31 second plane and the Cb data in the third plane.
32
33 If the Y plane has pad bytes after each row, then the Cb and Cr planes
34 have half as many pad bytes after their rows. In other words, two Cx
35 rows (including padding) is exactly as long as one Y row (including
36 padding).
37
38 ``V4L2_PIX_FMT_YUV422M`` and ``V4L2_PIX_FMT_YVU422M`` are intended to be
39 used only in drivers and applications that support the multi-planar API,
40 described in :ref:`planar-apis`.
41
42 **Byte Order.**
43 Each cell is one byte.
44
45
46
47 .. flat-table::
48     :header-rows:  0
49     :stub-columns: 0
50     :widths:       2 1 1 1 1
51
52
53     -  .. row 1
54
55        -  start0 + 0:
56
57        -  Y'\ :sub:`00`
58
59        -  Y'\ :sub:`01`
60
61        -  Y'\ :sub:`02`
62
63        -  Y'\ :sub:`03`
64
65     -  .. row 2
66
67        -  start0 + 4:
68
69        -  Y'\ :sub:`10`
70
71        -  Y'\ :sub:`11`
72
73        -  Y'\ :sub:`12`
74
75        -  Y'\ :sub:`13`
76
77     -  .. row 3
78
79        -  start0 + 8:
80
81        -  Y'\ :sub:`20`
82
83        -  Y'\ :sub:`21`
84
85        -  Y'\ :sub:`22`
86
87        -  Y'\ :sub:`23`
88
89     -  .. row 4
90
91        -  start0 + 12:
92
93        -  Y'\ :sub:`30`
94
95        -  Y'\ :sub:`31`
96
97        -  Y'\ :sub:`32`
98
99        -  Y'\ :sub:`33`
100
101     -  .. row 5
102
103        -
104
105     -  .. row 6
106
107        -  start1 + 0:
108
109        -  Cb\ :sub:`00`
110
111        -  Cb\ :sub:`01`
112
113     -  .. row 7
114
115        -  start1 + 2:
116
117        -  Cb\ :sub:`10`
118
119        -  Cb\ :sub:`11`
120
121     -  .. row 8
122
123        -  start1 + 4:
124
125        -  Cb\ :sub:`20`
126
127        -  Cb\ :sub:`21`
128
129     -  .. row 9
130
131        -  start1 + 6:
132
133        -  Cb\ :sub:`30`
134
135        -  Cb\ :sub:`31`
136
137     -  .. row 10
138
139        -
140
141     -  .. row 11
142
143        -  start2 + 0:
144
145        -  Cr\ :sub:`00`
146
147        -  Cr\ :sub:`01`
148
149     -  .. row 12
150
151        -  start2 + 2:
152
153        -  Cr\ :sub:`10`
154
155        -  Cr\ :sub:`11`
156
157     -  .. row 13
158
159        -  start2 + 4:
160
161        -  Cr\ :sub:`20`
162
163        -  Cr\ :sub:`21`
164
165     -  .. row 14
166
167        -  start2 + 6:
168
169        -  Cr\ :sub:`30`
170
171        -  Cr\ :sub:`31`
172
173
174 **Color Sample Location..**
175
176
177
178 .. flat-table::
179     :header-rows:  0
180     :stub-columns: 0
181
182
183     -  .. row 1
184
185        -
186        -  0
187
188        -
189        -  1
190
191        -  2
192
193        -
194        -  3
195
196     -  .. row 2
197
198        -  0
199
200        -  Y
201
202        -  C
203
204        -  Y
205
206        -  Y
207
208        -  C
209
210        -  Y
211
212     -  .. row 3
213
214        -  1
215
216        -  Y
217
218        -  C
219
220        -  Y
221
222        -  Y
223
224        -  C
225
226        -  Y
227
228     -  .. row 4
229
230        -  2
231
232        -  Y
233
234        -  C
235
236        -  Y
237
238        -  Y
239
240        -  C
241
242        -  Y
243
244     -  .. row 5
245
246        -  3
247
248        -  Y
249
250        -  C
251
252        -  Y
253
254        -  Y
255
256        -  C
257
258        -  Y