summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/ipu3_agc.h
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2021-06-23 16:30:58 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2021-06-24 10:27:49 +0530
commit750019bf5517e83df8632d243a7256fe959577c9 (patch)
tree2f0195e5fe4bdf7e617593831de57ce315676efd /src/ipa/ipu3/ipu3_agc.h
parentd372aaa10ddb0ab405c4054a0a407921127f2100 (diff)
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 <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/ipu3_agc.h')
-rw-r--r--src/ipa/ipu3/ipu3_agc.h16
1 files changed, 10 insertions, 6 deletions
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 <libcamera/geometry.h>
+#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 */