Merge tag 'pci-v4.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[deliverable/linux.git] / Documentation / media / uapi / v4l / pixfmt-yuv420m.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _V4L2-PIX-FMT-YUV420M:
9aff73d2 4.. _v4l2-pix-fmt-yvu420m:
5377d91f
MH
5
6************************************************************
7V4L2_PIX_FMT_YUV420M ('YM12'), V4L2_PIX_FMT_YVU420M ('YM21')
8************************************************************
9
10*man V4L2_PIX_FMT_YUV420M(2)*
11
12V4L2_PIX_FMT_YVU420M
13Variation of ``V4L2_PIX_FMT_YUV420`` and ``V4L2_PIX_FMT_YVU420`` with
14planes non contiguous in memory.
15
16
17Description
18===========
19
20This is a multi-planar format, as opposed to a packed format. The three
21components are separated into three sub-images or planes.
22
23The Y plane is first. The Y plane has one byte per pixel. For
24``V4L2_PIX_FMT_YUV420M`` the Cb data constitutes the second plane which
25is half the width and half the height of the Y plane (and of the image).
26Each Cb belongs to four pixels, a two-by-two square of the image. For
27example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
28Y'\ :sub:`10`, and Y'\ :sub:`11`. The Cr data, just like the Cb plane,
29is in the third plane.
30
31``V4L2_PIX_FMT_YVU420M`` is the same except the Cr data is stored in the
32second plane and the Cb data in the third plane.
33
34If the Y plane has pad bytes after each row, then the Cb and Cr planes
35have half as many pad bytes after their rows. In other words, two Cx
36rows (including padding) is exactly as long as one Y row (including
37padding).
38
39``V4L2_PIX_FMT_YUV420M`` and ``V4L2_PIX_FMT_YVU420M`` are intended to be
40used only in drivers and applications that support the multi-planar API,
41described in :ref:`planar-apis`.
42
056d2ee6 43**Byte Order.**
5377d91f
MH
44Each cell is one byte.
45
46
47
48.. flat-table::
49 :header-rows: 0
50 :stub-columns: 0
51 :widths: 2 1 1 1 1
52
53
54 - .. row 1
55
56 - start0 + 0:
57
58 - Y'\ :sub:`00`
59
60 - Y'\ :sub:`01`
61
62 - Y'\ :sub:`02`
63
64 - Y'\ :sub:`03`
65
66 - .. row 2
67
68 - start0 + 4:
69
70 - Y'\ :sub:`10`
71
72 - Y'\ :sub:`11`
73
74 - Y'\ :sub:`12`
75
76 - Y'\ :sub:`13`
77
78 - .. row 3
79
80 - start0 + 8:
81
82 - Y'\ :sub:`20`
83
84 - Y'\ :sub:`21`
85
86 - Y'\ :sub:`22`
87
88 - Y'\ :sub:`23`
89
90 - .. row 4
91
92 - start0 + 12:
93
94 - Y'\ :sub:`30`
95
96 - Y'\ :sub:`31`
97
98 - Y'\ :sub:`32`
99
100 - Y'\ :sub:`33`
101
102 - .. row 5
103
0579e6e3 104 -
5377d91f
MH
105
106 - .. row 6
107
108 - start1 + 0:
109
110 - Cb\ :sub:`00`
111
112 - Cb\ :sub:`01`
113
114 - .. row 7
115
116 - start1 + 2:
117
118 - Cb\ :sub:`10`
119
120 - Cb\ :sub:`11`
121
122 - .. row 8
123
0579e6e3 124 -
5377d91f
MH
125
126 - .. row 9
127
128 - start2 + 0:
129
130 - Cr\ :sub:`00`
131
132 - Cr\ :sub:`01`
133
134 - .. row 10
135
136 - start2 + 2:
137
138 - Cr\ :sub:`10`
139
140 - Cr\ :sub:`11`
141
142
143**Color Sample Location..**
144
145
146
147.. flat-table::
148 :header-rows: 0
149 :stub-columns: 0
150
151
152 - .. row 1
153
0579e6e3 154 -
5377d91f
MH
155 - 0
156
0579e6e3 157 -
5377d91f
MH
158 - 1
159
0579e6e3 160 -
5377d91f
MH
161 - 2
162
0579e6e3 163 -
5377d91f
MH
164 - 3
165
166 - .. row 2
167
168 - 0
169
170 - Y
171
0579e6e3 172 -
5377d91f
MH
173 - Y
174
0579e6e3 175 -
5377d91f
MH
176 - Y
177
0579e6e3 178 -
5377d91f
MH
179 - Y
180
181 - .. row 3
182
0579e6e3
MCC
183 -
184 -
5377d91f
MH
185 - C
186
0579e6e3
MCC
187 -
188 -
189 -
5377d91f
MH
190 - C
191
0579e6e3 192 -
5377d91f
MH
193
194 - .. row 4
195
196 - 1
197
198 - Y
199
0579e6e3 200 -
5377d91f
MH
201 - Y
202
0579e6e3 203 -
5377d91f
MH
204 - Y
205
0579e6e3 206 -
5377d91f
MH
207 - Y
208
209 - .. row 5
210
0579e6e3 211 -
5377d91f
MH
212
213 - .. row 6
214
215 - 2
216
217 - Y
218
0579e6e3 219 -
5377d91f
MH
220 - Y
221
0579e6e3 222 -
5377d91f
MH
223 - Y
224
0579e6e3 225 -
5377d91f
MH
226 - Y
227
228 - .. row 7
229
0579e6e3
MCC
230 -
231 -
5377d91f
MH
232 - C
233
0579e6e3
MCC
234 -
235 -
236 -
5377d91f
MH
237 - C
238
0579e6e3 239 -
5377d91f
MH
240
241 - .. row 8
242
243 - 3
244
245 - Y
246
0579e6e3 247 -
5377d91f
MH
248 - Y
249
0579e6e3 250 -
5377d91f
MH
251 - Y
252
0579e6e3 253 -
5377d91f 254 - Y
This page took 0.055401 seconds and 5 git commands to generate.