kvm tools, setup: Create private directory
[linux-2.6/next.git] / Documentation / DocBook / v4l / pixfmt-nv16.xml
blob26094035fc04b1c13a3630979e3ae2b58fd5f86b
1     <refentry>
2       <refmeta>
3         <refentrytitle>V4L2_PIX_FMT_NV16 ('NV16'), V4L2_PIX_FMT_NV61 ('NV61')</refentrytitle>
4         &manvol;
5       </refmeta>
6       <refnamediv>
7         <refname id="V4L2-PIX-FMT-NV16"><constant>V4L2_PIX_FMT_NV16</constant></refname>
8         <refname id="V4L2-PIX-FMT-NV61"><constant>V4L2_PIX_FMT_NV61</constant></refname>
9         <refpurpose>Formats with &frac12; horizontal
10 chroma resolution, also known as YUV 4:2:2. One luminance and one
11 chrominance plane with alternating chroma samples as opposed to
12 <constant>V4L2_PIX_FMT_YVU420</constant></refpurpose>
13       </refnamediv>
14       <refsect1>
15         <title>Description</title>
17         <para>These are two-plane versions of the YUV 4:2:2 format.
18 The three components are separated into two sub-images or planes. The
19 Y plane is first. The Y plane has one byte per pixel. For
20 <constant>V4L2_PIX_FMT_NV16</constant>, a combined CbCr plane
21 immediately follows the Y plane in memory.  The CbCr plane is the same
22 width and height, in bytes, as the Y plane (and of the image).
23 Each CbCr pair belongs to two pixels. For example,
24 Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
25 Y'<subscript>00</subscript>, Y'<subscript>01</subscript>.
26 <constant>V4L2_PIX_FMT_NV61</constant> is the same except the Cb and
27 Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para>
29         <para>If the Y plane has pad bytes after each row, then the
30 CbCr plane has as many pad bytes after its rows.</para>
32         <example>
33           <title><constant>V4L2_PIX_FMT_NV16</constant> 4 &times; 4
34 pixel image</title>
36           <formalpara>
37             <title>Byte Order.</title>
38             <para>Each cell is one byte.
39                 <informaltable frame="none">
40                 <tgroup cols="5" align="center">
41                   <colspec align="left" colwidth="2*" />
42                   <tbody valign="top">
43                     <row>
44                       <entry>start&nbsp;+&nbsp;0:</entry>
45                       <entry>Y'<subscript>00</subscript></entry>
46                       <entry>Y'<subscript>01</subscript></entry>
47                       <entry>Y'<subscript>02</subscript></entry>
48                       <entry>Y'<subscript>03</subscript></entry>
49                     </row>
50                     <row>
51                       <entry>start&nbsp;+&nbsp;4:</entry>
52                       <entry>Y'<subscript>10</subscript></entry>
53                       <entry>Y'<subscript>11</subscript></entry>
54                       <entry>Y'<subscript>12</subscript></entry>
55                       <entry>Y'<subscript>13</subscript></entry>
56                     </row>
57                     <row>
58                       <entry>start&nbsp;+&nbsp;8:</entry>
59                       <entry>Y'<subscript>20</subscript></entry>
60                       <entry>Y'<subscript>21</subscript></entry>
61                       <entry>Y'<subscript>22</subscript></entry>
62                       <entry>Y'<subscript>23</subscript></entry>
63                     </row>
64                     <row>
65                       <entry>start&nbsp;+&nbsp;12:</entry>
66                       <entry>Y'<subscript>30</subscript></entry>
67                       <entry>Y'<subscript>31</subscript></entry>
68                       <entry>Y'<subscript>32</subscript></entry>
69                       <entry>Y'<subscript>33</subscript></entry>
70                     </row>
71                     <row>
72                       <entry>start&nbsp;+&nbsp;16:</entry>
73                       <entry>Cb<subscript>00</subscript></entry>
74                       <entry>Cr<subscript>00</subscript></entry>
75                       <entry>Cb<subscript>01</subscript></entry>
76                       <entry>Cr<subscript>01</subscript></entry>
77                     </row>
78                     <row>
79                       <entry>start&nbsp;+&nbsp;20:</entry>
80                       <entry>Cb<subscript>10</subscript></entry>
81                       <entry>Cr<subscript>10</subscript></entry>
82                       <entry>Cb<subscript>11</subscript></entry>
83                       <entry>Cr<subscript>11</subscript></entry>
84                     </row>
85                     <row>
86                       <entry>start&nbsp;+&nbsp;24:</entry>
87                       <entry>Cb<subscript>20</subscript></entry>
88                       <entry>Cr<subscript>20</subscript></entry>
89                       <entry>Cb<subscript>21</subscript></entry>
90                       <entry>Cr<subscript>21</subscript></entry>
91                     </row>
92                     <row>
93                       <entry>start&nbsp;+&nbsp;28:</entry>
94                       <entry>Cb<subscript>30</subscript></entry>
95                       <entry>Cr<subscript>30</subscript></entry>
96                       <entry>Cb<subscript>31</subscript></entry>
97                       <entry>Cr<subscript>31</subscript></entry>
98                     </row>
99                   </tbody>
100                 </tgroup>
101                 </informaltable>
102               </para>
103           </formalpara>
105           <formalpara>
106             <title>Color Sample Location.</title>
107             <para>
108                 <informaltable frame="none">
109                 <tgroup cols="7" align="center">
110                   <tbody valign="top">
111                     <row>
112                       <entry></entry>
113                       <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
114                       <entry>2</entry><entry></entry><entry>3</entry>
115                     </row>
116                     <row>
117                       <entry>0</entry>
118                       <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
119                       <entry>Y</entry><entry></entry><entry>Y</entry>
120                     </row>
121                     <row>
122                       <entry></entry>
123                       <entry></entry><entry>C</entry><entry></entry><entry></entry>
124                       <entry></entry><entry>C</entry><entry></entry>
125                     </row>
126                     <row>
127                       <entry>1</entry>
128                       <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
129                       <entry>Y</entry><entry></entry><entry>Y</entry>
130                     </row>
131                     <row>
132                       <entry></entry>
133                       <entry></entry><entry>C</entry><entry></entry><entry></entry>
134                       <entry></entry><entry>C</entry><entry></entry>
135                     </row>
136                     <row>
137                       <entry></entry>
138                     </row>
139                     <row>
140                       <entry>2</entry>
141                       <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
142                       <entry>Y</entry><entry></entry><entry>Y</entry>
143                     </row>
144                     <row>
145                       <entry></entry>
146                       <entry></entry><entry>C</entry><entry></entry><entry></entry>
147                       <entry></entry><entry>C</entry><entry></entry>
148                     </row>
149                     <row>
150                       <entry>3</entry>
151                       <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
152                       <entry>Y</entry><entry></entry><entry>Y</entry>
153                     </row>
154                     <row>
155                       <entry></entry>
156                       <entry></entry><entry>C</entry><entry></entry><entry></entry>
157                       <entry></entry><entry>C</entry><entry></entry>
158                     </row>
159                   </tbody>
160                 </tgroup>
161                 </informaltable>
162               </para>
163           </formalpara>
164         </example>
165       </refsect1>
166     </refentry>
168   <!--
169 Local Variables:
170 mode: sgml
171 sgml-parent-document: "pixfmt.sgml"
172 indent-tabs-mode: nil
173 End:
174   -->