Merge branch 'for-linus-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-srggb12.rst
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/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _V4L2-PIX-FMT-SRGGB12:
11 .. _v4l2-pix-fmt-sbggr12:
12 .. _v4l2-pix-fmt-sgbrg12:
13 .. _v4l2-pix-fmt-sgrbg12:
14
15
16 ***************************************************************************************************************************
17 V4L2_PIX_FMT_SRGGB12 ('RG12'), V4L2_PIX_FMT_SGRBG12 ('BA12'), V4L2_PIX_FMT_SGBRG12 ('GB12'), V4L2_PIX_FMT_SBGGR12 ('BG12'),
18 ***************************************************************************************************************************
19
20
21 V4L2_PIX_FMT_SGRBG12
22 V4L2_PIX_FMT_SGBRG12
23 V4L2_PIX_FMT_SBGGR12
24 12-bit Bayer formats expanded to 16 bits
25
26
27 Description
28 ===========
29
30 These four pixel formats are raw sRGB / Bayer formats with 12 bits per
31 colour. Each colour component is stored in a 16-bit word, with 4 unused
32 high bits filled with zeros. Each n-pixel row contains n/2 green samples
33 and n/2 blue or red samples, with alternating red and blue rows. Bytes
34 are stored in memory in little endian order. They are conventionally
35 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
36 of a small V4L2_PIX_FMT_SBGGR12 image:
37
38 **Byte Order.**
39 Each cell is one byte, the 4 most significant bits in the high bytes are
40 0.
41
42
43
44
45 .. flat-table::
46     :header-rows:  0
47     :stub-columns: 0
48
49     * - start + 0:
50       - B\ :sub:`00low`
51       - B\ :sub:`00high`
52       - G\ :sub:`01low`
53       - G\ :sub:`01high`
54       - B\ :sub:`02low`
55       - B\ :sub:`02high`
56       - G\ :sub:`03low`
57       - G\ :sub:`03high`
58     * - start + 8:
59       - G\ :sub:`10low`
60       - G\ :sub:`10high`
61       - R\ :sub:`11low`
62       - R\ :sub:`11high`
63       - G\ :sub:`12low`
64       - G\ :sub:`12high`
65       - R\ :sub:`13low`
66       - R\ :sub:`13high`
67     * - start + 16:
68       - B\ :sub:`20low`
69       - B\ :sub:`20high`
70       - G\ :sub:`21low`
71       - G\ :sub:`21high`
72       - B\ :sub:`22low`
73       - B\ :sub:`22high`
74       - G\ :sub:`23low`
75       - G\ :sub:`23high`
76     * - start + 24:
77       - G\ :sub:`30low`
78       - G\ :sub:`30high`
79       - R\ :sub:`31low`
80       - R\ :sub:`31high`
81       - G\ :sub:`32low`
82       - G\ :sub:`32high`
83       - R\ :sub:`33low`
84       - R\ :sub:`33high`