1    <refentry id="V4L2-PIX-FMT-M420">
2      <refmeta>
3	<refentrytitle>V4L2_PIX_FMT_M420 ('M420')</refentrytitle>
4	&manvol;
5      </refmeta>
6      <refnamediv>
7	<refname><constant>V4L2_PIX_FMT_M420</constant></refname>
8	<refpurpose>Format with &frac12; horizontal and vertical chroma
9	resolution, also known as YUV 4:2:0. Hybrid plane line-interleaved
10	layout.</refpurpose>
11      </refnamediv>
12      <refsect1>
13	<title>Description</title>
14
15	<para>M420 is a YUV format with &frac12; horizontal and vertical chroma
16	subsampling (YUV 4:2:0). Pixels are organized as interleaved luma and
17	chroma planes. Two lines of luma data are followed by one line of chroma
18	data.</para>
19	<para>The luma plane has one byte per pixel. The chroma plane contains
20	interleaved CbCr pixels subsampled by &frac12; in the horizontal and
21	vertical directions. Each CbCr pair belongs to four pixels. For example,
22Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
23Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
24Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.</para>
25
26	<para>All line lengths are identical: if the Y lines include pad bytes
27	so do the CbCr lines.</para>
28
29	<example>
30	  <title><constant>V4L2_PIX_FMT_M420</constant> 4 &times; 4
31pixel image</title>
32
33	  <formalpara>
34	    <title>Byte Order.</title>
35	    <para>Each cell is one byte.
36		<informaltable frame="none">
37		<tgroup cols="5" align="center">
38		  <colspec align="left" colwidth="2*" />
39		  <tbody valign="top">
40		    <row>
41		      <entry>start&nbsp;+&nbsp;0:</entry>
42		      <entry>Y'<subscript>00</subscript></entry>
43		      <entry>Y'<subscript>01</subscript></entry>
44		      <entry>Y'<subscript>02</subscript></entry>
45		      <entry>Y'<subscript>03</subscript></entry>
46		    </row>
47		    <row>
48		      <entry>start&nbsp;+&nbsp;4:</entry>
49		      <entry>Y'<subscript>10</subscript></entry>
50		      <entry>Y'<subscript>11</subscript></entry>
51		      <entry>Y'<subscript>12</subscript></entry>
52		      <entry>Y'<subscript>13</subscript></entry>
53		    </row>
54		    <row>
55		      <entry>start&nbsp;+&nbsp;8:</entry>
56		      <entry>Cb<subscript>00</subscript></entry>
57		      <entry>Cr<subscript>00</subscript></entry>
58		      <entry>Cb<subscript>01</subscript></entry>
59		      <entry>Cr<subscript>01</subscript></entry>
60		    </row>
61		    <row>
62		      <entry>start&nbsp;+&nbsp;16:</entry>
63		      <entry>Y'<subscript>20</subscript></entry>
64		      <entry>Y'<subscript>21</subscript></entry>
65		      <entry>Y'<subscript>22</subscript></entry>
66		      <entry>Y'<subscript>23</subscript></entry>
67		    </row>
68		    <row>
69		      <entry>start&nbsp;+&nbsp;20:</entry>
70		      <entry>Y'<subscript>30</subscript></entry>
71		      <entry>Y'<subscript>31</subscript></entry>
72		      <entry>Y'<subscript>32</subscript></entry>
73		      <entry>Y'<subscript>33</subscript></entry>
74		    </row>
75		    <row>
76		      <entry>start&nbsp;+&nbsp;24:</entry>
77		      <entry>Cb<subscript>10</subscript></entry>
78		      <entry>Cr<subscript>10</subscript></entry>
79		      <entry>Cb<subscript>11</subscript></entry>
80		      <entry>Cr<subscript>11</subscript></entry>
81		    </row>
82		  </tbody>
83		</tgroup>
84		</informaltable>
85	      </para>
86	  </formalpara>
87
88	  <formalpara>
89	    <title>Color Sample Location.</title>
90	    <para>
91		<informaltable frame="none">
92		<tgroup cols="7" align="center">
93		  <tbody valign="top">
94		    <row>
95		      <entry></entry>
96		      <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
97		      <entry>2</entry><entry></entry><entry>3</entry>
98		    </row>
99		    <row>
100		      <entry>0</entry>
101		      <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
102		      <entry>Y</entry><entry></entry><entry>Y</entry>
103		    </row>
104		    <row>
105		      <entry></entry>
106		      <entry></entry><entry>C</entry><entry></entry><entry></entry>
107		      <entry></entry><entry>C</entry><entry></entry>
108		    </row>
109		    <row>
110		      <entry>1</entry>
111		      <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
112		      <entry>Y</entry><entry></entry><entry>Y</entry>
113		    </row>
114		    <row>
115		      <entry></entry>
116		    </row>
117		    <row>
118		      <entry>2</entry>
119		      <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
120		      <entry>Y</entry><entry></entry><entry>Y</entry>
121		    </row>
122		    <row>
123		      <entry></entry>
124		      <entry></entry><entry>C</entry><entry></entry><entry></entry>
125		      <entry></entry><entry>C</entry><entry></entry>
126		    </row>
127		    <row>
128		      <entry>3</entry>
129		      <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
130		      <entry>Y</entry><entry></entry><entry>Y</entry>
131		    </row>
132		  </tbody>
133		</tgroup>
134		</informaltable>
135	      </para>
136	  </formalpara>
137	</example>
138      </refsect1>
139    </refentry>
140