xref: /linux/Documentation/userspace-api/media/v4l/pixfmt-srggb14p.rst (revision ba2290b1b7505b28912092a0976e071a447ee18c)
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _V4L2-PIX-FMT-SRGGB14P:
4.. _v4l2-pix-fmt-sbggr14p:
5.. _v4l2-pix-fmt-sgbrg14p:
6.. _v4l2-pix-fmt-sgrbg14p:
7
8*******************************************************************************************************************************
9V4L2_PIX_FMT_SRGGB14P ('pREE'), V4L2_PIX_FMT_SGRBG14P ('pgEE'), V4L2_PIX_FMT_SGBRG14P ('pGEE'), V4L2_PIX_FMT_SBGGR14P ('pBEE'),
10*******************************************************************************************************************************
11
12*man V4L2_PIX_FMT_SRGGB14P(2)*
13
14V4L2_PIX_FMT_SGRBG14P
15V4L2_PIX_FMT_SGBRG14P
16V4L2_PIX_FMT_SBGGR14P
1714-bit packed Bayer formats
18
19
20Description
21===========
22
23These four pixel formats are packed raw sRGB / Bayer formats with 14
24bits per colour. Every four consecutive samples are packed into seven
25bytes. Each of the first four bytes contain the eight high order bits
26of the pixels, and the three following bytes contains the six least
27significants bits of each pixel, in the same order.
28
29Each n-pixel row contains n/2 green samples and n/2 blue or red samples,
30with alternating green-red and green-blue rows. They are conventionally
31described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
32of one of these formats:
33
34**Byte Order.**
35Each cell is one byte.
36
37.. raw:: latex
38
39    \footnotesize
40
41.. tabularcolumns:: |p{1.8cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.1cm}|p{3.3cm}|p{3.3cm}|p{3.3cm}|
42
43.. flat-table::
44    :header-rows:  0
45    :stub-columns: 0
46    :widths:       2 1 1 1 1 3 3 3
47
48
49    -  .. row 1
50
51       -  start + 0
52
53       -  B\ :sub:`00high`
54
55       -  G\ :sub:`01high`
56
57       -  B\ :sub:`02high`
58
59       -  G\ :sub:`03high`
60
61       -  G\ :sub:`01low bits 1--0`\ (bits 7--6)
62
63	  B\ :sub:`00low bits 5--0`\ (bits 5--0)
64
65       -  B\ :sub:`02low bits 3--0`\ (bits 7--4)
66
67	  G\ :sub:`01low bits 5--2`\ (bits 3--0)
68
69       -  G\ :sub:`03low bits 5--0`\ (bits 7--2)
70
71	  B\ :sub:`02low bits 5--4`\ (bits 1--0)
72
73    -  .. row 2
74
75       -  start + 7
76
77       -  G\ :sub:`10high`
78
79       -  R\ :sub:`11high`
80
81       -  G\ :sub:`12high`
82
83       -  R\ :sub:`13high`
84
85       -  R\ :sub:`11low bits 1--0`\ (bits 7--6)
86
87	  G\ :sub:`10low bits 5--0`\ (bits 5--0)
88
89       -  G\ :sub:`12low bits 3--0`\ (bits 7--4)
90
91	  R\ :sub:`11low bits 5--2`\ (bits 3--0)
92
93       -  R\ :sub:`13low bits 5--0`\ (bits 7--2)
94
95	  G\ :sub:`12low bits 5--4`\ (bits 1--0)
96
97    -  .. row 3
98
99       -  start + 14
100
101       -  B\ :sub:`20high`
102
103       -  G\ :sub:`21high`
104
105       -  B\ :sub:`22high`
106
107       -  G\ :sub:`23high`
108
109       -  G\ :sub:`21low bits 1--0`\ (bits 7--6)
110
111	  B\ :sub:`20low bits 5--0`\ (bits 5--0)
112
113       -  B\ :sub:`22low bits 3--0`\ (bits 7--4)
114
115	  G\ :sub:`21low bits 5--2`\ (bits 3--0)
116
117       -  G\ :sub:`23low bits 5--0`\ (bits 7--2)
118
119	  B\ :sub:`22low bits 5--4`\ (bits 1--0)
120
121    -  .. row 4
122
123       -  start + 21
124
125       -  G\ :sub:`30high`
126
127       -  R\ :sub:`31high`
128
129       -  G\ :sub:`32high`
130
131       -  R\ :sub:`33high`
132
133       -  R\ :sub:`31low bits 1--0`\ (bits 7--6)
134	  G\ :sub:`30low bits 5--0`\ (bits 5--0)
135
136       -  G\ :sub:`32low bits 3--0`\ (bits 7--4)
137	  R\ :sub:`31low bits 5--2`\ (bits 3--0)
138
139       -  R\ :sub:`33low bits 5--0`\ (bits 7--2)
140	  G\ :sub:`32low bits 5--4`\ (bits 1--0)
141
142.. raw:: latex
143
144    \normalsize
145
146