From 58e63a6e7e09f271793663024b9777fb6378c33b Mon Sep 17 00:00:00 2001 From: David Plowman Date: Tue, 23 Jun 2020 10:14:02 +0100 Subject: libcamera: ipa: raspberrypi: Make sharpening mode_factor an ordinary double No need for it to be std::atomic as SwitchMode runs synchronously with Prepare. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/sharpen.cpp | 7 +++---- src/ipa/raspberrypi/controller/rpi/sharpen.hpp | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ipa') diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp index 086952fd..4c2fdb3e 100644 --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp @@ -44,13 +44,12 @@ void Sharpen::Read(boost::property_tree::ptree const ¶ms) void Sharpen::Prepare(Metadata *image_metadata) { - double mode_factor = mode_factor_; struct SharpenStatus status; // Binned modes seem to need the sharpening toned down with this // pipeline. - status.threshold = threshold_ * mode_factor; - status.strength = strength_ / mode_factor; - status.limit = limit_ / mode_factor; + status.threshold = threshold_ * mode_factor_; + status.strength = strength_ / mode_factor_; + status.limit = limit_ / mode_factor_; image_metadata->Set("sharpen.status", status); } diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.hpp b/src/ipa/raspberrypi/controller/rpi/sharpen.hpp index f871aa65..a3bf899d 100644 --- a/src/ipa/raspberrypi/controller/rpi/sharpen.hpp +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.hpp @@ -26,7 +26,7 @@ private: double threshold_; double strength_; double limit_; - std::atomic mode_factor_; + double mode_factor_; }; } // namespace RPi -- cgit v1.2.1