cgroup: Fix memory leak when parsing multiple source parameters
[linux-2.6-microblaze.git] / Documentation / userspace-api / media / v4l / pixfmt-yuv420m.rst
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _V4L2-PIX-FMT-YUV420M:
4 .. _v4l2-pix-fmt-yvu420m:
5
6 ************************************************************
7 V4L2_PIX_FMT_YUV420M ('YM12'), V4L2_PIX_FMT_YVU420M ('YM21')
8 ************************************************************
9
10
11 V4L2_PIX_FMT_YVU420M
12 Variation of ``V4L2_PIX_FMT_YUV420`` and ``V4L2_PIX_FMT_YVU420`` with
13 planes non contiguous in memory.
14
15
16 Description
17 ===========
18
19 This is a multi-planar format, as opposed to a packed format. The three
20 components are separated into three sub-images or planes.
21
22 The Y plane is first. The Y plane has one byte per pixel. For
23 ``V4L2_PIX_FMT_YUV420M`` the Cb data constitutes the second plane which
24 is half the width and half the height of the Y plane (and of the image).
25 Each Cb belongs to four pixels, a two-by-two square of the image. For
26 example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
27 Y'\ :sub:`10`, and Y'\ :sub:`11`. The Cr data, just like the Cb plane,
28 is in the third plane.
29
30 ``V4L2_PIX_FMT_YVU420M`` is the same except the Cr data is stored in the
31 second plane and the Cb data in the third plane.
32
33 If the Y plane has pad bytes after each row, then the Cb and Cr planes
34 have half as many pad bytes after their rows. In other words, two Cx
35 rows (including padding) is exactly as long as one Y row (including
36 padding).
37
38 ``V4L2_PIX_FMT_YUV420M`` and ``V4L2_PIX_FMT_YVU420M`` are intended to be
39 used only in drivers and applications that support the multi-planar API,
40 described in :ref:`planar-apis`.
41
42 **Byte Order.**
43 Each cell is one byte.
44
45
46
47
48 .. flat-table::
49     :header-rows:  0
50     :stub-columns: 0
51
52     * - start0 + 0:
53       - Y'\ :sub:`00`
54       - Y'\ :sub:`01`
55       - Y'\ :sub:`02`
56       - Y'\ :sub:`03`
57     * - start0 + 4:
58       - Y'\ :sub:`10`
59       - Y'\ :sub:`11`
60       - Y'\ :sub:`12`
61       - Y'\ :sub:`13`
62     * - start0 + 8:
63       - Y'\ :sub:`20`
64       - Y'\ :sub:`21`
65       - Y'\ :sub:`22`
66       - Y'\ :sub:`23`
67     * - start0 + 12:
68       - Y'\ :sub:`30`
69       - Y'\ :sub:`31`
70       - Y'\ :sub:`32`
71       - Y'\ :sub:`33`
72     * -
73     * - start1 + 0:
74       - Cb\ :sub:`00`
75       - Cb\ :sub:`01`
76     * - start1 + 2:
77       - Cb\ :sub:`10`
78       - Cb\ :sub:`11`
79     * -
80     * - start2 + 0:
81       - Cr\ :sub:`00`
82       - Cr\ :sub:`01`
83     * - start2 + 2:
84       - Cr\ :sub:`10`
85       - Cr\ :sub:`11`
86
87
88 **Color Sample Location:**
89
90
91
92 .. flat-table::
93     :header-rows:  0
94     :stub-columns: 0
95
96     * -
97       - 0
98       -
99       - 1
100       -
101       - 2
102       -
103       - 3
104     * - 0
105       - Y
106       -
107       - Y
108       -
109       - Y
110       -
111       - Y
112     * -
113       -
114       - C
115       -
116       -
117       -
118       - C
119       -
120     * - 1
121       - Y
122       -
123       - Y
124       -
125       - Y
126       -
127       - Y
128     * -
129     * - 2
130       - Y
131       -
132       - Y
133       -
134       - Y
135       -
136       - Y
137     * -
138       -
139       - C
140       -
141       -
142       -
143       - C
144       -
145     * - 3
146       - Y
147       -
148       - Y
149       -
150       - Y
151       -
152       - Y