Fix a handful of audit-related issue
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-meta-vsp1-hgo.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-meta-fmt-vsp1-hgo:
11
12 *******************************
13 V4L2_META_FMT_VSP1_HGO ('VSPH')
14 *******************************
15
16 Renesas R-Car VSP1 1-D Histogram Data
17
18
19 Description
20 ===========
21
22 This format describes histogram data generated by the Renesas R-Car VSP1 1-D
23 Histogram (HGO) engine.
24
25 The VSP1 HGO is a histogram computation engine that can operate on RGB, YCrCb
26 or HSV data. It operates on a possibly cropped and subsampled input image and
27 computes the minimum, maximum and sum of all pixels as well as per-channel
28 histograms.
29
30 The HGO can compute histograms independently per channel, on the maximum of the
31 three channels (RGB data only) or on the Y channel only (YCbCr only). It can
32 additionally output the histogram with 64 or 256 bins, resulting in four
33 possible modes of operation.
34
35 - In *64 bins normal mode*, the HGO operates on the three channels independently
36   to compute three 64-bins histograms. RGB, YCbCr and HSV image formats are
37   supported.
38 - In *64 bins maximum mode*, the HGO operates on the maximum of the (R, G, B)
39   channels to compute a single 64-bins histogram. Only the RGB image format is
40   supported.
41 - In *256 bins normal mode*, the HGO operates on the Y channel to compute a
42   single 256-bins histogram. Only the YCbCr image format is supported.
43 - In *256 bins maximum mode*, the HGO operates on the maximum of the (R, G, B)
44   channels to compute a single 256-bins histogram. Only the RGB image format is
45   supported.
46
47 **Byte Order.**
48 All data is stored in memory in little endian format. Each cell in the tables
49 contains one byte.
50
51 .. flat-table:: VSP1 HGO Data - 64 Bins, Normal Mode (792 bytes)
52     :header-rows:  2
53     :stub-columns: 0
54
55     * - Offset
56       - :cspan:`4` Memory
57     * -
58       - [31:24]
59       - [23:16]
60       - [15:8]
61       - [7:0]
62     * - 0
63       -
64       - R/Cr/H max [7:0]
65       -
66       - R/Cr/H min [7:0]
67     * - 4
68       -
69       - G/Y/S max [7:0]
70       -
71       - G/Y/S min [7:0]
72     * - 8
73       -
74       - B/Cb/V max [7:0]
75       -
76       - B/Cb/V min [7:0]
77     * - 12
78       - :cspan:`4` R/Cr/H sum [31:0]
79     * - 16
80       - :cspan:`4` G/Y/S sum [31:0]
81     * - 20
82       - :cspan:`4` B/Cb/V sum [31:0]
83     * - 24
84       - :cspan:`4` R/Cr/H bin 0 [31:0]
85     * -
86       - :cspan:`4` ...
87     * - 276
88       - :cspan:`4` R/Cr/H bin 63 [31:0]
89     * - 280
90       - :cspan:`4` G/Y/S bin 0 [31:0]
91     * -
92       - :cspan:`4` ...
93     * - 532
94       - :cspan:`4` G/Y/S bin 63 [31:0]
95     * - 536
96       - :cspan:`4` B/Cb/V bin 0 [31:0]
97     * -
98       - :cspan:`4` ...
99     * - 788
100       - :cspan:`4` B/Cb/V bin 63 [31:0]
101
102 .. flat-table:: VSP1 HGO Data - 64 Bins, Max Mode (264 bytes)
103     :header-rows:  2
104     :stub-columns: 0
105
106     * - Offset
107       - :cspan:`4` Memory
108     * -
109       - [31:24]
110       - [23:16]
111       - [15:8]
112       - [7:0]
113     * - 0
114       -
115       - max(R,G,B) max [7:0]
116       -
117       - max(R,G,B) min [7:0]
118     * - 4
119       - :cspan:`4` max(R,G,B) sum [31:0]
120     * - 8
121       - :cspan:`4` max(R,G,B) bin 0 [31:0]
122     * -
123       - :cspan:`4` ...
124     * - 260
125       - :cspan:`4` max(R,G,B) bin 63 [31:0]
126
127 .. flat-table:: VSP1 HGO Data - 256 Bins, Normal Mode (1032 bytes)
128     :header-rows:  2
129     :stub-columns: 0
130
131     * - Offset
132       - :cspan:`4` Memory
133     * -
134       - [31:24]
135       - [23:16]
136       - [15:8]
137       - [7:0]
138     * - 0
139       -
140       - Y max [7:0]
141       -
142       - Y min [7:0]
143     * - 4
144       - :cspan:`4` Y sum [31:0]
145     * - 8
146       - :cspan:`4` Y bin 0 [31:0]
147     * -
148       - :cspan:`4` ...
149     * - 1028
150       - :cspan:`4` Y bin 255 [31:0]
151
152 .. flat-table:: VSP1 HGO Data - 256 Bins, Max Mode (1032 bytes)
153     :header-rows:  2
154     :stub-columns: 0
155
156     * - Offset
157       - :cspan:`4` Memory
158     * -
159       - [31:24]
160       - [23:16]
161       - [15:8]
162       - [7:0]
163     * - 0
164       -
165       - max(R,G,B) max [7:0]
166       -
167       - max(R,G,B) min [7:0]
168     * - 4
169       - :cspan:`4` max(R,G,B) sum [31:0]
170     * - 8
171       - :cspan:`4` max(R,G,B) bin 0 [31:0]
172     * -
173       - :cspan:`4` ...
174     * - 1028
175       - :cspan:`4` max(R,G,B) bin 255 [31:0]