summaryrefslogtreecommitdiff
path: root/src/ipa
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2020-06-23 10:14:04 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-06-25 06:47:53 +0300
commit58732e4b49583e0b035980d71e8d15e76bbaf77b (patch)
treef4abb02cd1c91494372fdf694b60fa767e118cef /src/ipa
parent0dbc6a507c682db1590105765119b7fa59f6493e (diff)
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 <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp12
1 files changed, 12 insertions, 0 deletions
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<RPi::SharpenAlgorithm *>(
+ controller_.GetAlgorithm("sharpen"));
+ ASSERT(sharpen);
+
+ sharpen->SetStrength(ctrl.second.get<float>());
+ libcameraMetadata_.set(controls::Sharpness,
+ ctrl.second.get<float>());
+ break;
+ }
+
default:
LOG(IPARPI, Warning)
<< "Ctrl " << controls::controls.at(ctrl.first)->name()