diff options
Diffstat (limited to 'src/ipa/simple/algorithms')
-rw-r--r-- | src/ipa/simple/algorithms/agc.cpp | 8 | ||||
-rw-r--r-- | src/ipa/simple/algorithms/agc.h | 2 | ||||
-rw-r--r-- | src/ipa/simple/algorithms/blc.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/ipa/simple/algorithms/agc.cpp b/src/ipa/simple/algorithms/agc.cpp index df92edd7..72aade14 100644 --- a/src/ipa/simple/algorithms/agc.cpp +++ b/src/ipa/simple/algorithms/agc.cpp @@ -39,7 +39,7 @@ Agc::Agc() { } -void Agc::updateExposure(IPAContext &context, double exposureMSV) +void Agc::updateExposure(IPAContext &context, IPAFrameContext &frameContext, double exposureMSV) { /* * kExpDenominator of 10 gives ~10% increment/decrement; @@ -50,8 +50,8 @@ void Agc::updateExposure(IPAContext &context, double exposureMSV) static constexpr uint8_t kExpNumeratorDown = kExpDenominator - 1; double next; - int32_t &exposure = context.activeState.agc.exposure; - double &again = context.activeState.agc.again; + int32_t &exposure = frameContext.sensor.exposure; + double &again = frameContext.sensor.gain; if (exposureMSV < kExposureOptimal - kExposureSatisfactory) { next = exposure * kExpNumeratorUp / kExpDenominator; @@ -129,7 +129,7 @@ void Agc::process(IPAContext &context, } float exposureMSV = (denom == 0 ? 0 : static_cast<float>(num) / denom); - updateExposure(context, exposureMSV); + updateExposure(context, frameContext, exposureMSV); } REGISTER_IPA_ALGORITHM(Agc, "Agc") diff --git a/src/ipa/simple/algorithms/agc.h b/src/ipa/simple/algorithms/agc.h index ad5fca9f..112d9f5a 100644 --- a/src/ipa/simple/algorithms/agc.h +++ b/src/ipa/simple/algorithms/agc.h @@ -25,7 +25,7 @@ public: ControlList &metadata) override; private: - void updateExposure(IPAContext &context, double exposureMSV); + void updateExposure(IPAContext &context, IPAFrameContext &frameContext, double exposureMSV); }; } /* namespace ipa::soft::algorithms */ diff --git a/src/ipa/simple/algorithms/blc.h b/src/ipa/simple/algorithms/blc.h index 2cf2a877..67c688ae 100644 --- a/src/ipa/simple/algorithms/blc.h +++ b/src/ipa/simple/algorithms/blc.h @@ -27,7 +27,7 @@ public: ControlList &metadata) override; private: - uint32_t exposure_; + int32_t exposure_; double gain_; }; |