About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / media / v4l / pixfmt-yuv422m.xml


Based on kernel version 4.7.2. Page generated on 2016-08-22 22:45 EST.

1	    <refentry>
2	      <refmeta>
3		<refentrytitle>V4L2_PIX_FMT_YUV422M ('YM16'), V4L2_PIX_FMT_YVU422M ('YM61')</refentrytitle>
4		&manvol;
5	      </refmeta>
6	      <refnamediv>
7		<refname id="V4L2-PIX-FMT-YUV422M"><constant>V4L2_PIX_FMT_YUV422M</constant></refname>
8		<refname id="V4L2-PIX-FMT-YVU422M"><constant>V4L2_PIX_FMT_YVU422M</constant></refname>
9		<refpurpose>Planar formats with &frac12; horizontal resolution, also
10		known as YUV and YVU 4:2:2</refpurpose>
11	      </refnamediv>
12	
13	      <refsect1>
14		<title>Description</title>
15	
16		<para>This is a multi-planar format, as opposed to a packed format.
17	The three components are separated into three sub-images or planes.</para>
18	
19		<para>The Y plane is first. The Y plane has one byte per pixel.
20	For <constant>V4L2_PIX_FMT_YUV422M</constant> the Cb data
21	constitutes the second plane which is half the width of the Y plane (and of the
22	image). Each Cb belongs to two pixels. For example,
23	Cb<subscript>0</subscript> belongs to Y'<subscript>00</subscript>,
24	Y'<subscript>01</subscript>. The Cr data, just like the Cb plane, is
25	in the third plane. </para>
26	
27		<para><constant>V4L2_PIX_FMT_YVU422M</constant> is the same except
28	the Cr data is stored in the second plane and the Cb data in the third plane.
29	</para>
30	
31		<para>If the Y plane has pad bytes after each row, then the Cb
32	and Cr planes have half as many pad bytes after their rows. In other
33	words, two Cx rows (including padding) is exactly as long as one Y row
34	(including padding).</para>
35	
36		<para><constant>V4L2_PIX_FMT_YUV422M</constant> and
37	<constant>V4L2_PIX_FMT_YVU422M</constant> are intended to be
38	used only in drivers and applications that support the multi-planar API,
39	described in <xref linkend="planar-apis"/>. </para>
40	
41		<example>
42		  <title><constant>V4L2_PIX_FMT_YUV422M</constant> 4 &times; 4
43	pixel image</title>
44	
45		  <formalpara>
46		    <title>Byte Order.</title>
47		    <para>Each cell is one byte.
48			<informaltable frame="none">
49			<tgroup cols="5" align="center">
50			  <colspec align="left" colwidth="2*" />
51			  <tbody valign="top">
52			    <row>
53			      <entry>start0&nbsp;+&nbsp;0:</entry>
54			      <entry>Y'<subscript>00</subscript></entry>
55			      <entry>Y'<subscript>01</subscript></entry>
56			      <entry>Y'<subscript>02</subscript></entry>
57			      <entry>Y'<subscript>03</subscript></entry>
58			    </row>
59			    <row>
60			      <entry>start0&nbsp;+&nbsp;4:</entry>
61			      <entry>Y'<subscript>10</subscript></entry>
62			      <entry>Y'<subscript>11</subscript></entry>
63			      <entry>Y'<subscript>12</subscript></entry>
64			      <entry>Y'<subscript>13</subscript></entry>
65			    </row>
66			    <row>
67			      <entry>start0&nbsp;+&nbsp;8:</entry>
68			      <entry>Y'<subscript>20</subscript></entry>
69			      <entry>Y'<subscript>21</subscript></entry>
70			      <entry>Y'<subscript>22</subscript></entry>
71			      <entry>Y'<subscript>23</subscript></entry>
72			    </row>
73			    <row>
74			      <entry>start0&nbsp;+&nbsp;12:</entry>
75			      <entry>Y'<subscript>30</subscript></entry>
76			      <entry>Y'<subscript>31</subscript></entry>
77			      <entry>Y'<subscript>32</subscript></entry>
78			      <entry>Y'<subscript>33</subscript></entry>
79			    </row>
80			    <row><entry></entry></row>
81			    <row>
82			      <entry>start1&nbsp;+&nbsp;0:</entry>
83			      <entry>Cb<subscript>00</subscript></entry>
84			      <entry>Cb<subscript>01</subscript></entry>
85			    </row>
86			    <row>
87			      <entry>start1&nbsp;+&nbsp;2:</entry>
88			      <entry>Cb<subscript>10</subscript></entry>
89			      <entry>Cb<subscript>11</subscript></entry>
90			    </row>
91			    <row>
92			      <entry>start1&nbsp;+&nbsp;4:</entry>
93			      <entry>Cb<subscript>20</subscript></entry>
94			      <entry>Cb<subscript>21</subscript></entry>
95			    </row>
96			    <row>
97			      <entry>start1&nbsp;+&nbsp;6:</entry>
98			      <entry>Cb<subscript>30</subscript></entry>
99			      <entry>Cb<subscript>31</subscript></entry>
100			    </row>
101			    <row><entry></entry></row>
102			    <row>
103			      <entry>start2&nbsp;+&nbsp;0:</entry>
104			      <entry>Cr<subscript>00</subscript></entry>
105			      <entry>Cr<subscript>01</subscript></entry>
106			    </row>
107			    <row>
108			      <entry>start2&nbsp;+&nbsp;2:</entry>
109			      <entry>Cr<subscript>10</subscript></entry>
110			      <entry>Cr<subscript>11</subscript></entry>
111			    </row>
112			    <row>
113			      <entry>start2&nbsp;+&nbsp;4:</entry>
114			      <entry>Cr<subscript>20</subscript></entry>
115			      <entry>Cr<subscript>21</subscript></entry>
116			    </row>
117			    <row>
118			      <entry>start2&nbsp;+&nbsp;6:</entry>
119			      <entry>Cr<subscript>30</subscript></entry>
120			      <entry>Cr<subscript>31</subscript></entry>
121			    </row>
122			  </tbody>
123			</tgroup>
124			</informaltable>
125		      </para>
126		  </formalpara>
127	
128		  <formalpara>
129		    <title>Color Sample Location.</title>
130		    <para>
131			<informaltable frame="none">
132			<tgroup cols="7" align="center">
133			  <tbody valign="top">
134			    <row>
135			      <entry></entry>
136			      <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
137			      <entry>2</entry><entry></entry><entry>3</entry>
138			    </row>
139			    <row>
140			      <entry>0</entry>
141			      <entry>Y</entry><entry>C</entry><entry>Y</entry><entry></entry>
142			      <entry>Y</entry><entry>C</entry><entry>Y</entry>
143			    </row>
144			    <row>
145			      <entry>1</entry>
146			      <entry>Y</entry><entry>C</entry><entry>Y</entry><entry></entry>
147			      <entry>Y</entry><entry>C</entry><entry>Y</entry>
148			    </row>
149			    <row>
150			      <entry>2</entry>
151			      <entry>Y</entry><entry>C</entry><entry>Y</entry><entry></entry>
152			      <entry>Y</entry><entry>C</entry><entry>Y</entry>
153			    </row>
154			    <row>
155			      <entry>3</entry>
156			      <entry>Y</entry><entry>C</entry><entry>Y</entry><entry></entry>
157			      <entry>Y</entry><entry>C</entry><entry>Y</entry>
158			    </row>
159			  </tbody>
160			</tgroup>
161			</informaltable>
162		      </para>
163		  </formalpara>
164		</example>
165	      </refsect1>
166	    </refentry>
Hide Line Numbers


About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog