diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-08-22 17:23:37 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-08-25 02:03:16 +0300 |
commit | f2734ff3ab09d3ab78321daf61d18cb628da2b98 (patch) | |
tree | 5604776f1d76221a964319e60500eb8106657333 /src/ipa/rkisp1 | |
parent | b869d4463ef38934da35ffaf287870541e0dee47 (diff) |
libcamera: Replace utils::clamp() with std::clamp()
Now that libcamera uses C++17, the C++ standard library provides
std::clamp(). Drop our custom utils::clamp() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/ipa/rkisp1')
-rw-r--r-- | src/ipa/rkisp1/rkisp1.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 4bb16273..3a1c50c4 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -24,7 +24,6 @@ #include <libipa/ipa_interface_wrapper.h> #include "libcamera/internal/log.h" -#include "libcamera/internal/utils.h" namespace libcamera { @@ -234,13 +233,13 @@ void IPARkISP1::updateStatistics(unsigned int frame, double exposure; exposure = factor * exposure_ * gain_ / minGain_; - exposure_ = utils::clamp<uint64_t>((uint64_t)exposure, - minExposure_, - maxExposure_); + exposure_ = std::clamp<uint64_t>((uint64_t)exposure, + minExposure_, + maxExposure_); exposure = exposure / exposure_ * minGain_; - gain_ = utils::clamp<uint64_t>((uint64_t)exposure, - minGain_, maxGain_); + gain_ = std::clamp<uint64_t>((uint64_t)exposure, + minGain_, maxGain_); setControls(frame + 1); } |