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