From patchwork Wed Feb 17 15:24:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11328 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 25737BD1F1 for ; Wed, 17 Feb 2021 15:24:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 99241680E9; Wed, 17 Feb 2021 16:24:07 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Aw/j7F3q"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CBCB463804 for ; Wed, 17 Feb 2021 16:24:05 +0100 (CET) Received: by mail-wm1-x32f.google.com with SMTP id l17so2445051wmq.2 for ; Wed, 17 Feb 2021 07:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o0qg0OfxMGbwWZERvrfrema4F+IiiceIbLXiio5L2wM=; b=Aw/j7F3qW9aw4FETzZ4y/Z4bDWPwZf64eETKX/1Z3oqPF8fyYaeiVEFjjhaoE57hkH RAd8uw//vhj0TjYwLNOSr86PWHz1/zE2h05h8Ug5xV5RDxVTqh0IOtBBX8qo3URo03Zn QGSUyaqXWorn12DTTThpg2UeIFpSdYciDgbXQfQjsyqowaEnIctKnH2+qMlMaZ9vt5MU H7NuvK7SWUKYqHTnvVoHRma32ensOC0uCjPS9Z+Mj379rLrcdSk+W4QYFbw3JfZseKj9 oCNgzFmCEUEq/t1OOBglQ0NcpRpDzl0VKvtcCaKE4gfd5GuraeHfSuyRQHnbwV2Rw73Y T/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o0qg0OfxMGbwWZERvrfrema4F+IiiceIbLXiio5L2wM=; b=rKXvvea2IUd2Bm+PNy6XBH8Y2XEbqrYxrR6Ti6A0QCBscc3Qdfcju+a3Pn8CItZAVX JFdNN5jbQAaIlOZ8gqN9bTvEVxhgmd9dHs/fuyV8WcxkQwX5f5IeW60vLisw1O373FyN veZuNCuViM6C4jX7Pvm+eatQWa1liLd8GlOT+lSmMXAGTFbkXYCIXfxWfrEZfm47pa/I WiOlJ3EA6kY+DLeV6n8FiBcaVqZvINZpukPeOkxhRaIU0sXjsE+Vs0f+2TV+j7fpMvCC J8plenEYHILLUS1IGpLANRi3lgkMVS8Tz8tSnXKuV4f/ZrEtqkxNznfWMxZnjCe4cCIU n+mg== X-Gm-Message-State: AOAM531BYsx8951FPtiGMwwCJIitIPwY5JDkP0i+Vfh87Ia7teHyefXI 0oJJo9KNho1FwycHpG4TMvQa6aZdTlWSprsz X-Google-Smtp-Source: ABdhPJynsRiyQF2gJ6PBGhtjuYiqCqQuFAe+NaX61TOcHBtJMzs6NfNHR6pYtgF5k4nJmW0LGgNwdA== X-Received: by 2002:a1c:5584:: with SMTP id j126mr7573223wmb.153.1613575445193; Wed, 17 Feb 2021 07:24:05 -0800 (PST) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id y2sm3495010wmg.13.2021.02.17.07.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 07:24:04 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 17 Feb 2021 15:24:00 +0000 Message-Id: <20210217152400.1996-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: raspberrypi: Do not require SDN (spatial denoise) algorithm X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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. Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Naushir Patuck --- src/ipa/raspberrypi/raspberrypi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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( 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(); auto mode = DenoiseModeTable.find(idx);