1.. -*- coding: utf-8; mode: rst -*-
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 ('pRCC'), V4L2_PIX_FMT_SGRBG14P ('pgCC'), V4L2_PIX_FMT_SGBRG14P ('pGCC'), V4L2_PIX_FMT_SBGGR14P ('pBCC'),
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
38
39.. flat-table::
40    :header-rows:  0
41    :stub-columns: 0
42    :widths:       2 1 1 1 1 1 1 1
43
44
45    -  .. row 1
46
47       -  start + 0:
48
49       -  B\ :sub:`00high`
50
51       -  G\ :sub:`01high`
52
53       -  B\ :sub:`02high`
54
55       -  G\ :sub:`03high`
56
57       -  G\ :sub:`01low bits 1--0`\ (bits 7--6)
58	  B\ :sub:`00low bits 5--0`\ (bits 5--0)
59
60       -  R\ :sub:`02low bits 3--0`\ (bits 7--4)
61	  G\ :sub:`01low bits 5--2`\ (bits 3--0)
62
63       -  G\ :sub:`03low bits 5--0`\ (bits 7--2)
64	  R\ :sub:`02low bits 5--4`\ (bits 1--0)
65
66    -  .. row 2
67
68       -  start + 7:
69
70       -  G\ :sub:`00high`
71
72       -  R\ :sub:`01high`
73
74       -  G\ :sub:`02high`
75
76       -  R\ :sub:`03high`
77
78       -  R\ :sub:`01low bits 1--0`\ (bits 7--6)
79	  G\ :sub:`00low bits 5--0`\ (bits 5--0)
80
81       -  G\ :sub:`02low bits 3--0`\ (bits 7--4)
82	  R\ :sub:`01low bits 5--2`\ (bits 3--0)
83
84       -  R\ :sub:`03low bits 5--0`\ (bits 7--2)
85	  G\ :sub:`02low bits 5--4`\ (bits 1--0)
86
87    -  .. row 3
88
89       -  start + 14
90
91       -  B\ :sub:`20high`
92
93       -  G\ :sub:`21high`
94
95       -  B\ :sub:`22high`
96
97       -  G\ :sub:`23high`
98
99       -  G\ :sub:`21low bits 1--0`\ (bits 7--6)
100	  B\ :sub:`20low bits 5--0`\ (bits 5--0)
101
102       -  R\ :sub:`22low bits 3--0`\ (bits 7--4)
103	  G\ :sub:`21low bits 5--2`\ (bits 3--0)
104
105       -  G\ :sub:`23low bits 5--0`\ (bits 7--2)
106	  R\ :sub:`22low bits 5--4`\ (bits 1--0)
107
108    -  .. row 4
109
110       -  start + 21
111
112       -  G\ :sub:`30high`
113
114       -  R\ :sub:`31high`
115
116       -  G\ :sub:`32high`
117
118       -  R\ :sub:`33high`
119
120       -  R\ :sub:`31low bits 1--0`\ (bits 7--6)
121	  G\ :sub:`30low bits 5--0`\ (bits 5--0)
122
123       -  G\ :sub:`32low bits 3--0`\ (bits 7--4)
124	  R\ :sub:`31low bits 5--2`\ (bits 3--0)
125
126       -  R\ :sub:`33low bits 5--0`\ (bits 7--2)
127	  G\ :sub:`32low bits 5--4`\ (bits 1--0)
128