{"id":25949,"url":"https://patchwork.libcamera.org/api/1.1/patches/25949/?format=json","web_url":"https://patchwork.libcamera.org/patch/25949/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20260122234709.2061370-4-rui.wang@ideasonboard.com>","date":"2026-01-22T23:47:05","name":"[v11,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/1.1/people/241/?format=json","name":"Rui Wang","email":"rui.wang@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25949/mbox/","series":[{"id":5736,"url":"https://patchwork.libcamera.org/api/1.1/series/5736/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5736","date":"2026-01-22T23:47:02","name":"refactor DPF parsing and initialization","version":11,"mbox":"https://patchwork.libcamera.org/series/5736/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25949/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25949/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 32631BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 23:47:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2DD4361FDC;\n\tFri, 23 Jan 2026 00:47:33 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1606261FD6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Jan 2026 00:47:28 +0100 (CET)","from rui-Precision-7560.local (unknown [209.216.103.65])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 936A3B3;\n\tFri, 23 Jan 2026 00:46:55 +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=\"lvcTOwtI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769125616;\n\tbh=AyW3qXFXU8qdJwKkp+o/TSyoK1oIzkLke5Uk0huDKP8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lvcTOwtI848O2We9vJP/e5wei5osEEsjNZ0G47W0kp5fC+AcffjjYqYsfu8K8pe6s\n\t+nKQj8VgZBwiSZTmKze9cqVLc/KgYRes8z1yPBhNcqo8xRMI1eR4uxZoyH5w4x9aO+\n\tAsOLGej2WeakqZDNhg3PSgS3rNUXMpco06ms0w14=","From":"Rui Wang <rui.wang@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Rui Wang <rui.wang@ideasonboard.com>,\n\tIsaac Scott <isaac.scott@ideasonboard.com>","Subject":"[PATCH v11 3/7] ipa: rkisp1: algorithms: register noise reduction\n\tcontrols","Date":"Thu, 22 Jan 2026 18:47:05 -0500","Message-ID":"<20260122234709.2061370-4-rui.wang@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260122234709.2061370-1-rui.wang@ideasonboard.com>","References":"<20260122234709.2061370-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>\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n---\n  changelog :\n    --No change since v10\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 78a79fa5..282b8672 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.cpp\n+++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n@@ -52,6 +52,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@@ -112,6 +115,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":["v11","3/7"]}