From 3b07397f0e7d93d54535d9c87e7b9c19d04c97f0 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 15 Oct 2021 03:28:20 +0300 Subject: ipa: ipu3: agc: Remove "using" directive from agc.h header "using" directives are harmful in headers, as they propagate the namespace short-circuit to all files that include the header, directly or indirectly. Drop the directive from agc.h, and use utils::Duration explicitly. While at it, shorten the namespace qualifier from libcamera::utils:: to utils:: in agc.cpp for Duration. Signed-off-by: Laurent Pinchart Reviewed-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/ipa/ipu3/algorithms/agc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ipa/ipu3/algorithms/agc.cpp') 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(exposure * currentExposure_ / currentExposureNoDg_), kMinExposure, kMaxExposure); newExposure = currentExposure_ / exposure; -- cgit v1.2.1