1.. Permission is granted to copy, distribute and/or modify this 2.. document under the terms of the GNU Free Documentation License, 3.. Version 1.1 or any later version published by the Free Software 4.. Foundation, with no Invariant Sections, no Front-Cover Texts 5.. and no Back-Cover Texts. A copy of the license is included at 6.. Documentation/userspace-api/media/fdl-appendix.rst. 7.. 8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 9 10.. _V4L2-PIX-FMT-SRGGB10P: 11.. _v4l2-pix-fmt-sbggr10p: 12.. _v4l2-pix-fmt-sgbrg10p: 13.. _v4l2-pix-fmt-sgrbg10p: 14 15******************************************************************************************************************************* 16V4L2_PIX_FMT_SRGGB10P ('pRAA'), V4L2_PIX_FMT_SGRBG10P ('pgAA'), V4L2_PIX_FMT_SGBRG10P ('pGAA'), V4L2_PIX_FMT_SBGGR10P ('pBAA'), 17******************************************************************************************************************************* 18 19 20V4L2_PIX_FMT_SGRBG10P 21V4L2_PIX_FMT_SGBRG10P 22V4L2_PIX_FMT_SBGGR10P 2310-bit packed Bayer formats 24 25 26Description 27=========== 28 29These four pixel formats are packed raw sRGB / Bayer formats with 10 30bits per sample. Every four consecutive samples are packed into 5 31bytes. Each of the first 4 bytes contain the 8 high order bits 32of the pixels, and the 5th byte contains the 2 least significants 33bits of each pixel, in the same order. 34 35Each n-pixel row contains n/2 green samples and n/2 blue or red samples, 36with alternating green-red and green-blue rows. They are conventionally 37described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example 38of a small V4L2_PIX_FMT_SBGGR10P image: 39 40**Byte Order.** 41Each cell is one byte. 42 43.. tabularcolumns:: |p{2.4cm}|p{1.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{6.4cm}| 44 45.. flat-table:: 46 :header-rows: 0 47 :stub-columns: 0 48 :widths: 12 8 8 8 8 68 49 50 * - start + 0: 51 - B\ :sub:`00high` 52 - G\ :sub:`01high` 53 - B\ :sub:`02high` 54 - G\ :sub:`03high` 55 - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4) 56 57 G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0) 58 * - start + 5: 59 - G\ :sub:`10high` 60 - R\ :sub:`11high` 61 - G\ :sub:`12high` 62 - R\ :sub:`13high` 63 - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4) 64 65 R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0) 66 * - start + 10: 67 - B\ :sub:`20high` 68 - G\ :sub:`21high` 69 - B\ :sub:`22high` 70 - G\ :sub:`23high` 71 - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4) 72 73 G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0) 74 * - start + 15: 75 - G\ :sub:`30high` 76 - R\ :sub:`31high` 77 - G\ :sub:`32high` 78 - R\ :sub:`33high` 79 - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4) 80 81 R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0) 82