Merge remote-tracking branches 'asoc/fix/max98371', 'asoc/fix/nau8825', 'asoc/fix...
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-nv16.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-NV16:
4 .. _V4L2-PIX-FMT-NV61:
5
6 ******************************************************
7 V4L2_PIX_FMT_NV16 ('NV16'), V4L2_PIX_FMT_NV61 ('NV61')
8 ******************************************************
9
10 *man V4L2_PIX_FMT_NV16(2)*
11
12 V4L2_PIX_FMT_NV61
13 Formats with ½ horizontal chroma resolution, also known as YUV 4:2:2.
14 One luminance and one chrominance plane with alternating chroma samples
15 as opposed to ``V4L2_PIX_FMT_YVU420``
16
17
18 Description
19 ===========
20
21 These are two-plane versions of the YUV 4:2:2 format. The three
22 components are separated into two sub-images or planes. The Y plane is
23 first. The Y plane has one byte per pixel. For ``V4L2_PIX_FMT_NV16``, a
24 combined CbCr plane immediately follows the Y plane in memory. The CbCr
25 plane is the same width and height, in bytes, as the Y plane (and of the
26 image). Each CbCr pair belongs to two pixels. For example,
27 Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`.
28 ``V4L2_PIX_FMT_NV61`` is the same except the Cb and Cr bytes are
29 swapped, the CrCb plane starts with a Cr byte.
30
31 If the Y plane has pad bytes after each row, then the CbCr plane has as
32 many pad bytes after its rows.
33
34 **Byte Order.**
35 Each cell is one byte.
36
37
38
39 .. flat-table::
40     :header-rows:  0
41     :stub-columns: 0
42     :widths:       2 1 1 1 1
43
44
45     -  .. row 1
46
47        -  start + 0:
48
49        -  Y'\ :sub:`00`
50
51        -  Y'\ :sub:`01`
52
53        -  Y'\ :sub:`02`
54
55        -  Y'\ :sub:`03`
56
57     -  .. row 2
58
59        -  start + 4:
60
61        -  Y'\ :sub:`10`
62
63        -  Y'\ :sub:`11`
64
65        -  Y'\ :sub:`12`
66
67        -  Y'\ :sub:`13`
68
69     -  .. row 3
70
71        -  start + 8:
72
73        -  Y'\ :sub:`20`
74
75        -  Y'\ :sub:`21`
76
77        -  Y'\ :sub:`22`
78
79        -  Y'\ :sub:`23`
80
81     -  .. row 4
82
83        -  start + 12:
84
85        -  Y'\ :sub:`30`
86
87        -  Y'\ :sub:`31`
88
89        -  Y'\ :sub:`32`
90
91        -  Y'\ :sub:`33`
92
93     -  .. row 5
94
95        -  start + 16:
96
97        -  Cb\ :sub:`00`
98
99        -  Cr\ :sub:`00`
100
101        -  Cb\ :sub:`01`
102
103        -  Cr\ :sub:`01`
104
105     -  .. row 6
106
107        -  start + 20:
108
109        -  Cb\ :sub:`10`
110
111        -  Cr\ :sub:`10`
112
113        -  Cb\ :sub:`11`
114
115        -  Cr\ :sub:`11`
116
117     -  .. row 7
118
119        -  start + 24:
120
121        -  Cb\ :sub:`20`
122
123        -  Cr\ :sub:`20`
124
125        -  Cb\ :sub:`21`
126
127        -  Cr\ :sub:`21`
128
129     -  .. row 8
130
131        -  start + 28:
132
133        -  Cb\ :sub:`30`
134
135        -  Cr\ :sub:`30`
136
137        -  Cb\ :sub:`31`
138
139        -  Cr\ :sub:`31`
140
141
142 **Color Sample Location..**
143
144
145
146 .. flat-table::
147     :header-rows:  0
148     :stub-columns: 0
149
150
151     -  .. row 1
152
153        -
154        -  0
155
156        -
157        -  1
158
159        -  2
160
161        -
162        -  3
163
164     -  .. row 2
165
166        -  0
167
168        -  Y
169
170        -
171        -  Y
172
173        -  Y
174
175        -
176        -  Y
177
178     -  .. row 3
179
180        -
181        -
182        -  C
183
184        -
185        -
186        -  C
187
188        -
189
190     -  .. row 4
191
192        -  1
193
194        -  Y
195
196        -
197        -  Y
198
199        -  Y
200
201        -
202        -  Y
203
204     -  .. row 5
205
206        -
207        -
208        -  C
209
210        -
211        -
212        -  C
213
214        -
215
216     -  .. row 6
217
218        -
219
220     -  .. row 7
221
222        -  2
223
224        -  Y
225
226        -
227        -  Y
228
229        -  Y
230
231        -
232        -  Y
233
234     -  .. row 8
235
236        -
237        -
238        -  C
239
240        -
241        -
242        -  C
243
244        -
245
246     -  .. row 9
247
248        -  3
249
250        -  Y
251
252        -
253        -  Y
254
255        -  Y
256
257        -
258        -  Y
259
260     -  .. row 10
261
262        -
263        -
264        -  C
265
266        -
267        -
268        -  C
269
270        -