From 1bcb7539dfcc2dde9745a9637c0a4132de34a9d4 Mon Sep 17 00:00:00 2001 From: Nick Hollinghurst Date: Mon, 21 Nov 2022 14:47:29 +0000 Subject: 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 Reviewed-by: David Plowman Reviewed-by: Naushir Patuck Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/raspberrypi.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ipa/raspberrypi/raspberrypi.cpp') 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( + 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() == false) - agc->pause(); + agc->disableAuto(); else - agc->resume(); + agc->enableAuto(); libcameraMetadata_.set(controls::AeEnable, ctrl.second.get()); 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( + 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() == false) - awb->pause(); + awb->disableAuto(); else - awb->resume(); + awb->enableAuto(); libcameraMetadata_.set(controls::AwbEnable, ctrl.second.get()); -- cgit v1.2.1