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/userspace-api/media/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************************** 13V4L2_PIX_FMT_Y12I ('Y12I') 14************************** 15 16Interleaved grey-scale image, e.g. from a stereo-pair 17 18 19Description 20=========== 21 22This is a grey-scale image with a depth of 12 bits per pixel, but with 23pixels from 2 sources interleaved and bit-packed. Each pixel is stored 24in a 24-bit word in the little-endian order. On a little-endian machine 25these 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.** 34pixels cross the byte boundary and have a ratio of 3 bytes for each 35interleaved 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]` 44