summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipa/ipu3/algorithms/agc.cpp6
-rw-r--r--src/ipa/ipu3/algorithms/agc.h14
2 files changed, 9 insertions, 11 deletions
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 5eafe82c..970ec424 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -140,20 +140,20 @@ void Agc::lockExposureGain(uint32_t &exposure, double &gain)
double newGain = kEvGainTarget * knumHistogramBins / iqMean_;
/* extracted from Rpi::Agc::computeTargetExposure */
- libcamera::utils::Duration currentShutter = exposure * lineDuration_;
+ utils::Duration currentShutter = exposure * lineDuration_;
currentExposureNoDg_ = currentShutter * gain;
LOG(IPU3Agc, Debug) << "Actual total exposure " << currentExposureNoDg_
<< " Shutter speed " << currentShutter
<< " Gain " << gain;
currentExposure_ = currentExposureNoDg_ * newGain;
- libcamera::utils::Duration maxTotalExposure = maxExposureTime_ * kMaxGain;
+ utils::Duration maxTotalExposure = maxExposureTime_ * kMaxGain;
currentExposure_ = std::min(currentExposure_, maxTotalExposure);
LOG(IPU3Agc, Debug) << "Target total exposure " << currentExposure_;
/* \todo: estimate if we need to desaturate */
filterExposure();
- libcamera::utils::Duration newExposure = 0.0s;
+ utils::Duration newExposure = 0.0s;
if (currentShutter < maxExposureTime_) {
exposure = std::clamp(static_cast<uint32_t>(exposure * currentExposure_ / currentExposureNoDg_), kMinExposure, kMaxExposure);
newExposure = currentExposure_ / exposure;
diff --git a/src/ipa/ipu3/algorithms/agc.h b/src/ipa/ipu3/algorithms/agc.h
index 64b71c65..e0c315fc 100644
--- a/src/ipa/ipu3/algorithms/agc.h
+++ b/src/ipa/ipu3/algorithms/agc.h
@@ -21,8 +21,6 @@ struct IPACameraSensorInfo;
namespace ipa::ipu3::algorithms {
-using utils::Duration;
-
class Agc : public Algorithm
{
public:
@@ -43,13 +41,13 @@ private:
double iqMean_;
- Duration lineDuration_;
- Duration maxExposureTime_;
+ utils::Duration lineDuration_;
+ utils::Duration maxExposureTime_;
- Duration prevExposure_;
- Duration prevExposureNoDg_;
- Duration currentExposure_;
- Duration currentExposureNoDg_;
+ utils::Duration prevExposure_;
+ utils::Duration prevExposureNoDg_;
+ utils::Duration currentExposure_;
+ utils::Duration currentExposureNoDg_;
uint32_t stride_;
};