summaryrefslogtreecommitdiff
path: root/Documentation/media/uapi/v4l/pixfmt-meta-vsp1-hgo.rst
blob: f7a861696281833bea6e8fd43add53f35d3f2d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.. Permission is granted to copy, distribute and/or modify this
.. document under the terms of the GNU Free Documentation License,
.. Version 1.1 or any later version published by the Free Software
.. Foundation, with no Invariant Sections, no Front-Cover Texts
.. and no Back-Cover Texts. A copy of the license is included at
.. Documentation/media/uapi/fdl-appendix.rst.
..
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections

.. _v4l2-meta-fmt-vsp1-hgo:

*******************************
V4L2_META_FMT_VSP1_HGO ('VSPH')
*******************************

Renesas R-Car VSP1 1-D Histogram Data


Description
===========

This format describes histogram data generated by the Renesas R-Car VSP1 1-D
Histogram (HGO) engine.

The VSP1 HGO is a histogram computation engine that can operate on RGB, YCrCb
or HSV data. It operates on a possibly cropped and subsampled input image and
computes the minimum, maximum and sum of all pixels as well as per-channel
histograms.

The HGO can compute histograms independently per channel, on the maximum of the
three channels (RGB data only) or on the Y channel only (YCbCr only). It can
additionally output the histogram with 64 or 256 bins, resulting in four
possible modes of operation.

- In *64 bins normal mode*, the HGO operates on the three channels independently
  to compute three 64-bins histograms. RGB, YCbCr and HSV image formats are
  supported.
- In *64 bins maximum mode*, the HGO operates on the maximum of the (R, G, B)
  channels to compute a single 64-bins histogram. Only the RGB image format is
  supported.
- In *256 bins normal mode*, the HGO operates on the Y channel to compute a
  single 256-bins histogram. Only the YCbCr image format is supported.
- In *256 bins maximum mode*, the HGO operates on the maximum of the (R, G, B)
  channels to compute a single 256-bins histogram. Only the RGB image format is
  supported.

**Byte Order.**
All data is stored in memory in little endian format. Each cell in the tables
contains one byte.

.. flat-table:: VSP1 HGO Data - 64 Bins, Normal Mode (792 bytes)
    :header-rows:  2
    :stub-columns: 0

    * - Offset
      - :cspan:`4` Memory
    * -
      - [31:24]
      - [23:16]
      - [15:8]
      - [7:0]
    * - 0
      -
      - R/Cr/H max [7:0]
      -
      - R/Cr/H min [7:0]
    * - 4
      -
      - G/Y/S max [7:0]
      -
      - G/Y/S min [7:0]
    * - 8
      -
      - B/Cb/V max [7:0]
      -
      - B/Cb/V min [7:0]
    * - 12
      - :cspan:`4` R/Cr/H sum [31:0]
    * - 16
      - :cspan:`4` G/Y/S sum [31:0]
    * - 20
      - :cspan:`4` B/Cb/V sum [31:0]
    * - 24
      - :cspan:`4` R/Cr/H bin 0 [31:0]
    * -
      - :cspan:`4` ...
    * - 276
      - :cspan:`4` R/Cr/H bin 63 [31:0]
    * - 280
      - :cspan:`4` G/Y/S bin 0 [31:0]
    * -
      - :cspan:`4` ...
    * - 532
      - :cspan:`4` G/Y/S bin 63 [31:0]
    * - 536
      - :cspan:`4` B/Cb/V bin 0 [31:0]
    * -
      - :cspan:`4` ...
    * - 788
      - :cspan:`4` B/Cb/V bin 63 [31:0]

.. flat-table:: VSP1 HGO Data - 64 Bins, Max Mode (264 bytes)
    :header-rows:  2
    :stub-columns: 0

    * - Offset
      - :cspan:`4` Memory
    * -
      - [31:24]
      - [23:16]
      - [15:8]
      - [7:0]
    * - 0
      -
      - max(R,G,B) max [7:0]
      -
      - max(R,G,B) min [7:0]
    * - 4
      - :cspan:`4` max(R,G,B) sum [31:0]
    * - 8
      - :cspan:`4` max(R,G,B) bin 0 [31:0]
    * -
      - :cspan:`4` ...
    * - 260
      - :cspan:`4` max(R,G,B) bin 63 [31:0]

.. flat-table:: VSP1 HGO Data - 256 Bins, Normal Mode (1032 bytes)
    :header-rows:  2
    :stub-columns: 0

    * - Offset
      - :cspan:`4` Memory
    * -
      - [31:24]
      - [23:16]
      - [15:8]
      - [7:0]
    * - 0
      -
      - Y max [7:0]
      -
      - Y min [7:0]
    * - 4
      - :cspan:`4` Y sum [31:0]
    * - 8
      - :cspan:`4` Y bin 0 [31:0]
    * -
      - :cspan:`4` ...
    * - 1028
      - :cspan:`4` Y bin 255 [31:0]

.. flat-table:: VSP1 HGO Data - 256 Bins, Max Mode (1032 bytes)
    :header-rows:  2
    :stub-columns: 0

    * - Offset
      - :cspan:`4` Memory
    * -
      - [31:24]
      - [23:16]
      - [15:8]
      - [7:0]
    * - 0
      -
      - max(R,G,B) max [7:0]
      -
      - max(R,G,B) min [7:0]
    * - 4
      - :cspan:`4` max(R,G,B) sum [31:0]
    * - 8
      - :cspan:`4` max(R,G,B) bin 0 [31:0]
    * -
      - :cspan:`4` ...
    * - 1028
      - :cspan:`4` max(R,G,B) bin 255 [31:0]