| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _V4L2-PIX-FMT-Y12I: |
| 5 |
|
| 6 |
************************** |
| 7 |
V4L2_PIX_FMT_Y12I ('Y12I') |
| 8 |
************************** |
| 9 |
|
| 10 |
Interleaved grey-scale image, e.g. from a stereo-pair |
| 11 |
|
| 12 |
|
| 13 |
Description |
| 14 |
=========== |
| 15 |
|
| 16 |
This is a grey-scale image with a depth of 12 bits per pixel, but with |
| 17 |
pixels from 2 sources interleaved and bit-packed. Each pixel is stored |
| 18 |
in a 24-bit word in the little-endian order. On a little-endian machine |
| 19 |
these pixels can be deinterlaced using |
| 20 |
|
| 21 |
.. code-block:: c |
| 22 |
|
| 23 |
__u8 *buf; |
| 24 |
left0 = 0xfff & *(__u16 *)buf; |
| 25 |
right0 = *(__u16 *)(buf + 1) >> 4; |
| 26 |
|
| 27 |
**Bit-packed representation.** |
| 28 |
pixels cross the byte boundary and have a ratio of 3 bytes for each |
| 29 |
interleaved pixel. |
| 30 |
|
| 31 |
.. flat-table:: |
| 32 |
:header-rows: 0 |
| 33 |
:stub-columns: 0 |
| 34 |
|
| 35 |
* - Y'\ :sub:`0left[7:0]` |
| 36 |
- Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]` |
| 37 |
- Y'\ :sub:`0right[11:4]` |