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