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