summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipa/simple/algorithms/blc.cpp10
-rw-r--r--src/ipa/simple/algorithms/blc.h2
-rw-r--r--src/ipa/simple/ipa_context.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp
index 53c356c8..8c1e9ed0 100644
--- a/src/ipa/simple/algorithms/blc.cpp
+++ b/src/ipa/simple/algorithms/blc.cpp
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
- * Copyright (C) 2024, Red Hat Inc.
+ * Copyright (C) 2024-2025, Red Hat Inc.
*
* Black level handling
*/
@@ -63,8 +63,8 @@ void BlackLevel::process(IPAContext &context,
if (context.configuration.black.level.has_value())
return;
- if (frameContext.sensor.exposure == exposure_ &&
- frameContext.sensor.gain == gain_) {
+ if (frameContext.sensor.exposure == context.activeState.blc.lastExposure &&
+ frameContext.sensor.gain == context.activeState.blc.lastGain) {
return;
}
@@ -88,8 +88,8 @@ void BlackLevel::process(IPAContext &context,
seen += histogram[i];
if (seen >= pixelThreshold) {
context.activeState.blc.level = i * histogramRatio;
- exposure_ = frameContext.sensor.exposure;
- gain_ = frameContext.sensor.gain;
+ context.activeState.blc.lastExposure = frameContext.sensor.exposure;
+ context.activeState.blc.lastGain = frameContext.sensor.gain;
LOG(IPASoftBL, Debug)
<< "Auto-set black level: "
<< i << "/" << SwIspStats::kYHistogramSize
diff --git a/src/ipa/simple/algorithms/blc.h b/src/ipa/simple/algorithms/blc.h
index 52d59cab..db9e6d63 100644
--- a/src/ipa/simple/algorithms/blc.h
+++ b/src/ipa/simple/algorithms/blc.h
@@ -30,8 +30,6 @@ public:
ControlList &metadata) override;
private:
- int32_t exposure_;
- double gain_;
std::optional<uint8_t> definedLevel_;
};
diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h
index 7dc2cd7a..6b1a0655 100644
--- a/src/ipa/simple/ipa_context.h
+++ b/src/ipa/simple/ipa_context.h
@@ -39,6 +39,8 @@ struct IPASessionConfiguration {
struct IPAActiveState {
struct {
uint8_t level;
+ int32_t lastExposure;
+ double lastGain;
} blc;
struct {