| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _V4L2-PIX-FMT-SRGGB12: |
| 5 |
.. _v4l2-pix-fmt-sbggr12: |
| 6 |
.. _v4l2-pix-fmt-sgbrg12: |
| 7 |
.. _v4l2-pix-fmt-sgrbg12: |
| 8 |
|
| 9 |
|
| 10 |
*************************************************************************************************************************** |
| 11 |
V4L2_PIX_FMT_SRGGB12 ('RG12'), V4L2_PIX_FMT_SGRBG12 ('BA12'), V4L2_PIX_FMT_SGBRG12 ('GB12'), V4L2_PIX_FMT_SBGGR12 ('BG12'), |
| 12 |
*************************************************************************************************************************** |
| 13 |
|
| 14 |
|
| 15 |
V4L2_PIX_FMT_SGRBG12 |
| 16 |
V4L2_PIX_FMT_SGBRG12 |
| 17 |
V4L2_PIX_FMT_SBGGR12 |
| 18 |
12-bit Bayer formats expanded to 16 bits |
| 19 |
|
| 20 |
|
| 21 |
Description |
| 22 |
=========== |
| 23 |
|
| 24 |
These four pixel formats are raw sRGB / Bayer formats with 12 bits per |
| 25 |
colour. Each colour component is stored in a 16-bit word, with 4 unused |
| 26 |
high bits filled with zeros. Each n-pixel row contains n/2 green samples |
| 27 |
and n/2 blue or red samples, with alternating red and blue rows. Bytes |
| 28 |
are stored in memory in little endian order. They are conventionally |
| 29 |
described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example |
| 30 |
of a small V4L2_PIX_FMT_SBGGR12 image: |
| 31 |
|
| 32 |
**Byte Order.** |
| 33 |
Each cell is one byte, the 4 most significant bits in the high bytes are |
| 34 |
0. |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
.. flat-table:: |
| 40 |
:header-rows: 0 |
| 41 |
:stub-columns: 0 |
| 42 |
|
| 43 |
* - start + 0: |
| 44 |
- B\ :sub:`00low` |
| 45 |
- B\ :sub:`00high` |
| 46 |
- G\ :sub:`01low` |
| 47 |
- G\ :sub:`01high` |
| 48 |
- B\ :sub:`02low` |
| 49 |
- B\ :sub:`02high` |
| 50 |
- G\ :sub:`03low` |
| 51 |
- G\ :sub:`03high` |
| 52 |
* - start + 8: |
| 53 |
- G\ :sub:`10low` |
| 54 |
- G\ :sub:`10high` |
| 55 |
- R\ :sub:`11low` |
| 56 |
- R\ :sub:`11high` |
| 57 |
- G\ :sub:`12low` |
| 58 |
- G\ :sub:`12high` |
| 59 |
- R\ :sub:`13low` |
| 60 |
- R\ :sub:`13high` |
| 61 |
* - start + 16: |
| 62 |
- B\ :sub:`20low` |
| 63 |
- B\ :sub:`20high` |
| 64 |
- G\ :sub:`21low` |
| 65 |
- G\ :sub:`21high` |
| 66 |
- B\ :sub:`22low` |
| 67 |
- B\ :sub:`22high` |
| 68 |
- G\ :sub:`23low` |
| 69 |
- G\ :sub:`23high` |
| 70 |
* - start + 24: |
| 71 |
- G\ :sub:`30low` |
| 72 |
- G\ :sub:`30high` |
| 73 |
- R\ :sub:`31low` |
| 74 |
- R\ :sub:`31high` |
| 75 |
- G\ :sub:`32low` |
| 76 |
- G\ :sub:`32high` |
| 77 |
- R\ :sub:`33low` |
| 78 |
- R\ :sub:`33high` |