brintos

brintos / linux-shallow public Read only

0
0
Text · 3.9 KiB · d8830ff Raw
130 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2 3.. _v4l2-meta-fmt-vsp1-hgt:4 5*******************************6V4L2_META_FMT_VSP1_HGT ('VSPT')7*******************************8 9Renesas R-Car VSP1 2-D Histogram Data10 11 12Description13===========14 15This format describes histogram data generated by the Renesas R-Car VSP1162-D Histogram (HGT) engine.17 18The VSP1 HGT is a histogram computation engine that operates on HSV19data. It operates on a possibly cropped and subsampled input image and20computes the sum, maximum and minimum of the S component as well as a21weighted frequency histogram based on the H and S components.22 23The histogram is a matrix of 6 Hue and 32 Saturation buckets, 192 in24total. Each HSV value is added to one or more buckets with a weight25between 1 and 16 depending on the Hue areas configuration. Finding the26corresponding buckets is done by inspecting the H and S value independently.27 28The Saturation position **n** (0 - 31) of the bucket in the matrix is29found by the expression:30 31    n = S / 832 33The Hue position **m** (0 - 5) of the bucket in the matrix depends on34how the HGT Hue areas are configured. There are 6 user configurable Hue35Areas which can be configured to cover overlapping Hue values:36 37.. raw:: latex38 39    \small40 41::42 43         Area 0       Area 1       Area 2       Area 3       Area 4       Area 544        ________     ________     ________     ________     ________     ________45   \   /|      |\   /|      |\   /|      |\   /|      |\   /|      |\   /|      |\   /46    \ / |      | \ / |      | \ / |      | \ / |      | \ / |      | \ / |      | \ /47     X  |      |  X  |      |  X  |      |  X  |      |  X  |      |  X  |      |  X48    / \ |      | / \ |      | / \ |      | / \ |      | / \ |      | / \ |      | / \49   /   \|      |/   \|      |/   \|      |/   \|      |/   \|      |/   \|      |/   \50  5U   0L      0U   1L      1U   2L      2U   3L      3U   4L      4U   5L      5U   0L51        <0..............................Hue Value............................255>52 53 54.. raw:: latex55 56    \normalsize57 58When two consecutive areas don't overlap (n+1L is equal to nU) the boundary59value is considered as part of the lower area.60 61Pixels with a hue value included in the centre of an area (between nL and nU62included) are attributed to that single area and given a weight of 16. Pixels63with a hue value included in the overlapping region between two areas (between64n+1L and nU excluded) are attributed to both areas and given a weight for each65of these areas proportional to their position along the diagonal lines66(rounded down).67 68The Hue area setup must match one of the following constrains:69 70::71 72    0L <= 0U <= 1L <= 1U <= 2L <= 2U <= 3L <= 3U <= 4L <= 4U <= 5L <= 5U73 74::75 76    0U <= 1L <= 1U <= 2L <= 2U <= 3L <= 3U <= 4L <= 4U <= 5L <= 5U <= 0L77 78**Byte Order.**79All data is stored in memory in little endian format. Each cell in the tables80contains one byte.81 82.. flat-table:: VSP1 HGT Data - (776 bytes)83    :header-rows:  284    :stub-columns: 085 86    * - Offset87      - :cspan:`4` Memory88    * -89      - [31:24]90      - [23:16]91      - [15:8]92      - [7:0]93    * - 094      - -95      - S max [7:0]96      - -97      - S min [7:0]98    * - 499      - :cspan:`4` S sum [31:0]100    * - 8101      - :cspan:`4` Histogram bucket (m=0, n=0) [31:0]102    * - 12103      - :cspan:`4` Histogram bucket (m=0, n=1) [31:0]104    * -105      - :cspan:`4` ...106    * - 132107      - :cspan:`4` Histogram bucket (m=0, n=31) [31:0]108    * - 136109      - :cspan:`4` Histogram bucket (m=1, n=0) [31:0]110    * -111      - :cspan:`4` ...112    * - 264113      - :cspan:`4` Histogram bucket (m=2, n=0) [31:0]114    * -115      - :cspan:`4` ...116    * - 392117      - :cspan:`4` Histogram bucket (m=3, n=0) [31:0]118    * -119      - :cspan:`4` ...120    * - 520121      - :cspan:`4` Histogram bucket (m=4, n=0) [31:0]122    * -123      - :cspan:`4` ...124    * - 648125      - :cspan:`4` Histogram bucket (m=5, n=0) [31:0]126    * -127      - :cspan:`4` ...128    * - 772129      - :cspan:`4` Histogram bucket (m=5, n=31) [31:0]130