Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-yuv422m.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _V4L2-PIX-FMT-YUV422M:
11 .. _v4l2-pix-fmt-yvu422m:
12
13 ************************************************************
14 V4L2_PIX_FMT_YUV422M ('YM16'), V4L2_PIX_FMT_YVU422M ('YM61')
15 ************************************************************
16
17
18 V4L2_PIX_FMT_YVU422M
19 Planar formats with ½ horizontal resolution, also known as YUV and YVU
20 4:2:2
21
22
23 Description
24 ===========
25
26 This is a multi-planar format, as opposed to a packed format. The three
27 components are separated into three sub-images or planes.
28
29 The Y plane is first. The Y plane has one byte per pixel. For
30 ``V4L2_PIX_FMT_YUV422M`` the Cb data constitutes the second plane which
31 is half the width of the Y plane (and of the image). Each Cb belongs to
32 two pixels. For example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`,
33 Y'\ :sub:`01`. The Cr data, just like the Cb plane, is in the third
34 plane.
35
36 ``V4L2_PIX_FMT_YVU422M`` is the same except the Cr data is stored in the
37 second plane and the Cb data in the third plane.
38
39 If the Y plane has pad bytes after each row, then the Cb and Cr planes
40 have half as many pad bytes after their rows. In other words, two Cx
41 rows (including padding) is exactly as long as one Y row (including
42 padding).
43
44 ``V4L2_PIX_FMT_YUV422M`` and ``V4L2_PIX_FMT_YVU422M`` are intended to be
45 used only in drivers and applications that support the multi-planar API,
46 described in :ref:`planar-apis`.
47
48 **Byte Order.**
49 Each cell is one byte.
50
51
52
53
54 .. flat-table::
55     :header-rows:  0
56     :stub-columns: 0
57
58     * - start0 + 0:
59       - Y'\ :sub:`00`
60       - Y'\ :sub:`01`
61       - Y'\ :sub:`02`
62       - Y'\ :sub:`03`
63     * - start0 + 4:
64       - Y'\ :sub:`10`
65       - Y'\ :sub:`11`
66       - Y'\ :sub:`12`
67       - Y'\ :sub:`13`
68     * - start0 + 8:
69       - Y'\ :sub:`20`
70       - Y'\ :sub:`21`
71       - Y'\ :sub:`22`
72       - Y'\ :sub:`23`
73     * - start0 + 12:
74       - Y'\ :sub:`30`
75       - Y'\ :sub:`31`
76       - Y'\ :sub:`32`
77       - Y'\ :sub:`33`
78     * -
79     * - start1 + 0:
80       - Cb\ :sub:`00`
81       - Cb\ :sub:`01`
82     * - start1 + 2:
83       - Cb\ :sub:`10`
84       - Cb\ :sub:`11`
85     * - start1 + 4:
86       - Cb\ :sub:`20`
87       - Cb\ :sub:`21`
88     * - start1 + 6:
89       - Cb\ :sub:`30`
90       - Cb\ :sub:`31`
91     * -
92     * - start2 + 0:
93       - Cr\ :sub:`00`
94       - Cr\ :sub:`01`
95     * - start2 + 2:
96       - Cr\ :sub:`10`
97       - Cr\ :sub:`11`
98     * - start2 + 4:
99       - Cr\ :sub:`20`
100       - Cr\ :sub:`21`
101     * - start2 + 6:
102       - Cr\ :sub:`30`
103       - Cr\ :sub:`31`
104
105
106 **Color Sample Location:**
107
108
109
110 .. flat-table::
111     :header-rows:  0
112     :stub-columns: 0
113
114     * -
115       - 0
116       -
117       - 1
118       - 2
119       -
120       - 3
121     * - 0
122       - Y
123       - C
124       - Y
125       - Y
126       - C
127       - Y
128     * - 1
129       - Y
130       - C
131       - Y
132       - Y
133       - C
134       - Y
135     * - 2
136       - Y
137       - C
138       - Y
139       - Y
140       - C
141       - Y
142     * - 3
143       - Y
144       - C
145       - Y
146       - Y
147       - C
148       - Y