Commit | Line | Data |
---|---|---|
5377d91f MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | .. _V4L2-PIX-FMT-YVU420: | |
ac4141ce | 4 | .. _V4L2-PIX-FMT-YUV420: |
5377d91f MH |
5 | |
6 | ********************************************************** | |
7 | V4L2_PIX_FMT_YVU420 ('YV12'), V4L2_PIX_FMT_YUV420 ('YU12') | |
8 | ********************************************************** | |
9 | ||
10 | *man V4L2_PIX_FMT_YVU420(2)* | |
11 | ||
12 | V4L2_PIX_FMT_YUV420 | |
13 | Planar formats with ½ horizontal and vertical chroma resolution, also | |
14 | known as YUV 4:2:0 | |
15 | ||
16 | ||
17 | Description | |
18 | =========== | |
19 | ||
20 | These are planar formats, as opposed to a packed format. The three | |
21 | components are separated into three sub- images or planes. The Y plane | |
22 | is first. The Y plane has one byte per pixel. For | |
23 | ``V4L2_PIX_FMT_YVU420``, the Cr plane immediately follows the Y plane in | |
24 | memory. The Cr plane is half the width and half the height of the Y | |
25 | plane (and of the image). Each Cr belongs to four pixels, a two-by-two | |
26 | square of the image. For example, Cr\ :sub:`0` belongs to Y'\ :sub:`00`, | |
27 | Y'\ :sub:`01`, Y'\ :sub:`10`, and Y'\ :sub:`11`. Following the Cr plane | |
28 | is the Cb plane, just like the Cr plane. ``V4L2_PIX_FMT_YUV420`` is the | |
29 | same except the Cb plane comes first, then the Cr plane. | |
30 | ||
31 | If the Y plane has pad bytes after each row, then the Cr and Cb planes | |
32 | have half as many pad bytes after their rows. In other words, two Cx | |
33 | rows (including padding) is exactly as long as one Y row (including | |
34 | padding). | |
35 | ||
36 | **Byte Order..** | |
37 | ||
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 | - start + 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 | - start + 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 | - start + 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 | - start + 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 | - start + 16: | |
99 | ||
100 | - Cr\ :sub:`00` | |
101 | ||
102 | - Cr\ :sub:`01` | |
103 | ||
104 | - .. row 6 | |
105 | ||
106 | - start + 18: | |
107 | ||
108 | - Cr\ :sub:`10` | |
109 | ||
110 | - Cr\ :sub:`11` | |
111 | ||
112 | - .. row 7 | |
113 | ||
114 | - start + 20: | |
115 | ||
116 | - Cb\ :sub:`00` | |
117 | ||
118 | - Cb\ :sub:`01` | |
119 | ||
120 | - .. row 8 | |
121 | ||
122 | - start + 22: | |
123 | ||
124 | - Cb\ :sub:`10` | |
125 | ||
126 | - Cb\ :sub:`11` | |
127 | ||
128 | ||
129 | **Color Sample Location..** | |
130 | ||
131 | ||
132 | ||
133 | .. flat-table:: | |
134 | :header-rows: 0 | |
135 | :stub-columns: 0 | |
136 | ||
137 | ||
138 | - .. row 1 | |
139 | ||
140 | - | |
141 | - 0 | |
142 | ||
143 | - | |
144 | - 1 | |
145 | ||
146 | - | |
147 | - 2 | |
148 | ||
149 | - | |
150 | - 3 | |
151 | ||
152 | - .. row 2 | |
153 | ||
154 | - 0 | |
155 | ||
156 | - Y | |
157 | ||
158 | - | |
159 | - Y | |
160 | ||
161 | - | |
162 | - Y | |
163 | ||
164 | - | |
165 | - Y | |
166 | ||
167 | - .. row 3 | |
168 | ||
169 | - | |
170 | - | |
171 | - C | |
172 | ||
173 | - | |
174 | - | |
175 | - | |
176 | - C | |
177 | ||
178 | - | |
179 | ||
180 | - .. row 4 | |
181 | ||
182 | - 1 | |
183 | ||
184 | - Y | |
185 | ||
186 | - | |
187 | - Y | |
188 | ||
189 | - | |
190 | - Y | |
191 | ||
192 | - | |
193 | - Y | |
194 | ||
195 | - .. row 5 | |
196 | ||
197 | - | |
198 | ||
199 | - .. row 6 | |
200 | ||
201 | - 2 | |
202 | ||
203 | - Y | |
204 | ||
205 | - | |
206 | - Y | |
207 | ||
208 | - | |
209 | - Y | |
210 | ||
211 | - | |
212 | - Y | |
213 | ||
214 | - .. row 7 | |
215 | ||
216 | - | |
217 | - | |
218 | - C | |
219 | ||
220 | - | |
221 | - | |
222 | - | |
223 | - C | |
224 | ||
225 | - | |
226 | ||
227 | - .. row 8 | |
228 | ||
229 | - 3 | |
230 | ||
231 | - Y | |
232 | ||
233 | - | |
234 | - Y | |
235 | ||
236 | - | |
237 | - Y | |
238 | ||
239 | - | |
240 | - Y | |
241 | ||
242 | ||
243 | ||
244 | ||
245 | .. ------------------------------------------------------------------------------ | |
246 | .. This file was automatically converted from DocBook-XML with the dbxml | |
247 | .. library (https://github.com/return42/sphkerneldoc). The origin XML comes | |
248 | .. from the linux kernel, refer to: | |
249 | .. | |
250 | .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook | |
251 | .. ------------------------------------------------------------------------------ |