← Documents Documentation/userspace-api/media/v4l/metafmt-vsp1-hgo.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Renesas VSP1 1-D Histogram

VSP1 HGO의 네 histogram 모드와 little-endian 결과 배치를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/metafmt-vsp1-hgo.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

metafmt-vsp1-hgo.rst:1-168

HGO는 RGB·YCbCr·HSV 입력에서 채널별 또는 RGB 최댓값/Y 단일 채널의 64·256-bin histogram을 만듭니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

HGO 동작 모드와 메모리 배치

1-168

`V4L2_META_FMT_VSP1_HGO`는 Renesas R-Car VSP1의 1-D Histogram(HGO) 엔진이 만든 데이터입니다. HGO는 crop 및 subsampling된 RGB, YCrCb 또는 HSV 입력에서 전체 픽셀의 최솟값·최댓값·합과 채널별 histogram을 계산합니다.

HGO 네 동작 모드
항목설명
64 bins normal세 채널을 독립적으로 계산해 64-bin histogram 세 개를 만듭니다. RGB, YCbCr, HSV를 지원합니다.
64 bins maximum각 픽셀의 max(R,G,B)를 사용해 64-bin histogram 하나를 만듭니다. RGB만 지원합니다.
256 bins normalY 채널만 사용해 256-bin histogram 하나를 만듭니다. YCbCr만 지원합니다.
256 bins maximum각 픽셀의 max(R,G,B)를 사용해 256-bin histogram 하나를 만듭니다. RGB만 지원합니다.

bin 수, 계산 채널과 지원 입력 형식을 구분합니다.

모든 데이터는 little endian으로 저장되고 원문 표의 각 cell은 한 바이트입니다.

64 bins normal: 792바이트
항목설명
offset 0R/Cr/H min [7:0], max [7:0]
offset 4G/Y/S min [7:0], max [7:0]
offset 8B/Cb/V min [7:0], max [7:0]
offset 12, 16, 20R/Cr/H, G/Y/S, B/Cb/V sum [31:0]
offset 24~276R/Cr/H bin 0~63, 각 32비트
offset 280~532G/Y/S bin 0~63, 각 32비트
offset 536~788B/Cb/V bin 0~63, 각 32비트

채널 세 개의 min/max, sum과 64개 bin이 연속 배치됩니다.

64 bins maximum: 264바이트
항목설명
offset 0max(R,G,B)의 min과 max [7:0]
offset 4max(R,G,B) sum [31:0]
offset 8~260max(R,G,B) bin 0~63, 각 32비트

RGB 세 채널의 최댓값을 하나의 신호로 취급합니다.

256 bins normal: 1032바이트
항목설명
offset 0Y min과 max [7:0]
offset 4Y sum [31:0]
offset 8~1028Y bin 0~255, 각 32비트

YCbCr의 Y 채널만 계산합니다.

256 bins maximum: 1032바이트
항목설명
offset 0max(R,G,B)의 min과 max [7:0]
offset 4max(R,G,B) sum [31:0]
offset 8~1028max(R,G,B) bin 0~255, 각 32비트

RGB 최댓값의 분포를 256단계로 계산합니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _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]