summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/agc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1/algorithms/agc.cpp')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index d6abdc31..dd97afc0 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -12,6 +12,7 @@
#include <cmath>
#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
#include <libcamera/ipa/core_ipa_interface.h>
@@ -145,7 +146,7 @@ void Agc::computeExposure(IPAContext &context, double yGain)
kMaxAnalogueGain);
/* Consider within 1% of the target as correctly exposed. */
- if (std::abs(yGain - 1.0) < 0.01)
+ if (utils::abs_diff(yGain, 1.0) < 0.01)
return;
/* extracted from Rpi::Agc::computeTargetExposure. */