{"id":25893,"url":"https://patchwork.libcamera.org/api/patches/25893/?format=json","web_url":"https://patchwork.libcamera.org/patch/25893/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260120153057.1703714-4-rui.wang@ideasonboard.com>","date":"2026-01-20T15:30:53","name":"[v10,3/7] ipa: rkisp1: algorithms: register noise reduction controls","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"04210364a1b933c06801ca5153a47919001b9b3c","submitter":{"id":241,"url":"https://patchwork.libcamera.org/api/people/241/?format=json","name":"Rui Wang","email":"rui.wang@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25893/mbox/","series":[{"id":5725,"url":"https://patchwork.libcamera.org/api/series/5725/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5725","date":"2026-01-20T15:30:50","name":"refactor DPF parsing and initialization","version":10,"mbox":"https://patchwork.libcamera.org/series/5725/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25893/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25893/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 21FE4BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 15:31:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D4C6E61FC7;\n\tTue, 20 Jan 2026 16:31:25 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6AEC61FBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 16:31:18 +0100 (CET)","from rui-Precision-7560.local (unknown [209.216.103.65])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 227212169;\n\tTue, 20 Jan 2026 16:30:47 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QAshlnIV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768923047;\n\tbh=cDbOWw+rhpoHqV0DVQ/wd9xIlgJXtvfMFeexp4vVYxE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=QAshlnIVjKR+bymzeJpcJAqPSEglVWL/SPinf74erpTS99/UNxfqvojdiTviAD3Da\n\tebbh5EvSHDYjNXfF6qTw8WZ17dJBUj4ma6W6O3rxIY7mifyOVBSOVQh8oG54FABgyu\n\tiqsP7jrO8w1oLVk9VD/33KkjE4PiED/LlsGkbZvo=","From":"Rui Wang <rui.wang@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Rui Wang <rui.wang@ideasonboard.com>","Subject":"[PATCH v10 3/7] ipa: rkisp1: algorithms: register noise reduction\n\tcontrols","Date":"Tue, 20 Jan 2026 10:30:53 -0500","Message-ID":"<20260120153057.1703714-4-rui.wang@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260120153057.1703714-1-rui.wang@ideasonboard.com>","References":"<20260120153057.1703714-1-rui.wang@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Register NoiseReductionMode controls based on the tuning data and default\nto the active DPF mode. Remove the static NoiseReductionMode entry from\nthe IPA control map now that DPF owns its registration.\n\nSigned-off-by: Rui Wang <rui.wang@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/dpf.cpp | 21 +++++++++++++++++++++\n src/ipa/rkisp1/algorithms/dpf.h   |  1 +\n src/ipa/rkisp1/rkisp1.cpp         |  1 -\n 3 files changed, 22 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\nindex 659a1a82..21ce8ace 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.cpp\n+++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n@@ -77,6 +77,9 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n \tif (ret)\n \t\treturn ret;\n \n+\t/* Register available controls. */\n+\tregisterControls(context);\n+\n \treturn 0;\n }\n \n@@ -136,6 +139,24 @@ int Dpf::parseConfig(const YamlObject &tuningData)\n \treturn 0;\n }\n \n+void Dpf::registerControls(IPAContext &context)\n+{\n+\t/*\n+\t * Populate the control map with the available noise reduction modes.\n+\t * This allows applications to query and select from the modes defined\n+\t * in the tuning data.\n+\t */\n+\tstd::vector<ControlValue> modes{ controls::draft::NoiseReductionModeOff };\n+\tfor (const auto &mode : noiseReductionModes_) {\n+\t\tmodes.emplace_back(mode.modeValue);\n+\t}\n+\t/*\n+\t * Set the default mode to the active mode.\n+\t */\n+\tcontext.ctrlMap[&controls::draft::NoiseReductionMode] =\n+\t\tControlInfo(modes, activeMode_->modeValue);\n+}\n+\n int Dpf::parseSingleConfig(const YamlObject &tuningData,\n \t\t\t   rkisp1_cif_isp_dpf_config &config,\n \t\t\t   rkisp1_cif_isp_dpf_strength_config &strengthConfig)\ndiff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h\nindex 11fc88e4..43effcbe 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.h\n+++ b/src/ipa/rkisp1/algorithms/dpf.h\n@@ -37,6 +37,7 @@ private:\n \t};\n \n \tint parseConfig(const YamlObject &tuningData);\n+\tvoid registerControls(IPAContext &context);\n \tint parseSingleConfig(const YamlObject &tuningData,\n \t\t\t      rkisp1_cif_isp_dpf_config &config,\n \t\t\t      rkisp1_cif_isp_dpf_strength_config &strengthConfig);\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex fbcc3910..402ed62c 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -120,7 +120,6 @@ const IPAHwSettings ipaHwSettingsV12{\n /* List of controls handled by the RkISP1 IPA */\n const ControlInfoMap::Map rkisp1Controls{\n \t{ &controls::DebugMetadataEnable, ControlInfo(false, true, false) },\n-\t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n };\n \n } /* namespace */\n","prefixes":["v10","3/7"]}