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