18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _V4L2-PIX-FMT-SRGGB12:
48c2ecf20Sopenharmony_ci.. _v4l2-pix-fmt-sbggr12:
58c2ecf20Sopenharmony_ci.. _v4l2-pix-fmt-sgbrg12:
68c2ecf20Sopenharmony_ci.. _v4l2-pix-fmt-sgrbg12:
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci***************************************************************************************************************************
108c2ecf20Sopenharmony_ciV4L2_PIX_FMT_SRGGB12 ('RG12'), V4L2_PIX_FMT_SGRBG12 ('BA12'), V4L2_PIX_FMT_SGBRG12 ('GB12'), V4L2_PIX_FMT_SBGGR12 ('BG12'),
118c2ecf20Sopenharmony_ci***************************************************************************************************************************
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciV4L2_PIX_FMT_SGRBG12
158c2ecf20Sopenharmony_ciV4L2_PIX_FMT_SGBRG12
168c2ecf20Sopenharmony_ciV4L2_PIX_FMT_SBGGR12
178c2ecf20Sopenharmony_ci12-bit Bayer formats expanded to 16 bits
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciDescription
218c2ecf20Sopenharmony_ci===========
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciThese four pixel formats are raw sRGB / Bayer formats with 12 bits per
248c2ecf20Sopenharmony_cicolour. Each colour component is stored in a 16-bit word, with 4 unused
258c2ecf20Sopenharmony_cihigh bits filled with zeros. Each n-pixel row contains n/2 green samples
268c2ecf20Sopenharmony_ciand n/2 blue or red samples, with alternating red and blue rows. Bytes
278c2ecf20Sopenharmony_ciare stored in memory in little endian order. They are conventionally
288c2ecf20Sopenharmony_cidescribed as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
298c2ecf20Sopenharmony_ciof a small V4L2_PIX_FMT_SBGGR12 image:
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci**Byte Order.**
328c2ecf20Sopenharmony_ciEach cell is one byte, the 4 most significant bits in the high bytes are
338c2ecf20Sopenharmony_ci0.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci.. flat-table::
398c2ecf20Sopenharmony_ci    :header-rows:  0
408c2ecf20Sopenharmony_ci    :stub-columns: 0
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci    * - start + 0:
438c2ecf20Sopenharmony_ci      - B\ :sub:`00low`
448c2ecf20Sopenharmony_ci      - B\ :sub:`00high`
458c2ecf20Sopenharmony_ci      - G\ :sub:`01low`
468c2ecf20Sopenharmony_ci      - G\ :sub:`01high`
478c2ecf20Sopenharmony_ci      - B\ :sub:`02low`
488c2ecf20Sopenharmony_ci      - B\ :sub:`02high`
498c2ecf20Sopenharmony_ci      - G\ :sub:`03low`
508c2ecf20Sopenharmony_ci      - G\ :sub:`03high`
518c2ecf20Sopenharmony_ci    * - start + 8:
528c2ecf20Sopenharmony_ci      - G\ :sub:`10low`
538c2ecf20Sopenharmony_ci      - G\ :sub:`10high`
548c2ecf20Sopenharmony_ci      - R\ :sub:`11low`
558c2ecf20Sopenharmony_ci      - R\ :sub:`11high`
568c2ecf20Sopenharmony_ci      - G\ :sub:`12low`
578c2ecf20Sopenharmony_ci      - G\ :sub:`12high`
588c2ecf20Sopenharmony_ci      - R\ :sub:`13low`
598c2ecf20Sopenharmony_ci      - R\ :sub:`13high`
608c2ecf20Sopenharmony_ci    * - start + 16:
618c2ecf20Sopenharmony_ci      - B\ :sub:`20low`
628c2ecf20Sopenharmony_ci      - B\ :sub:`20high`
638c2ecf20Sopenharmony_ci      - G\ :sub:`21low`
648c2ecf20Sopenharmony_ci      - G\ :sub:`21high`
658c2ecf20Sopenharmony_ci      - B\ :sub:`22low`
668c2ecf20Sopenharmony_ci      - B\ :sub:`22high`
678c2ecf20Sopenharmony_ci      - G\ :sub:`23low`
688c2ecf20Sopenharmony_ci      - G\ :sub:`23high`
698c2ecf20Sopenharmony_ci    * - start + 24:
708c2ecf20Sopenharmony_ci      - G\ :sub:`30low`
718c2ecf20Sopenharmony_ci      - G\ :sub:`30high`
728c2ecf20Sopenharmony_ci      - R\ :sub:`31low`
738c2ecf20Sopenharmony_ci      - R\ :sub:`31high`
748c2ecf20Sopenharmony_ci      - G\ :sub:`32low`
758c2ecf20Sopenharmony_ci      - G\ :sub:`32high`
768c2ecf20Sopenharmony_ci      - R\ :sub:`33low`
778c2ecf20Sopenharmony_ci      - R\ :sub:`33high`
78