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>
This commit is contained in:
parent
b869d4463e
commit
f2734ff3ab
6 changed files with 14 additions and 29 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue