18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci.. _V4L2-PIX-FMT-SRGGB12P: 48c2ecf20Sopenharmony_ci.. _v4l2-pix-fmt-sbggr12p: 58c2ecf20Sopenharmony_ci.. _v4l2-pix-fmt-sgbrg12p: 68c2ecf20Sopenharmony_ci.. _v4l2-pix-fmt-sgrbg12p: 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci******************************************************************************************************************************* 98c2ecf20Sopenharmony_ciV4L2_PIX_FMT_SRGGB12P ('pRCC'), V4L2_PIX_FMT_SGRBG12P ('pgCC'), V4L2_PIX_FMT_SGBRG12P ('pGCC'), V4L2_PIX_FMT_SBGGR12P ('pBCC'), 108c2ecf20Sopenharmony_ci******************************************************************************************************************************* 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci12-bit packed Bayer formats 148c2ecf20Sopenharmony_ci--------------------------- 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciDescription 188c2ecf20Sopenharmony_ci=========== 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciThese four pixel formats are packed raw sRGB / Bayer formats with 12 218c2ecf20Sopenharmony_cibits per colour. Every two consecutive samples are packed into three 228c2ecf20Sopenharmony_cibytes. Each of the first two bytes contain the 8 high order bits of 238c2ecf20Sopenharmony_cithe pixels, and the third byte contains the four least significants 248c2ecf20Sopenharmony_cibits of each pixel, in the same order. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciEach n-pixel row contains n/2 green samples and n/2 blue or red 278c2ecf20Sopenharmony_cisamples, with alternating green-red and green-blue rows. They are 288c2ecf20Sopenharmony_ciconventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. 298c2ecf20Sopenharmony_ciBelow is an example of a small V4L2_PIX_FMT_SBGGR12P image: 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci**Byte Order.** 328c2ecf20Sopenharmony_ciEach cell is one byte. 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{2.2cm}|p{1.2cm}|p{1.2cm}|p{3.1cm}|p{1.2cm}|p{1.2cm}|p{3.1cm}| 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci.. flat-table:: 388c2ecf20Sopenharmony_ci :header-rows: 0 398c2ecf20Sopenharmony_ci :stub-columns: 0 408c2ecf20Sopenharmony_ci :widths: 2 1 1 1 1 1 1 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci - - start + 0: 448c2ecf20Sopenharmony_ci - B\ :sub:`00high` 458c2ecf20Sopenharmony_ci - G\ :sub:`01high` 468c2ecf20Sopenharmony_ci - G\ :sub:`01low`\ (bits 7--4) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci B\ :sub:`00low`\ (bits 3--0) 498c2ecf20Sopenharmony_ci - B\ :sub:`02high` 508c2ecf20Sopenharmony_ci - G\ :sub:`03high` 518c2ecf20Sopenharmony_ci - G\ :sub:`03low`\ (bits 7--4) 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci B\ :sub:`02low`\ (bits 3--0) 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci - - start + 6: 568c2ecf20Sopenharmony_ci - G\ :sub:`10high` 578c2ecf20Sopenharmony_ci - R\ :sub:`11high` 588c2ecf20Sopenharmony_ci - R\ :sub:`11low`\ (bits 7--4) 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci G\ :sub:`10low`\ (bits 3--0) 618c2ecf20Sopenharmony_ci - G\ :sub:`12high` 628c2ecf20Sopenharmony_ci - R\ :sub:`13high` 638c2ecf20Sopenharmony_ci - R\ :sub:`13low`\ (bits 3--2) 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci G\ :sub:`12low`\ (bits 3--0) 668c2ecf20Sopenharmony_ci - - start + 12: 678c2ecf20Sopenharmony_ci - B\ :sub:`20high` 688c2ecf20Sopenharmony_ci - G\ :sub:`21high` 698c2ecf20Sopenharmony_ci - G\ :sub:`21low`\ (bits 7--4) 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci B\ :sub:`20low`\ (bits 3--0) 728c2ecf20Sopenharmony_ci - B\ :sub:`22high` 738c2ecf20Sopenharmony_ci - G\ :sub:`23high` 748c2ecf20Sopenharmony_ci - G\ :sub:`23low`\ (bits 7--4) 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci B\ :sub:`22low`\ (bits 3--0) 778c2ecf20Sopenharmony_ci - - start + 18: 788c2ecf20Sopenharmony_ci - G\ :sub:`30high` 798c2ecf20Sopenharmony_ci - R\ :sub:`31high` 808c2ecf20Sopenharmony_ci - R\ :sub:`31low`\ (bits 7--4) 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci G\ :sub:`30low`\ (bits 3--0) 838c2ecf20Sopenharmony_ci - G\ :sub:`32high` 848c2ecf20Sopenharmony_ci - R\ :sub:`33high` 858c2ecf20Sopenharmony_ci - R\ :sub:`33low`\ (bits 3--2) 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci G\ :sub:`32low`\ (bits 3--0) 88