^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-SRGGB14:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) .. _v4l2-pix-fmt-sbggr14:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) .. _v4l2-pix-fmt-sgbrg14:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) .. _v4l2-pix-fmt-sgrbg14:
^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_SRGGB14 ('RG14'), V4L2_PIX_FMT_SGRBG14 ('GR14'), V4L2_PIX_FMT_SGBRG14 ('GB14'), V4L2_PIX_FMT_SBGGR14 ('BG14'),
^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) 14-bit Bayer formats expanded to 16 bits
^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 raw sRGB / Bayer formats with 14 bits per
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) colour. Each sample is stored in a 16-bit word, with two unused high
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) bits filled with zeros. Each n-pixel row contains n/2 green samples
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) and n/2 blue or red samples, with alternating red and blue rows. Bytes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) are stored in memory in little endian order. They are conventionally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) example of a small V4L2_PIX_FMT_SBGGR14 image:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) **Byte Order.**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) Each cell is one byte, the two most significant bits in the high bytes are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) .. flat-table::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) :widths: 2 1 1 1 1 1 1 1 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) * - start + 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - B\ :sub:`00low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) - B\ :sub:`00high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - G\ :sub:`01low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) - G\ :sub:`01high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - B\ :sub:`02low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) - B\ :sub:`02high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) - G\ :sub:`03low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) - G\ :sub:`03high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * - start + 8:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) - G\ :sub:`10low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - G\ :sub:`10high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - R\ :sub:`11low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - R\ :sub:`11high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - G\ :sub:`12low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) - G\ :sub:`12high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) - R\ :sub:`13low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) - R\ :sub:`13high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) * - start + 16:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) - B\ :sub:`20low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) - B\ :sub:`20high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) - G\ :sub:`21low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - G\ :sub:`21high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - B\ :sub:`22low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) - B\ :sub:`22high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) - G\ :sub:`23low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) - G\ :sub:`23high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * - start + 24:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - G\ :sub:`30low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) - G\ :sub:`30high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) - R\ :sub:`31low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) - R\ :sub:`31high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) - G\ :sub:`32low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) - G\ :sub:`32high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) - R\ :sub:`33low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) - R\ :sub:`33high`