3 <refentrytitle>V4L2_PIX_FMT_YVU420 ('YV12'), V4L2_PIX_FMT_YUV420 ('YU12')</refentrytitle>
7 <refname id="V4L2-PIX-FMT-YVU420"><constant>V4L2_PIX_FMT_YVU420</constant></refname>
8 <refname id="V4L2-PIX-FMT-YUV420"><constant>V4L2_PIX_FMT_YUV420</constant></refname>
9 <refpurpose>Planar formats with ½ horizontal and
10 vertical chroma resolution, also known as YUV 4:2:0</refpurpose>
13 <title>Description</title>
15 <para>These are planar formats, as opposed to a packed format.
16 The three components are separated into three sub- images or planes.
17 The Y plane is first. The Y plane has one byte per pixel. For
18 <constant>V4L2_PIX_FMT_YVU420</constant>, the Cr plane immediately
19 follows the Y plane in memory. The Cr plane is half the width and half
20 the height of the Y plane (and of the image). Each Cr belongs to four
21 pixels, a two-by-two square of the image. For example,
22 Cr<subscript>0</subscript> belongs to Y'<subscript>00</subscript>,
23 Y'<subscript>01</subscript>, Y'<subscript>10</subscript>, and
24 Y'<subscript>11</subscript>. Following the Cr plane is the Cb plane,
25 just like the Cr plane. <constant>V4L2_PIX_FMT_YUV420</constant> is
26 the same except the Cb plane comes first, then the Cr plane.</para>
28 <para>If the Y plane has pad bytes after each row, then the Cr
29 and Cb planes have half as many pad bytes after their rows. In other
30 words, two Cx rows (including padding) is exactly as long as one Y row
31 (including padding).</para>
34 <title><constant>V4L2_PIX_FMT_YVU420</constant> 4 × 4
38 <title>Byte Order.</title>
39 <para>Each cell is one byte.
40 <informaltable frame="none">
41 <tgroup cols="5" align="center">
42 <colspec align="left" colwidth="2*" />
45 <entry>start + 0:</entry>
46 <entry>Y'<subscript>00</subscript></entry>
47 <entry>Y'<subscript>01</subscript></entry>
48 <entry>Y'<subscript>02</subscript></entry>
49 <entry>Y'<subscript>03</subscript></entry>
52 <entry>start + 4:</entry>
53 <entry>Y'<subscript>10</subscript></entry>
54 <entry>Y'<subscript>11</subscript></entry>
55 <entry>Y'<subscript>12</subscript></entry>
56 <entry>Y'<subscript>13</subscript></entry>
59 <entry>start + 8:</entry>
60 <entry>Y'<subscript>20</subscript></entry>
61 <entry>Y'<subscript>21</subscript></entry>
62 <entry>Y'<subscript>22</subscript></entry>
63 <entry>Y'<subscript>23</subscript></entry>
66 <entry>start + 12:</entry>
67 <entry>Y'<subscript>30</subscript></entry>
68 <entry>Y'<subscript>31</subscript></entry>
69 <entry>Y'<subscript>32</subscript></entry>
70 <entry>Y'<subscript>33</subscript></entry>
73 <entry>start + 16:</entry>
74 <entry>Cr<subscript>00</subscript></entry>
75 <entry>Cr<subscript>01</subscript></entry>
78 <entry>start + 18:</entry>
79 <entry>Cr<subscript>10</subscript></entry>
80 <entry>Cr<subscript>11</subscript></entry>
83 <entry>start + 20:</entry>
84 <entry>Cb<subscript>00</subscript></entry>
85 <entry>Cb<subscript>01</subscript></entry>
88 <entry>start + 22:</entry>
89 <entry>Cb<subscript>10</subscript></entry>
90 <entry>Cb<subscript>11</subscript></entry>
99 <title>Color Sample Location.</title>
101 <informaltable frame="none">
102 <tgroup cols="7" align="center">
106 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
107 <entry>2</entry><entry></entry><entry>3</entry>
111 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
112 <entry>Y</entry><entry></entry><entry>Y</entry>
116 <entry></entry><entry>C</entry><entry></entry><entry></entry>
117 <entry></entry><entry>C</entry><entry></entry>
121 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
122 <entry>Y</entry><entry></entry><entry>Y</entry>
129 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
130 <entry>Y</entry><entry></entry><entry>Y</entry>
134 <entry></entry><entry>C</entry><entry></entry><entry></entry>
135 <entry></entry><entry>C</entry><entry></entry>
139 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
140 <entry>Y</entry><entry></entry><entry>Y</entry>
154 sgml-parent-document: "pixfmt.sgml"
155 indent-tabs-mode: nil