Merge branch 'for-viro' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[deliverable/linux.git] / Documentation / media / uapi / v4l / pixfmt-nv12m.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _V4L2-PIX-FMT-NV12M:
9aff73d2
MCC
4.. _v4l2-pix-fmt-nv12mt-16x16:
5.. _V4L2-PIX-FMT-NV21M:
5377d91f
MH
6
7***********************************************************************************
8V4L2_PIX_FMT_NV12M ('NM12'), V4L2_PIX_FMT_NV21M ('NM21'), V4L2_PIX_FMT_NV12MT_16X16
9***********************************************************************************
10
11*man V4L2_PIX_FMT_NV12M(2)*
12
13V4L2_PIX_FMT_NV21M
14V4L2_PIX_FMT_NV12MT_16X16
15Variation of ``V4L2_PIX_FMT_NV12`` and ``V4L2_PIX_FMT_NV21`` with planes
16non contiguous in memory.
17
18
19Description
20===========
21
22This is a multi-planar, two-plane version of the YUV 4:2:0 format. The
23three components are separated into two sub-images or planes.
24``V4L2_PIX_FMT_NV12M`` differs from ``V4L2_PIX_FMT_NV12`` in that the
25two planes are non-contiguous in memory, i.e. the chroma plane do not
26necessarily immediately follows the luma plane. The luminance data
27occupies the first plane. The Y plane has one byte per pixel. In the
28second plane there is a chrominance data with alternating chroma
29samples. The CbCr plane is the same width, in bytes, as the Y plane (and
30of the image), but is half as tall in pixels. Each CbCr pair belongs to
eba9e91c
MCC
31four pixels. For example, Cb\ :sub:`0`/Cr\ :sub:`0` belongs to
32Y'\ :sub:`00`, Y'\ :sub:`01`, Y'\ :sub:`10`, Y'\ :sub:`11`.
5377d91f
MH
33``V4L2_PIX_FMT_NV12MT_16X16`` is the tiled version of
34``V4L2_PIX_FMT_NV12M`` with 16x16 macroblock tiles. Here pixels are
35arranged in 16x16 2D tiles and tiles are arranged in linear order in
36memory. ``V4L2_PIX_FMT_NV21M`` is the same as ``V4L2_PIX_FMT_NV12M``
37except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr
38byte.
39
40``V4L2_PIX_FMT_NV12M`` is intended to be used only in drivers and
41applications that support the multi-planar API, described in
42:ref:`planar-apis`.
43
44If the Y plane has pad bytes after each row, then the CbCr plane has as
45many pad bytes after its rows.
46
056d2ee6 47**Byte Order.**
5377d91f
MH
48Each cell is one byte.
49
5377d91f
MH
50.. flat-table::
51 :header-rows: 0
52 :stub-columns: 0
53 :widths: 2 1 1 1 1
54
55
56 - .. row 1
57
58 - start0 + 0:
59
60 - Y'\ :sub:`00`
61
62 - Y'\ :sub:`01`
63
64 - Y'\ :sub:`02`
65
66 - Y'\ :sub:`03`
67
68 - .. row 2
69
70 - start0 + 4:
71
72 - Y'\ :sub:`10`
73
74 - Y'\ :sub:`11`
75
76 - Y'\ :sub:`12`
77
78 - Y'\ :sub:`13`
79
80 - .. row 3
81
82 - start0 + 8:
83
84 - Y'\ :sub:`20`
85
86 - Y'\ :sub:`21`
87
88 - Y'\ :sub:`22`
89
90 - Y'\ :sub:`23`
91
92 - .. row 4
93
94 - start0 + 12:
95
96 - Y'\ :sub:`30`
97
98 - Y'\ :sub:`31`
99
100 - Y'\ :sub:`32`
101
102 - Y'\ :sub:`33`
103
104 - .. row 5
105
0579e6e3 106 -
5377d91f
MH
107
108 - .. row 6
109
110 - start1 + 0:
111
112 - Cb\ :sub:`00`
113
114 - Cr\ :sub:`00`
115
116 - Cb\ :sub:`01`
117
118 - Cr\ :sub:`01`
119
120 - .. row 7
121
122 - start1 + 4:
123
124 - Cb\ :sub:`10`
125
126 - Cr\ :sub:`10`
127
128 - Cb\ :sub:`11`
129
130 - Cr\ :sub:`11`
131
132
133**Color Sample Location..**
134
135
136
137.. flat-table::
138 :header-rows: 0
139 :stub-columns: 0
140
141
142 - .. row 1
143
0579e6e3 144 -
5377d91f
MH
145 - 0
146
0579e6e3 147 -
5377d91f
MH
148 - 1
149
5377d91f
MH
150 - 2
151
0579e6e3 152 -
5377d91f
MH
153 - 3
154
155 - .. row 2
156
157 - 0
158
159 - Y
160
0579e6e3 161 -
5377d91f
MH
162 - Y
163
5377d91f
MH
164 - Y
165
0579e6e3 166 -
5377d91f
MH
167 - Y
168
169 - .. row 3
170
0579e6e3
MCC
171 -
172 -
5377d91f
MH
173 - C
174
0579e6e3
MCC
175 -
176 -
5377d91f
MH
177 - C
178
0579e6e3 179 -
5377d91f
MH
180
181 - .. row 4
182
183 - 1
184
185 - Y
186
0579e6e3 187 -
5377d91f
MH
188 - Y
189
5377d91f
MH
190 - Y
191
0579e6e3 192 -
5377d91f
MH
193 - Y
194
195 - .. row 5
196
0579e6e3 197 -
5377d91f
MH
198
199 - .. row 6
200
201 - 2
202
203 - Y
204
0579e6e3 205 -
5377d91f
MH
206 - Y
207
5377d91f
MH
208 - Y
209
0579e6e3 210 -
5377d91f
MH
211 - Y
212
213 - .. row 7
214
0579e6e3
MCC
215 -
216 -
5377d91f
MH
217 - C
218
0579e6e3
MCC
219 -
220 -
221 -
5377d91f
MH
222 - C
223
0579e6e3 224 -
5377d91f
MH
225
226 - .. row 8
227
228 - 3
229
230 - Y
231
0579e6e3 232 -
5377d91f
MH
233 - Y
234
5377d91f
MH
235 - Y
236
0579e6e3 237 -
5377d91f 238 - Y
This page took 0.050926 seconds and 5 git commands to generate.