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