Merge branch 'next' into for-linus
[sfrench/cifs-2.6.git] / Documentation / DocBook / media / v4l / pixfmt-y12i.xml
1 <refentry id="V4L2-PIX-FMT-Y12I">
2   <refmeta>
3     <refentrytitle>V4L2_PIX_FMT_Y12I ('Y12I')</refentrytitle>
4     &manvol;
5   </refmeta>
6   <refnamediv>
7     <refname><constant>V4L2_PIX_FMT_Y12I</constant></refname>
8     <refpurpose>Interleaved grey-scale image, e.g. from a stereo-pair</refpurpose>
9   </refnamediv>
10   <refsect1>
11     <title>Description</title>
12
13     <para>This is a grey-scale image with a depth of 12 bits per pixel, but with
14 pixels from 2 sources interleaved and bit-packed. Each pixel is stored in a
15 24-bit word in the little-endian order. On a little-endian machine these pixels
16 can be deinterlaced using</para>
17
18 <para>
19 <programlisting>
20 __u8 *buf;
21 left0 = 0xfff &amp; *(__u16 *)buf;
22 right0 = *(__u16 *)(buf + 1) >> 4;
23 </programlisting>
24 </para>
25
26     <example>
27       <title><constant>V4L2_PIX_FMT_Y12I</constant> 2 pixel data stream taking 3 bytes</title>
28
29       <formalpara>
30         <title>Bit-packed representation</title>
31         <para>pixels cross the byte boundary and have a ratio of 3 bytes for each
32           interleaved pixel.
33           <informaltable frame="all">
34             <tgroup cols="3" align="center">
35               <colspec align="left" colwidth="2*" />
36               <tbody valign="top">
37                 <row>
38                   <entry>Y'<subscript>0left[7:0]</subscript></entry>
39                   <entry>Y'<subscript>0right[3:0]</subscript>Y'<subscript>0left[11:8]</subscript></entry>
40                   <entry>Y'<subscript>0right[11:4]</subscript></entry>
41                 </row>
42               </tbody>
43             </tgroup>
44           </informaltable>
45         </para>
46       </formalpara>
47     </example>
48   </refsect1>
49 </refentry>