From patchwork Fri Feb 6 15:12:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 26113 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by patchwork.libcamera.org (Postfix) with ESMTPS id 874C3C3220 for ; Mon, 9 Feb 2026 12:47:55 +0000 (UTC) Received: from monstersaurus.ideasonboard.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D0D3863F for ; Mon, 9 Feb 2026 13:47:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1770641229; bh=h0NRG0EK/7/A3f9e9q37SbY6v3ynHokIwbP/yBVBXBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Resent-From:Resent-To:From; b=R1hew/lMRvVZgglgWLrBpJE3mNwJVzsH9eY5p46lopx1bGoE0B2TNxHCAEbQ89Anh C1sJFxXxxLp8gUoNIjxne9plulRN32MmvcULlg8GspaS4wwPBIfPyOFanY2VQlw1Iv /4DhcQ94mFvJ7lSGcTlq7kt4WC6PqVYNSXlI1JMg= Delivered-To: kbingham@ideasonboard.com Received: from perceval.ideasonboard.com by perceval.ideasonboard.com with LMTP id 0D1DHbUEhmltSxgA4E0KoQ (envelope-from ) for ; Fri, 06 Feb 2026 16:11:49 +0100 Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by perceval.ideasonboard.com (Postfix) with ESMTPS id 0913B1752; Fri, 6 Feb 2026 16:11:47 +0100 (CET) Authentication-Results: perceval.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.a=rsa-sha256 header.s=mail header.b=JZIioPHP; dkim-atps=neutral Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB58362091; Fri, 6 Feb 2026 16:12:28 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JZIioPHP"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DAE1762091 for ; Fri, 6 Feb 2026 16:12:25 +0100 (CET) Received: from rui-Precision-7560.tail5b760b.ts.net (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 425402E0; Fri, 6 Feb 2026 16:11:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1770390702; bh=h0NRG0EK/7/A3f9e9q37SbY6v3ynHokIwbP/yBVBXBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JZIioPHPaeMnliOxPyVgyEZtVk5Pv0FtwJLt2SZaKaMcxjta0MrHxgBf1R0enfgIe Se1uqCKA94u5//ZU/Hzq14UlC3eRIEKGqscSkw61HeZNVpkz1l4XXLS0rZIgej7is4 12q3mwtj5rD3fmk1iG2QJ73yM0x+2F+eFszjkeCI= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang , Isaac Scott , Jacopo Mondi Subject: [PATCH v13 3/7] ipa: rkisp1: algorithms: register noise reduction controls Date: Fri, 6 Feb 2026 10:12:01 -0500 Message-ID: <20260206151205.143671-4-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206151205.143671-1-rui.wang@ideasonboard.com> References: <20260206151205.143671-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 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" X-TUID: GcvNc2Vr3XpT Resent-From: Kieran Bingham Resent-To: parsemail@patchwork.libcamera.org Register NoiseReductionMode controls based on the tuning data and default to the active DPF mode. Remove the static NoiseReductionMode entry from the IPA control map now that DPF owns its registration. Signed-off-by: Rui Wang Reviewed-by: Isaac Scott Reviewed-by: Jacopo Mondi --- changelog : --No change since v10 changelog since v11: - Simple Debug log changelog since v12: - remove curly braceket of for looper Reviewed-by tags from v11 are carried over (no function changes). --- src/ipa/rkisp1/algorithms/dpf.cpp | 20 ++++++++++++++++++++ src/ipa/rkisp1/algorithms/dpf.h | 1 + src/ipa/rkisp1/rkisp1.cpp | 1 - 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index 9d7fcc1c..5f46253e 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -52,6 +52,9 @@ int Dpf::init([[maybe_unused]] IPAContext &context, if (ret) return ret; + /* Register available controls. */ + registerControls(context); + return 0; } @@ -117,6 +120,23 @@ int Dpf::parseConfig(const YamlObject &tuningData) return 0; } +void Dpf::registerControls(IPAContext &context) +{ + /* + * Populate the control map with the available noise reduction modes. + * This allows applications to query and select from the modes defined + * in the tuning data. + */ + std::vector modes{}; + for (const auto &mode : noiseReductionModes_) + modes.emplace_back(mode.modeValue); + /* + * Set the default mode to the active mode. + */ + context.ctrlMap[&controls::draft::NoiseReductionMode] = + ControlInfo(modes, activeMode_->modeValue); +} + int Dpf::parseSingleConfig(const YamlObject &tuningData, rkisp1_cif_isp_dpf_config &config, rkisp1_cif_isp_dpf_strength_config &strengthConfig) diff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h index 11fc88e4..43effcbe 100644 --- a/src/ipa/rkisp1/algorithms/dpf.h +++ b/src/ipa/rkisp1/algorithms/dpf.h @@ -37,6 +37,7 @@ private: }; int parseConfig(const YamlObject &tuningData); + void registerControls(IPAContext &context); int parseSingleConfig(const YamlObject &tuningData, rkisp1_cif_isp_dpf_config &config, rkisp1_cif_isp_dpf_strength_config &strengthConfig); diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index fbcc3910..402ed62c 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -120,7 +120,6 @@ const IPAHwSettings ipaHwSettingsV12{ /* List of controls handled by the RkISP1 IPA */ const ControlInfoMap::Map rkisp1Controls{ { &controls::DebugMetadataEnable, ControlInfo(false, true, false) }, - { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }, }; } /* namespace */