Merge tag 'docs-next' of git://git.lwn.net/linux.git into patchwork
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-nv16m.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-NV16M:
4 .. _v4l2-pix-fmt-nv61m:
5
6 ********************************************************
7 V4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M ('NM61')
8 ********************************************************
9
10 V4L2_PIX_FMT_NV61M
11 Variation of ``V4L2_PIX_FMT_NV16`` and ``V4L2_PIX_FMT_NV61`` with planes
12 non contiguous in memory.
13
14
15 Description
16 ===========
17
18 This is a multi-planar, two-plane version of the YUV 4:2:2 format. The
19 three components are separated into two sub-images or planes.
20 ``V4L2_PIX_FMT_NV16M`` differs from ``V4L2_PIX_FMT_NV16`` in that the
21 two planes are non-contiguous in memory, i.e. the chroma plane does not
22 necessarily immediately follow the luma plane. The luminance data
23 occupies the first plane. The Y plane has one byte per pixel. In the
24 second plane there is chrominance data with alternating chroma samples.
25 The CbCr plane is the same width and height, in bytes, as the Y plane.
26 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_NV61M`` is the same as ``V4L2_PIX_FMT_NV16M`` except the
29 Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.
30
31 ``V4L2_PIX_FMT_NV16M`` and ``V4L2_PIX_FMT_NV61M`` are intended to be
32 used only in drivers and applications that support the multi-planar API,
33 described in :ref:`planar-apis`.
34
35 **Byte Order.**
36 Each cell is one byte.
37
38
39 .. flat-table::
40     :header-rows:  0
41     :stub-columns: 0
42
43     -  .. row 1
44
45        -  start0 + 0:
46
47        -  Y'\ :sub:`00`
48
49        -  Y'\ :sub:`01`
50
51        -  Y'\ :sub:`02`
52
53        -  Y'\ :sub:`03`
54
55     -  .. row 2
56
57        -  start0 + 4:
58
59        -  Y'\ :sub:`10`
60
61        -  Y'\ :sub:`11`
62
63        -  Y'\ :sub:`12`
64
65        -  Y'\ :sub:`13`
66
67     -  .. row 3
68
69        -  start0 + 8:
70
71        -  Y'\ :sub:`20`
72
73        -  Y'\ :sub:`21`
74
75        -  Y'\ :sub:`22`
76
77        -  Y'\ :sub:`23`
78
79     -  .. row 4
80
81        -  start0 + 12:
82
83        -  Y'\ :sub:`30`
84
85        -  Y'\ :sub:`31`
86
87        -  Y'\ :sub:`32`
88
89        -  Y'\ :sub:`33`
90
91     -  .. row 5
92
93        -
94
95     -  .. row 6
96
97        -  start1 + 0:
98
99        -  Cb\ :sub:`00`
100
101        -  Cr\ :sub:`00`
102
103        -  Cb\ :sub:`02`
104
105        -  Cr\ :sub:`02`
106
107     -  .. row 7
108
109        -  start1 + 4:
110
111        -  Cb\ :sub:`10`
112
113        -  Cr\ :sub:`10`
114
115        -  Cb\ :sub:`12`
116
117        -  Cr\ :sub:`12`
118
119     -  .. row 8
120
121        -  start1 + 8:
122
123        -  Cb\ :sub:`20`
124
125        -  Cr\ :sub:`20`
126
127        -  Cb\ :sub:`22`
128
129        -  Cr\ :sub:`22`
130
131     -  .. row 9
132
133        -  start1 + 12:
134
135        -  Cb\ :sub:`30`
136
137        -  Cr\ :sub:`30`
138
139        -  Cb\ :sub:`32`
140
141        -  Cr\ :sub:`32`
142
143
144 **Color Sample Location..**
145
146
147
148 .. flat-table::
149     :header-rows:  0
150     :stub-columns: 0
151
152
153     -  .. row 1
154
155        -
156        -  0
157
158        -
159        -  1
160
161        -  2
162
163        -
164        -  3
165
166     -  .. row 2
167
168        -  0
169
170        -  Y
171
172        -
173        -  Y
174
175        -  Y
176
177        -
178        -  Y
179
180     -  .. row 3
181
182        -
183        -
184        -  C
185
186        -
187        -
188        -  C
189
190        -
191
192     -  .. row 4
193
194        -  1
195
196        -  Y
197
198        -
199        -  Y
200
201        -  Y
202
203        -
204        -  Y
205
206     -  .. row 5
207
208        -
209        -
210        -  C
211
212        -
213        -
214        -  C
215
216        -
217
218     -  .. row 6
219
220        -
221
222     -  .. row 7
223
224        -  2
225
226        -  Y
227
228        -
229        -  Y
230
231        -  Y
232
233        -
234        -  Y
235
236     -  .. row 8
237
238        -
239        -
240        -  C
241
242        -
243        -
244        -  C
245
246        -
247
248     -  .. row 9
249
250        -  3
251
252        -  Y
253
254        -
255        -  Y
256
257        -  Y
258
259        -
260        -  Y
261
262     -  .. row 10
263
264        -
265        -
266        -  C
267
268        -
269        -
270        -  C
271
272        -