Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-srggb12p.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-SRGGB12P:
4 .. _v4l2-pix-fmt-sbggr12p:
5 .. _v4l2-pix-fmt-sgbrg12p:
6 .. _v4l2-pix-fmt-sgrbg12p:
7
8 *******************************************************************************************************************************
9 V4L2_PIX_FMT_SRGGB12P ('pRAA'), V4L2_PIX_FMT_SGRBG12P ('pgAA'), V4L2_PIX_FMT_SGBRG12P ('pGAA'), V4L2_PIX_FMT_SBGGR12P ('pBAA'),
10 *******************************************************************************************************************************
11
12
13 12-bit packed Bayer formats
14
15
16 Description
17 ===========
18
19 These four pixel formats are packed raw sRGB / Bayer formats with 12
20 bits per colour. Every two consecutive samples are packed into three
21 bytes. Each of the first two bytes contain the 8 high order bits of
22 the pixels, and the third byte contains the four least significants
23 bits of each pixel, in the same order.
24
25 Each n-pixel row contains n/2 green samples and n/2 blue or red
26 samples, with alternating green-red and green-blue rows. They are
27 conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc.
28 Below is an example of a small V4L2_PIX_FMT_SBGGR12P image:
29
30 **Byte Order.**
31 Each cell is one byte.
32
33 .. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{2.7cm}|p{1.0cm}|p{1.0cm}|p{2.7cm}|
34
35
36 .. flat-table::
37     :header-rows:  0
38     :stub-columns: 0
39     :widths:       2 1 1 1 1 1 1
40
41
42     -  -  start + 0:
43        -  B\ :sub:`00high`
44        -  G\ :sub:`01high`
45        -  G\ :sub:`01low`\ (bits 7--4)
46
47           B\ :sub:`00low`\ (bits 3--0)
48        -  B\ :sub:`02high`
49        -  G\ :sub:`03high`
50        -  G\ :sub:`03low`\ (bits 7--4)
51
52           B\ :sub:`02low`\ (bits 3--0)
53
54     -  -  start + 6:
55        -  G\ :sub:`10high`
56        -  R\ :sub:`11high`
57        -  R\ :sub:`11low`\ (bits 7--4)
58
59           G\ :sub:`10low`\ (bits 3--0)
60        -  G\ :sub:`12high`
61        -  R\ :sub:`13high`
62        -  R\ :sub:`13low`\ (bits 3--2)
63
64           G\ :sub:`12low`\ (bits 3--0)
65     -  -  start + 12:
66        -  B\ :sub:`20high`
67        -  G\ :sub:`21high`
68        -  G\ :sub:`21low`\ (bits 7--4)
69
70           B\ :sub:`20low`\ (bits 3--0)
71        -  B\ :sub:`22high`
72        -  G\ :sub:`23high`
73        -  G\ :sub:`23low`\ (bits 7--4)
74
75           B\ :sub:`22low`\ (bits 3--0)
76     -  -  start + 18:
77        -  G\ :sub:`30high`
78        -  R\ :sub:`31high`
79        -  R\ :sub:`31low`\ (bits 7--4)
80
81           G\ :sub:`30low`\ (bits 3--0)
82        -  G\ :sub:`32high`
83        -  R\ :sub:`33high`
84        -  R\ :sub:`33low`\ (bits 3--2)
85
86           G\ :sub:`32low`\ (bits 3--0)