summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-16 20:54:40 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-23 15:12:42 +0200
commita5e6b7f0dbf74b77991aa149c6d659872dade87c (patch)
treef5a0e10a3fbd59189fba63cfe148768950ea7cda /src
parent528dc21b09cc4c0e202c09677bc742db5a5e484d (diff)
ipa: rkisp1: Fix histogram weights configuration
The histogram weights are initialized to hardcoded 1's for each histogram grid cell. The code uses the wrong variable for the grid size, resulting in some weights having a 0 value. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index da705b14..47a6f7b2 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -175,7 +175,7 @@ void Agc::prepare(IPAContext &context, const uint32_t frame,
/* Set an average weighted histogram. */
Span<uint8_t> weights{
params->meas.hst_config.hist_weight,
- context.hw->numHistogramBins
+ context.hw->numHistogramWeights
};
std::fill(weights.begin(), weights.end(), 1);
/* Step size can't be less than 3. */