Merge branch 'core-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-srggb14p.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-SRGGB14P:
11 .. _v4l2-pix-fmt-sbggr14p:
12 .. _v4l2-pix-fmt-sgbrg14p:
13 .. _v4l2-pix-fmt-sgrbg14p:
14
15 *******************************************************************************************************************************
16 V4L2_PIX_FMT_SRGGB14P ('pRCC'), V4L2_PIX_FMT_SGRBG14P ('pgCC'), V4L2_PIX_FMT_SGBRG14P ('pGCC'), V4L2_PIX_FMT_SBGGR14P ('pBCC'),
17 *******************************************************************************************************************************
18
19 *man V4L2_PIX_FMT_SRGGB14P(2)*
20
21 V4L2_PIX_FMT_SGRBG14P
22 V4L2_PIX_FMT_SGBRG14P
23 V4L2_PIX_FMT_SBGGR14P
24 14-bit packed Bayer formats
25
26
27 Description
28 ===========
29
30 These four pixel formats are packed raw sRGB / Bayer formats with 14
31 bits per colour. Every four consecutive samples are packed into seven
32 bytes. Each of the first four bytes contain the eight high order bits
33 of the pixels, and the three following bytes contains the six least
34 significants bits of each pixel, in the same order.
35
36 Each n-pixel row contains n/2 green samples and n/2 blue or red samples,
37 with alternating green-red and green-blue rows. They are conventionally
38 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
39 of one of these formats:
40
41 **Byte Order.**
42 Each cell is one byte.
43
44
45
46 .. flat-table::
47     :header-rows:  0
48     :stub-columns: 0
49     :widths:       2 1 1 1 1 1 1 1
50
51
52     -  .. row 1
53
54        -  start + 0:
55
56        -  B\ :sub:`00high`
57
58        -  G\ :sub:`01high`
59
60        -  B\ :sub:`02high`
61
62        -  G\ :sub:`03high`
63
64        -  G\ :sub:`01low bits 1--0`\ (bits 7--6)
65           B\ :sub:`00low bits 5--0`\ (bits 5--0)
66
67        -  R\ :sub:`02low bits 3--0`\ (bits 7--4)
68           G\ :sub:`01low bits 5--2`\ (bits 3--0)
69
70        -  G\ :sub:`03low bits 5--0`\ (bits 7--2)
71           R\ :sub:`02low bits 5--4`\ (bits 1--0)
72
73     -  .. row 2
74
75        -  start + 7:
76
77        -  G\ :sub:`00high`
78
79        -  R\ :sub:`01high`
80
81        -  G\ :sub:`02high`
82
83        -  R\ :sub:`03high`
84
85        -  R\ :sub:`01low bits 1--0`\ (bits 7--6)
86           G\ :sub:`00low bits 5--0`\ (bits 5--0)
87
88        -  G\ :sub:`02low bits 3--0`\ (bits 7--4)
89           R\ :sub:`01low bits 5--2`\ (bits 3--0)
90
91        -  R\ :sub:`03low bits 5--0`\ (bits 7--2)
92           G\ :sub:`02low bits 5--4`\ (bits 1--0)
93
94     -  .. row 3
95
96        -  start + 14
97
98        -  B\ :sub:`20high`
99
100        -  G\ :sub:`21high`
101
102        -  B\ :sub:`22high`
103
104        -  G\ :sub:`23high`
105
106        -  G\ :sub:`21low bits 1--0`\ (bits 7--6)
107           B\ :sub:`20low bits 5--0`\ (bits 5--0)
108
109        -  R\ :sub:`22low bits 3--0`\ (bits 7--4)
110           G\ :sub:`21low bits 5--2`\ (bits 3--0)
111
112        -  G\ :sub:`23low bits 5--0`\ (bits 7--2)
113           R\ :sub:`22low bits 5--4`\ (bits 1--0)
114
115     -  .. row 4
116
117        -  start + 21
118
119        -  G\ :sub:`30high`
120
121        -  R\ :sub:`31high`
122
123        -  G\ :sub:`32high`
124
125        -  R\ :sub:`33high`
126
127        -  R\ :sub:`31low bits 1--0`\ (bits 7--6)
128           G\ :sub:`30low bits 5--0`\ (bits 5--0)
129
130        -  G\ :sub:`32low bits 3--0`\ (bits 7--4)
131           R\ :sub:`31low bits 5--2`\ (bits 3--0)
132
133        -  R\ :sub:`33low bits 5--0`\ (bits 7--2)
134           G\ :sub:`32low bits 5--4`\ (bits 1--0)