From 58732e4b49583e0b035980d71e8d15e76bbaf77b Mon Sep 17 00:00:00 2001 From: David Plowman Date: Tue, 23 Jun 2020 10:14:04 +0100 Subject: libcamera: ipa: raspberrypi: Plumb in the libcamera sharpness control This simply wires up the libcamera sharpness control in the Raspberry Pi IPAs so that it controls the strength of the Raspberry Pi sharpness control algorithm. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/raspberrypi.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ipa/raspberrypi') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 42c84b16..bc89ab58 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -47,6 +47,7 @@ #include "metadata.hpp" #include "noise_status.h" #include "sdn_status.h" +#include "sharpen_algorithm.hpp" #include "sharpen_status.h" namespace libcamera { @@ -633,6 +634,17 @@ void IPARPi::queueRequest(const ControlList &controls) break; } + case controls::SHARPNESS: { + RPi::SharpenAlgorithm *sharpen = dynamic_cast( + controller_.GetAlgorithm("sharpen")); + ASSERT(sharpen); + + sharpen->SetStrength(ctrl.second.get()); + libcameraMetadata_.set(controls::Sharpness, + ctrl.second.get()); + break; + } + default: LOG(IPARPI, Warning) << "Ctrl " << controls::controls.at(ctrl.first)->name() -- cgit v1.2.1