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