Merge tag 'backlight-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-y12i.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _V4L2-PIX-FMT-Y12I:
11
12 **************************
13 V4L2_PIX_FMT_Y12I ('Y12I')
14 **************************
15
16 Interleaved grey-scale image, e.g. from a stereo-pair
17
18
19 Description
20 ===========
21
22 This is a grey-scale image with a depth of 12 bits per pixel, but with
23 pixels from 2 sources interleaved and bit-packed. Each pixel is stored
24 in a 24-bit word in the little-endian order. On a little-endian machine
25 these pixels can be deinterlaced using
26
27 .. code-block:: c
28
29     __u8 *buf;
30     left0 = 0xfff & *(__u16 *)buf;
31     right0 = *(__u16 *)(buf + 1) >> 4;
32
33 **Bit-packed representation.**
34 pixels cross the byte boundary and have a ratio of 3 bytes for each
35 interleaved pixel.
36
37 .. flat-table::
38     :header-rows:  0
39     :stub-columns: 0
40
41     * - Y'\ :sub:`0left[7:0]`
42       - Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]`
43       - Y'\ :sub:`0right[11:4]`