summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/raspberrypi.cpp
diff options
context:
space:
mode:
authorNick Hollinghurst <nick.hollinghurst@raspberrypi.com>2022-11-21 14:47:29 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-11-21 17:33:29 +0200
commit1bcb7539dfcc2dde9745a9637c0a4132de34a9d4 (patch)
treeb3759b9ea1d01976acffeb466e80fe158762f376 /src/ipa/raspberrypi/raspberrypi.cpp
parent47c53f8084ed9e6e40cd2f8f74415472ccccef9c (diff)
ipa: raspberrypi: Remove generic "pause" mechanism from Algorithm
No existing Algorithm used the base pause(), resume() functions or the paused_ flag, nor is there a need for a generic pause API. Remove these. The AGC and AWB algorithms now have methods named disableAuto(), enableAuto() which better describe their functionality. Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/raspberrypi.cpp')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index b74f1ecf..beb076dc 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -706,7 +706,8 @@ void IPARPi::queueRequest(const ControlList &controls)
switch (ctrl.first) {
case controls::AE_ENABLE: {
- RPiController::Algorithm *agc = controller_.getAlgorithm("agc");
+ RPiController::AgcAlgorithm *agc = dynamic_cast<RPiController::AgcAlgorithm *>(
+ controller_.getAlgorithm("agc"));
if (!agc) {
LOG(IPARPI, Warning)
<< "Could not set AE_ENABLE - no AGC algorithm";
@@ -714,9 +715,9 @@ void IPARPi::queueRequest(const ControlList &controls)
}
if (ctrl.second.get<bool>() == false)
- agc->pause();
+ agc->disableAuto();
else
- agc->resume();
+ agc->enableAuto();
libcameraMetadata_.set(controls::AeEnable, ctrl.second.get<bool>());
break;
@@ -835,7 +836,8 @@ void IPARPi::queueRequest(const ControlList &controls)
}
case controls::AWB_ENABLE: {
- RPiController::Algorithm *awb = controller_.getAlgorithm("awb");
+ RPiController::AwbAlgorithm *awb = dynamic_cast<RPiController::AwbAlgorithm *>(
+ controller_.getAlgorithm("awb"));
if (!awb) {
LOG(IPARPI, Warning)
<< "Could not set AWB_ENABLE - no AWB algorithm";
@@ -843,9 +845,9 @@ void IPARPi::queueRequest(const ControlList &controls)
}
if (ctrl.second.get<bool>() == false)
- awb->pause();
+ awb->disableAuto();
else
- awb->resume();
+ awb->enableAuto();
libcameraMetadata_.set(controls::AwbEnable,
ctrl.second.get<bool>());