From 750019bf5517e83df8632d243a7256fe959577c9 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Wed, 23 Jun 2021 16:30:58 +0530 Subject: ipa: ipu3: Use libcamera::utils::Duration helper class for durations std::chrono::Duration is provided quite conveniently by libcamera::utils::Duration wrapper. Port IPAIPU3 to use that for duration-type entities (such as exposure time), such that it becomes consistent with rest of the codebase. The commit doesn't introduce any functional changes. Reviewed-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham Signed-off-by: Umang Jain --- src/ipa/ipu3/ipu3_agc.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/ipa/ipu3/ipu3_agc.h') diff --git a/src/ipa/ipu3/ipu3_agc.h b/src/ipa/ipu3/ipu3_agc.h index f3d40557..a5a78233 100644 --- a/src/ipa/ipu3/ipu3_agc.h +++ b/src/ipa/ipu3/ipu3_agc.h @@ -14,6 +14,8 @@ #include +#include "libcamera/internal/utils.h" + #include "libipa/algorithm.h" namespace libcamera { @@ -22,6 +24,8 @@ struct IPACameraSensorInfo; namespace ipa::ipu3 { +using utils::Duration; + class IPU3Agc : public Algorithm { public: @@ -51,13 +55,13 @@ private: double iqMean_; double gamma_; - double lineDuration_; - double maxExposureTime_; + Duration lineDuration_; + Duration maxExposureTime_; - double prevExposure_; - double prevExposureNoDg_; - double currentExposure_; - double currentExposureNoDg_; + Duration prevExposure_; + Duration prevExposureNoDg_; + Duration currentExposure_; + Duration currentExposureNoDg_; }; } /* namespace ipa::ipu3 */ -- cgit v1.2.1