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