# V4L2_META_FMT_VSP1_HGO ('VSPH')

_Peios Kernel / Userspace interfaces / System and device interfaces / Video4Linux_

> Renesas R-Car VSP1 1-D Histogram Data

<a id="rst-v4l2-meta-fmt-vsp1-hgo-vsph"></a>
<a id="rst-v4l2-meta-fmt-vsp1-hgo"></a>

<!-- SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later -->

<!-- c:namespace: V4L -->

Renesas R-Car VSP1 1-D Histogram Data

<a id="rst-description"></a>

## 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.


<table>
<caption>VSP1 HGO Data - 64 Bins, Normal Mode (792 bytes)</caption>
<thead>
<tr>
<th>


Offset

</th>
<th colspan="5">


 Memory

</th>
</tr>
<tr>
<th>




</th>
<th>


\[31:24\]

</th>
<th>


\[23:16\]

</th>
<th>


\[15:8\]

</th>
<th colspan="2">


\[7:0\]

</th>
</tr>
</thead>
<tbody>
<tr>
<td>


0

</td>
<td>




</td>
<td>


R/Cr/H max \[7:0\]

</td>
<td>




</td>
<td colspan="2">


R/Cr/H min \[7:0\]

</td>
</tr>
<tr>
<td>


4

</td>
<td>




</td>
<td>


G/Y/S max \[7:0\]

</td>
<td>




</td>
<td colspan="2">


G/Y/S min \[7:0\]

</td>
</tr>
<tr>
<td>


8

</td>
<td>




</td>
<td>


B/Cb/V max \[7:0\]

</td>
<td>




</td>
<td colspan="2">


B/Cb/V min \[7:0\]

</td>
</tr>
<tr>
<td>


12

</td>
<td colspan="5">


 R/Cr/H sum \[31:0\]

</td>
</tr>
<tr>
<td>


16

</td>
<td colspan="5">


 G/Y/S sum \[31:0\]

</td>
</tr>
<tr>
<td>


20

</td>
<td colspan="5">


 B/Cb/V sum \[31:0\]

</td>
</tr>
<tr>
<td>


24

</td>
<td colspan="5">


 R/Cr/H bin 0 \[31:0\]

</td>
</tr>
<tr>
<td>




</td>
<td colspan="5">


 ...

</td>
</tr>
<tr>
<td>


276

</td>
<td colspan="5">


 R/Cr/H bin 63 \[31:0\]

</td>
</tr>
<tr>
<td>


280

</td>
<td colspan="5">


 G/Y/S bin 0 \[31:0\]

</td>
</tr>
<tr>
<td>




</td>
<td colspan="5">


 ...

</td>
</tr>
<tr>
<td>


532

</td>
<td colspan="5">


 G/Y/S bin 63 \[31:0\]

</td>
</tr>
<tr>
<td>


536

</td>
<td colspan="5">


 B/Cb/V bin 0 \[31:0\]

</td>
</tr>
<tr>
<td>




</td>
<td colspan="5">


 ...

</td>
</tr>
<tr>
<td>


788

</td>
<td colspan="5">


 B/Cb/V bin 63 \[31:0\]

</td>
</tr>
</tbody>
</table>


<table>
<caption>VSP1 HGO Data - 64 Bins, Max Mode (264 bytes)</caption>
<thead>
<tr>
<th>


Offset

</th>
<th colspan="5">


 Memory

</th>
</tr>
<tr>
<th>




</th>
<th>


\[31:24\]

</th>
<th>


\[23:16\]

</th>
<th>


\[15:8\]

</th>
<th colspan="2">


\[7:0\]

</th>
</tr>
</thead>
<tbody>
<tr>
<td>


0

</td>
<td>




</td>
<td>


max(R,G,B) max \[7:0\]

</td>
<td>




</td>
<td colspan="2">


max(R,G,B) min \[7:0\]

</td>
</tr>
<tr>
<td>


4

</td>
<td colspan="5">


 max(R,G,B) sum \[31:0\]

</td>
</tr>
<tr>
<td>


8

</td>
<td colspan="5">


 max(R,G,B) bin 0 \[31:0\]

</td>
</tr>
<tr>
<td>




</td>
<td colspan="5">


 ...

</td>
</tr>
<tr>
<td>


260

</td>
<td colspan="5">


 max(R,G,B) bin 63 \[31:0\]

</td>
</tr>
</tbody>
</table>


<table>
<caption>VSP1 HGO Data - 256 Bins, Normal Mode (1032 bytes)</caption>
<thead>
<tr>
<th>


Offset

</th>
<th colspan="5">


 Memory

</th>
</tr>
<tr>
<th>




</th>
<th>


\[31:24\]

</th>
<th>


\[23:16\]

</th>
<th>


\[15:8\]

</th>
<th colspan="2">


\[7:0\]

</th>
</tr>
</thead>
<tbody>
<tr>
<td>


0

</td>
<td>




</td>
<td>


Y max \[7:0\]

</td>
<td>




</td>
<td colspan="2">


Y min \[7:0\]

</td>
</tr>
<tr>
<td>


4

</td>
<td colspan="5">


 Y sum \[31:0\]

</td>
</tr>
<tr>
<td>


8

</td>
<td colspan="5">


 Y bin 0 \[31:0\]

</td>
</tr>
<tr>
<td>




</td>
<td colspan="5">


 ...

</td>
</tr>
<tr>
<td>


1028

</td>
<td colspan="5">


 Y bin 255 \[31:0\]

</td>
</tr>
</tbody>
</table>


<table>
<caption>VSP1 HGO Data - 256 Bins, Max Mode (1032 bytes)</caption>
<thead>
<tr>
<th>


Offset

</th>
<th colspan="5">


 Memory

</th>
</tr>
<tr>
<th>




</th>
<th>


\[31:24\]

</th>
<th>


\[23:16\]

</th>
<th>


\[15:8\]

</th>
<th colspan="2">


\[7:0\]

</th>
</tr>
</thead>
<tbody>
<tr>
<td>


0

</td>
<td>




</td>
<td>


max(R,G,B) max \[7:0\]

</td>
<td>




</td>
<td colspan="2">


max(R,G,B) min \[7:0\]

</td>
</tr>
<tr>
<td>


4

</td>
<td colspan="5">


 max(R,G,B) sum \[31:0\]

</td>
</tr>
<tr>
<td>


8

</td>
<td colspan="5">


 max(R,G,B) bin 0 \[31:0\]

</td>
</tr>
<tr>
<td>




</td>
<td colspan="5">


 ...

</td>
</tr>
<tr>
<td>


1028

</td>
<td colspan="5">


 max(R,G,B) bin 255 \[31:0\]

</td>
</tr>
</tbody>
</table>
