^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-SRGGB16:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) .. _v4l2-pix-fmt-sbggr16:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) .. _v4l2-pix-fmt-sgbrg16:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) .. _v4l2-pix-fmt-sgrbg16:
^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_SRGGB16 ('RG16'), V4L2_PIX_FMT_SGRBG16 ('GR16'), V4L2_PIX_FMT_SGBRG16 ('GB16'), V4L2_PIX_FMT_SBGGR16 ('BYR2'),
^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) 16-bit Bayer formats
^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 16 bits per
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) sample. Each sample is stored in a 16-bit word. Each n-pixel row contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) n/2 green samples and n/2 blue or red samples, with alternating red and blue
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) rows. Bytes are stored in memory in little endian order. They are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) an example of a small V4L2_PIX_FMT_SBGGR16 image:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) **Byte Order.**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) Each cell is one byte.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) .. flat-table::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) * - start + 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) - B\ :sub:`00low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) - B\ :sub:`00high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) - G\ :sub:`01low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - G\ :sub:`01high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) - B\ :sub:`02low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - B\ :sub:`02high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - G\ :sub:`03low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) - G\ :sub:`03high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) * - start + 8:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) - G\ :sub:`10low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - G\ :sub:`10high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) - R\ :sub:`11low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) - R\ :sub:`11high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) - G\ :sub:`12low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) - G\ :sub:`12high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) - R\ :sub:`13low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - R\ :sub:`13high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) * - start + 16:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - B\ :sub:`20low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - B\ :sub:`20high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) - G\ :sub:`21low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) - G\ :sub:`21high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) - B\ :sub:`22low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) - B\ :sub:`22high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) - G\ :sub:`23low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) - G\ :sub:`23high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) * - start + 24:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - G\ :sub:`30low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - G\ :sub:`30high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) - R\ :sub:`31low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) - R\ :sub:`31high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) - G\ :sub:`32low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) - G\ :sub:`32high`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - R\ :sub:`33low`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) - R\ :sub:`33high`