| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _V4L2-PIX-FMT-SRGGB12P: |
| 5 |
.. _v4l2-pix-fmt-sbggr12p: |
| 6 |
.. _v4l2-pix-fmt-sgbrg12p: |
| 7 |
.. _v4l2-pix-fmt-sgrbg12p: |
| 8 |
|
| 9 |
******************************************************************************************************************************* |
| 10 |
V4L2_PIX_FMT_SRGGB12P ('pRCC'), V4L2_PIX_FMT_SGRBG12P ('pgCC'), V4L2_PIX_FMT_SGBRG12P ('pGCC'), V4L2_PIX_FMT_SBGGR12P ('pBCC') |
| 11 |
******************************************************************************************************************************* |
| 12 |
|
| 13 |
|
| 14 |
12-bit packed Bayer formats |
| 15 |
--------------------------- |
| 16 |
|
| 17 |
|
| 18 |
Description |
| 19 |
=========== |
| 20 |
|
| 21 |
These four pixel formats are packed raw sRGB / Bayer formats with 12 |
| 22 |
bits per colour. Every two consecutive samples are packed into three |
| 23 |
bytes. Each of the first two bytes contain the 8 high order bits of |
| 24 |
the pixels, and the third byte contains the four least significant |
| 25 |
bits of each pixel, in the same order. |
| 26 |
|
| 27 |
Each n-pixel row contains n/2 green samples and n/2 blue or red |
| 28 |
samples, with alternating green-red and green-blue rows. They are |
| 29 |
conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. |
| 30 |
Below is an example of a small V4L2_PIX_FMT_SBGGR12P image: |
| 31 |
|
| 32 |
**Byte Order.** |
| 33 |
Each cell is one byte. |
| 34 |
|
| 35 |
.. tabularcolumns:: |p{2.2cm}|p{1.2cm}|p{1.2cm}|p{3.1cm}|p{1.2cm}|p{1.2cm}|p{6.4cm}| |
| 36 |
|
| 37 |
|
| 38 |
.. flat-table:: |
| 39 |
:header-rows: 0 |
| 40 |
:stub-columns: 0 |
| 41 |
:widths: 2 1 1 1 1 1 1 |
| 42 |
|
| 43 |
|
| 44 |
- - start + 0: |
| 45 |
- B\ :sub:`00high` |
| 46 |
- G\ :sub:`01high` |
| 47 |
- G\ :sub:`01low`\ (bits 7--4) |
| 48 |
|
| 49 |
B\ :sub:`00low`\ (bits 3--0) |
| 50 |
- B\ :sub:`02high` |
| 51 |
- G\ :sub:`03high` |
| 52 |
- G\ :sub:`03low`\ (bits 7--4) |
| 53 |
|
| 54 |
B\ :sub:`02low`\ (bits 3--0) |
| 55 |
|
| 56 |
- - start + 6: |
| 57 |
- G\ :sub:`10high` |
| 58 |
- R\ :sub:`11high` |
| 59 |
- R\ :sub:`11low`\ (bits 7--4) |
| 60 |
|
| 61 |
G\ :sub:`10low`\ (bits 3--0) |
| 62 |
- G\ :sub:`12high` |
| 63 |
- R\ :sub:`13high` |
| 64 |
- R\ :sub:`13low`\ (bits 7--4) |
| 65 |
|
| 66 |
G\ :sub:`12low`\ (bits 3--0) |
| 67 |
- - start + 12: |
| 68 |
- B\ :sub:`20high` |
| 69 |
- G\ :sub:`21high` |
| 70 |
- G\ :sub:`21low`\ (bits 7--4) |
| 71 |
|
| 72 |
B\ :sub:`20low`\ (bits 3--0) |
| 73 |
- B\ :sub:`22high` |
| 74 |
- G\ :sub:`23high` |
| 75 |
- G\ :sub:`23low`\ (bits 7--4) |
| 76 |
|
| 77 |
B\ :sub:`22low`\ (bits 3--0) |
| 78 |
- - start + 18: |
| 79 |
- G\ :sub:`30high` |
| 80 |
- R\ :sub:`31high` |
| 81 |
- R\ :sub:`31low`\ (bits 7--4) |
| 82 |
|
| 83 |
G\ :sub:`30low`\ (bits 3--0) |
| 84 |
- G\ :sub:`32high` |
| 85 |
- R\ :sub:`33high` |
| 86 |
- R\ :sub:`33low`\ (bits 7--4) |
| 87 |
|
| 88 |
G\ :sub:`32low`\ (bits 3--0) |