summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2021-02-17 15:24:00 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-02-19 11:32:10 +0000
commit9fe81a51abd2ad875e4343df5f0c2007242b8bcf (patch)
tree55ad3157b73a69d0ade55739fe7a5b03ea9ccda4
parent84297540b629ec7a0ccb7d053c638b4f88dc7920 (diff)
ipa: raspberrypi: Do not require SDN (spatial denoise) algorithm
A camera tuning is not required to load an SDN algorithm. In keeping with other controls, do not fail when a particular control was expecting this algorithm, just warn that it is not present. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 81a3195c..4608dfd4 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -875,7 +875,11 @@ void IPARPi::queueRequest(const ControlList &controls)
case controls::NOISE_REDUCTION_MODE: {
RPiController::DenoiseAlgorithm *sdn = dynamic_cast<RPiController::DenoiseAlgorithm *>(
controller_.GetAlgorithm("SDN"));
- ASSERT(sdn);
+ if (!sdn) {
+ LOG(IPARPI, Warning)
+ << "Could not set NOISE_REDUCTION_MODE - no SDN algorithm";
+ break;
+ }
int32_t idx = ctrl.second.get<int32_t>();
auto mode = DenoiseModeTable.find(idx);