doc-rst: standard: read the example captions
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / pixfmt-nv12.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-NV12:
4
5 ******************************************************
6 V4L2_PIX_FMT_NV12 ('NV12'), V4L2_PIX_FMT_NV21 ('NV21')
7 ******************************************************
8
9 *man V4L2_PIX_FMT_NV12(2)*
10
11 V4L2_PIX_FMT_NV21
12 Formats with ½ horizontal and vertical chroma resolution, also known as
13 YUV 4:2:0. One luminance and one chrominance plane with alternating
14 chroma samples as opposed to ``V4L2_PIX_FMT_YVU420``
15
16
17 Description
18 ===========
19
20 These are two-plane versions of the YUV 4:2:0 format. The three
21 components are separated into two sub-images or planes. The Y plane is
22 first. The Y plane has one byte per pixel. For ``V4L2_PIX_FMT_NV12``, a
23 combined CbCr plane immediately follows the Y plane in memory. The CbCr
24 plane is the same width, in bytes, as the Y plane (and of the image),
25 but is half as tall in pixels. Each CbCr pair belongs to four pixels.
26 For example, Cb\ :sub:`0`/Cr:sub:`0` belongs to Y'\ :sub:`00`,
27 Y'\ :sub:`01`, Y'\ :sub:`10`, Y'\ :sub:`11`. ``V4L2_PIX_FMT_NV21`` is
28 the same except the Cb and Cr bytes are swapped, the CrCb plane starts
29 with a Cr byte.
30
31 If the Y plane has pad bytes after each row, then the CbCr plane has as
32 many pad bytes after its rows.
33
34 **Byte Order..**
35
36 Each cell is one byte.
37
38
39
40 .. flat-table::
41 :header-rows: 0
42 :stub-columns: 0
43 :widths: 2 1 1 1 1
44
45
46 - .. row 1
47
48 - start + 0:
49
50 - Y'\ :sub:`00`
51
52 - Y'\ :sub:`01`
53
54 - Y'\ :sub:`02`
55
56 - Y'\ :sub:`03`
57
58 - .. row 2
59
60 - start + 4:
61
62 - Y'\ :sub:`10`
63
64 - Y'\ :sub:`11`
65
66 - Y'\ :sub:`12`
67
68 - Y'\ :sub:`13`
69
70 - .. row 3
71
72 - start + 8:
73
74 - Y'\ :sub:`20`
75
76 - Y'\ :sub:`21`
77
78 - Y'\ :sub:`22`
79
80 - Y'\ :sub:`23`
81
82 - .. row 4
83
84 - start + 12:
85
86 - Y'\ :sub:`30`
87
88 - Y'\ :sub:`31`
89
90 - Y'\ :sub:`32`
91
92 - Y'\ :sub:`33`
93
94 - .. row 5
95
96 - start + 16:
97
98 - Cb\ :sub:`00`
99
100 - Cr\ :sub:`00`
101
102 - Cb\ :sub:`01`
103
104 - Cr\ :sub:`01`
105
106 - .. row 6
107
108 - start + 20:
109
110 - Cb\ :sub:`10`
111
112 - Cr\ :sub:`10`
113
114 - Cb\ :sub:`11`
115
116 - Cr\ :sub:`11`
117
118
119 **Color Sample Location..**
120
121
122
123 .. flat-table::
124 :header-rows: 0
125 :stub-columns: 0
126
127
128 - .. row 1
129
130 -
131 - 0
132
133 -
134 - 1
135
136 -
137 - 2
138
139 -
140 - 3
141
142 - .. row 2
143
144 - 0
145
146 - Y
147
148 -
149 - Y
150
151 -
152 - Y
153
154 -
155 - Y
156
157 - .. row 3
158
159 -
160 -
161 - C
162
163 -
164 -
165 -
166 - C
167
168 -
169
170 - .. row 4
171
172 - 1
173
174 - Y
175
176 -
177 - Y
178
179 -
180 - Y
181
182 -
183 - Y
184
185 - .. row 5
186
187 -
188
189 - .. row 6
190
191 - 2
192
193 - Y
194
195 -
196 - Y
197
198 -
199 - Y
200
201 -
202 - Y
203
204 - .. row 7
205
206 -
207 -
208 - C
209
210 -
211 -
212 -
213 - C
214
215 -
216
217 - .. row 8
218
219 - 3
220
221 - Y
222
223 -
224 - Y
225
226 -
227 - Y
228
229 -
230 - Y
231
232
233
234
235 .. ------------------------------------------------------------------------------
236 .. This file was automatically converted from DocBook-XML with the dbxml
237 .. library (https://github.com/return42/sphkerneldoc). The origin XML comes
238 .. from the linux kernel, refer to:
239 ..
240 .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
241 .. ------------------------------------------------------------------------------
This page took 0.045313 seconds and 5 git commands to generate.