162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci.. _V4L2-PIX-FMT-SRGGB10P:
462306a36Sopenharmony_ci.. _v4l2-pix-fmt-sbggr10p:
562306a36Sopenharmony_ci.. _v4l2-pix-fmt-sgbrg10p:
662306a36Sopenharmony_ci.. _v4l2-pix-fmt-sgrbg10p:
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci*******************************************************************************************************************************
962306a36Sopenharmony_ciV4L2_PIX_FMT_SRGGB10P ('pRAA'), V4L2_PIX_FMT_SGRBG10P ('pgAA'), V4L2_PIX_FMT_SGBRG10P ('pGAA'), V4L2_PIX_FMT_SBGGR10P ('pBAA'),
1062306a36Sopenharmony_ci*******************************************************************************************************************************
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciV4L2_PIX_FMT_SGRBG10P
1462306a36Sopenharmony_ciV4L2_PIX_FMT_SGBRG10P
1562306a36Sopenharmony_ciV4L2_PIX_FMT_SBGGR10P
1662306a36Sopenharmony_ci10-bit packed Bayer formats
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciDescription
2062306a36Sopenharmony_ci===========
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciThese four pixel formats are packed raw sRGB / Bayer formats with 10
2362306a36Sopenharmony_cibits per sample. Every four consecutive samples are packed into 5
2462306a36Sopenharmony_cibytes. Each of the first 4 bytes contain the 8 high order bits
2562306a36Sopenharmony_ciof the pixels, and the 5th byte contains the 2 least significants
2662306a36Sopenharmony_cibits of each pixel, in the same order.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ciEach n-pixel row contains n/2 green samples and n/2 blue or red samples,
2962306a36Sopenharmony_ciwith alternating green-red and green-blue rows. They are conventionally
3062306a36Sopenharmony_cidescribed as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
3162306a36Sopenharmony_ciof a small V4L2_PIX_FMT_SBGGR10P image:
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci**Byte Order.**
3462306a36Sopenharmony_ciEach cell is one byte.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci.. tabularcolumns:: |p{2.4cm}|p{1.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{9.3cm}|
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci.. flat-table::
3962306a36Sopenharmony_ci    :header-rows:  0
4062306a36Sopenharmony_ci    :stub-columns: 0
4162306a36Sopenharmony_ci    :widths: 12 8 8 8 8 68
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci    * - start + 0:
4462306a36Sopenharmony_ci      - B\ :sub:`00high`
4562306a36Sopenharmony_ci      - G\ :sub:`01high`
4662306a36Sopenharmony_ci      - B\ :sub:`02high`
4762306a36Sopenharmony_ci      - G\ :sub:`03high`
4862306a36Sopenharmony_ci      - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4)
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci	G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0)
5162306a36Sopenharmony_ci    * - start + 5:
5262306a36Sopenharmony_ci      - G\ :sub:`10high`
5362306a36Sopenharmony_ci      - R\ :sub:`11high`
5462306a36Sopenharmony_ci      - G\ :sub:`12high`
5562306a36Sopenharmony_ci      - R\ :sub:`13high`
5662306a36Sopenharmony_ci      - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4)
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci	R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0)
5962306a36Sopenharmony_ci    * - start + 10:
6062306a36Sopenharmony_ci      - B\ :sub:`20high`
6162306a36Sopenharmony_ci      - G\ :sub:`21high`
6262306a36Sopenharmony_ci      - B\ :sub:`22high`
6362306a36Sopenharmony_ci      - G\ :sub:`23high`
6462306a36Sopenharmony_ci      - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4)
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci	G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0)
6762306a36Sopenharmony_ci    * - start + 15:
6862306a36Sopenharmony_ci      - G\ :sub:`30high`
6962306a36Sopenharmony_ci      - R\ :sub:`31high`
7062306a36Sopenharmony_ci      - G\ :sub:`32high`
7162306a36Sopenharmony_ci      - R\ :sub:`33high`
7262306a36Sopenharmony_ci      - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4)
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci	R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)
75