162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci.. _V4L2-PIX-FMT-Y12I:
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci**************************
662306a36Sopenharmony_ciV4L2_PIX_FMT_Y12I ('Y12I')
762306a36Sopenharmony_ci**************************
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciInterleaved grey-scale image, e.g. from a stereo-pair
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciDescription
1362306a36Sopenharmony_ci===========
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciThis is a grey-scale image with a depth of 12 bits per pixel, but with
1662306a36Sopenharmony_cipixels from 2 sources interleaved and bit-packed. Each pixel is stored
1762306a36Sopenharmony_ciin a 24-bit word in the little-endian order. On a little-endian machine
1862306a36Sopenharmony_cithese pixels can be deinterlaced using
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci.. code-block:: c
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci    __u8 *buf;
2362306a36Sopenharmony_ci    left0 = 0xfff & *(__u16 *)buf;
2462306a36Sopenharmony_ci    right0 = *(__u16 *)(buf + 1) >> 4;
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci**Bit-packed representation.**
2762306a36Sopenharmony_cipixels cross the byte boundary and have a ratio of 3 bytes for each
2862306a36Sopenharmony_ciinterleaved pixel.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci.. flat-table::
3162306a36Sopenharmony_ci    :header-rows:  0
3262306a36Sopenharmony_ci    :stub-columns: 0
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci    * - Y'\ :sub:`0left[7:0]`
3562306a36Sopenharmony_ci      - Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]`
3662306a36Sopenharmony_ci      - Y'\ :sub:`0right[11:4]`
37