Patch Detail
Show a patch.
GET /api/1.1/patches/26109/?format=api
{ "id": 26109, "url": "https://patchwork.libcamera.org/api/1.1/patches/26109/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26109/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260208214443.469189-2-rui.wang@ideasonboard.com>", "date": "2026-02-08T21:44:43", "name": "[v1,1/1] libcamera: Move NoiseReductionMode control from draft to core", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7c9b7d78be6dc0f5c7b9fb36ca4c5c3a39e79ddb", "submitter": { "id": 241, "url": "https://patchwork.libcamera.org/api/1.1/people/241/?format=api", "name": "Rui Wang", "email": "rui.wang@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26109/mbox/", "series": [ { "id": 5778, "url": "https://patchwork.libcamera.org/api/1.1/series/5778/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5778", "date": "2026-02-08T21:44:42", "name": "Move NoiseReductionMode control from draft to core", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5778/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26109/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26109/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 85231C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 8 Feb 2026 21:44:56 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9FFCA6209D;\n\tSun, 8 Feb 2026 22:44:55 +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 C376762084\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 8 Feb 2026 22:44:52 +0100 (CET)", "from rui-Precision-7560.local.tld\n\t(pool-99-254-80-244.cpe.net.cable.rogers.com [99.254.80.244])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E9CBC16AE;\n\tSun, 8 Feb 2026 22:44:06 +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=\"fZcBCL5E\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770587047;\n\tbh=tgCydorrBbJ6gonUVSw8lgE4HHahCte0RIu+qDbB7oE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=fZcBCL5EnJbRbfOGb7FKq2ZJRNTOZ//tZolK3VaqLx1j9h2hbIzoSAVzvHbsVdYjZ\n\tXZwYX/q8nVwF5ezQqDFGVkjHVdvZR6xzkCZRo1nhDZ4Vj/g/AAQA/968Q1JlN+arZ0\n\tkTvWhbFdWex43jzIYt/0J5303/mPXe7TNS0rW9z0=", "From": "Rui Wang <rui.wang@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Rui Wang <rui.wang@ideasonboard.com>", "Subject": "[PATCH v1 1/1] libcamera: Move NoiseReductionMode control from draft\n\tto core", "Date": "Sun, 8 Feb 2026 16:44:43 -0500", "Message-ID": "<20260208214443.469189-2-rui.wang@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260208214443.469189-1-rui.wang@ideasonboard.com>", "References": "<20260208214443.469189-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": "Promote the NoiseReductionMode control from the draft namespace to the core\ncontrols namespace.\n\nThis change affects:\n- Core control definitions (control_ids_core.yaml)\n- Draft control definitions (control_ids_draft.yaml)\n- RkISP1 IPA algorithm implementations (dpf.cpp, filter.cpp, rkisp1.cpp)\n- Raspberry Pi IPA implementations (rpi/common/ipa_base.cpp, pisp.cpp, vc4.cpp)\n- Android camera capabilities (camera_capabilities.cpp)\n\nAll references to controls::draft::NoiseReductionMode and its enum values are\nupdated to use controls::NoiseReductionMode in the core namespace.\n\nSigned-off-by: Rui Wang <rui.wang@ideasonboard.com>\n---\n src/android/camera_capabilities.cpp | 2 +-\n src/ipa/rkisp1/algorithms/dpf.cpp | 10 ++++-----\n src/ipa/rkisp1/algorithms/filter.cpp | 10 ++++-----\n src/ipa/rkisp1/rkisp1.cpp | 2 +-\n src/ipa/rpi/common/ipa_base.cpp | 6 +++---\n src/ipa/rpi/pisp/pisp.cpp | 4 ++--\n src/ipa/rpi/vc4/vc4.cpp | 12 +++++------\n src/libcamera/control_ids_core.yaml | 31 +++++++++++++++++++++++++++-\n src/libcamera/control_ids_draft.yaml | 29 --------------------------\n 9 files changed, 53 insertions(+), 53 deletions(-)", "diff": "diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\nindex b161bc6b..356c8e8f 100644\n--- a/src/android/camera_capabilities.cpp\n+++ b/src/android/camera_capabilities.cpp\n@@ -1291,7 +1291,7 @@ int CameraCapabilities::initializeStaticMetadata()\n \t{\n \t\tstd::vector<uint8_t> data;\n \t\tdata.reserve(5);\n-\t\tconst auto &infoMap = controlsInfo.find(&controls::draft::NoiseReductionMode);\n+\t\tconst auto &infoMap = controlsInfo.find(&controls::NoiseReductionMode);\n \t\tif (infoMap != controlsInfo.end()) {\n \t\t\tfor (const auto &value : infoMap->second.values())\n \t\t\t\tdata.push_back(value.get<int32_t>());\ndiff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\nindex 83c1e4b7..0d8b9ef3 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.cpp\n+++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n@@ -182,20 +182,20 @@ void Dpf::queueRequest(IPAContext &context,\n \tauto &dpf = context.activeState.dpf;\n \tbool update = false;\n \n-\tconst auto &denoise = controls.get(controls::draft::NoiseReductionMode);\n+\tconst auto &denoise = controls.get(controls::NoiseReductionMode);\n \tif (denoise) {\n \t\tLOG(RkISP1Dpf, Debug) << \"Set denoise to \" << *denoise;\n \n \t\tswitch (*denoise) {\n-\t\tcase controls::draft::NoiseReductionModeOff:\n+\t\tcase controls::NoiseReductionModeOff:\n \t\t\tif (dpf.denoise) {\n \t\t\t\tdpf.denoise = false;\n \t\t\t\tupdate = true;\n \t\t\t}\n \t\t\tbreak;\n-\t\tcase controls::draft::NoiseReductionModeMinimal:\n-\t\tcase controls::draft::NoiseReductionModeHighQuality:\n-\t\tcase controls::draft::NoiseReductionModeFast:\n+\t\tcase controls::NoiseReductionModeMinimal:\n+\t\tcase controls::NoiseReductionModeHighQuality:\n+\t\tcase controls::NoiseReductionModeFast:\n \t\t\tif (!dpf.denoise) {\n \t\t\t\tdpf.denoise = true;\n \t\t\t\tupdate = true;\ndiff --git a/src/ipa/rkisp1/algorithms/filter.cpp b/src/ipa/rkisp1/algorithms/filter.cpp\nindex 8ad79801..aa49d332 100644\n--- a/src/ipa/rkisp1/algorithms/filter.cpp\n+++ b/src/ipa/rkisp1/algorithms/filter.cpp\n@@ -73,25 +73,25 @@ void Filter::queueRequest(IPAContext &context,\n \t\tLOG(RkISP1Filter, Debug) << \"Set sharpness to \" << *sharpness;\n \t}\n \n-\tconst auto &denoise = controls.get(controls::draft::NoiseReductionMode);\n+\tconst auto &denoise = controls.get(controls::NoiseReductionMode);\n \tif (denoise) {\n \t\tLOG(RkISP1Filter, Debug) << \"Set denoise to \" << *denoise;\n \n \t\tswitch (*denoise) {\n-\t\tcase controls::draft::NoiseReductionModeOff:\n+\t\tcase controls::NoiseReductionModeOff:\n \t\t\tif (filter.denoise != 0) {\n \t\t\t\tfilter.denoise = 0;\n \t\t\t\tupdate = true;\n \t\t\t}\n \t\t\tbreak;\n-\t\tcase controls::draft::NoiseReductionModeMinimal:\n+\t\tcase controls::NoiseReductionModeMinimal:\n \t\t\tif (filter.denoise != 1) {\n \t\t\t\tfilter.denoise = 1;\n \t\t\t\tupdate = true;\n \t\t\t}\n \t\t\tbreak;\n-\t\tcase controls::draft::NoiseReductionModeHighQuality:\n-\t\tcase controls::draft::NoiseReductionModeFast:\n+\t\tcase controls::NoiseReductionModeHighQuality:\n+\t\tcase controls::NoiseReductionModeFast:\n \t\t\tif (filter.denoise != 3) {\n \t\t\t\tfilter.denoise = 3;\n \t\t\t\tupdate = true;\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex fbcc3910..69a4ab93 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -120,7 +120,7 @@ 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+\t{ &controls::NoiseReductionMode, ControlInfo(controls::NoiseReductionModeValues) },\n };\n \n } /* namespace */\ndiff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 7072b38c..40d7783e 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -88,7 +88,7 @@ const ControlInfoMap::Map ipaControls{\n \t\t static_cast<int64_t>(defaultMaxFrameDuration.get<std::micro>()),\n \t\t Span<const int64_t, 2>{ { static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()),\n \t\t\t\t\t\tstatic_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()) } }) },\n-\t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n+\t{ &controls::NoiseReductionMode, ControlInfo(controls::NoiseReductionModeValues) },\n \t{ &controls::rpi::StatsOutputEnable, ControlInfo(false, true, false) },\n };\n \n@@ -1290,9 +1290,9 @@ void IpaBase::applyControls(const ControlList &controls)\n \t\t\tbreak;\n \t\t}\n \n-\t\tcase controls::draft::NOISE_REDUCTION_MODE:\n+\t\tcase controls::NOISE_REDUCTION_MODE:\n \t\t\t/* Handled below in handleControls() */\n-\t\t\tlibcameraMetadata_.set(controls::draft::NoiseReductionMode,\n+\t\t\tlibcameraMetadata_.set(controls::NoiseReductionMode,\n \t\t\t\t\t ctrl.second.get<int32_t>());\n \t\t\tbreak;\n \ndiff --git a/src/ipa/rpi/pisp/pisp.cpp b/src/ipa/rpi/pisp/pisp.cpp\nindex ec7593ff..b93c0497 100644\n--- a/src/ipa/rpi/pisp/pisp.cpp\n+++ b/src/ipa/rpi/pisp/pisp.cpp\n@@ -560,7 +560,7 @@ void IpaPiSP::handleControls(const ControlList &controls)\n \t\t\tsetHistogramWeights();\n \t\t\tbreak;\n \n-\t\tcase controls::draft::NOISE_REDUCTION_MODE: {\n+\t\tcase controls::NOISE_REDUCTION_MODE: {\n \t\t\tRPiController::DenoiseAlgorithm *denoise = dynamic_cast<RPiController::DenoiseAlgorithm *>(\n \t\t\t\tcontroller_.getAlgorithm(\"denoise\"));\n \n@@ -570,7 +570,7 @@ void IpaPiSP::handleControls(const ControlList &controls)\n \t\t\t\treturn;\n \t\t\t}\n \n-\t\t\tif (ctrl.second.get<int32_t>() == controls::draft::NoiseReductionModeOff)\n+\t\t\tif (ctrl.second.get<int32_t>() == controls::NoiseReductionModeOff)\n \t\t\t\tdenoise->setMode(RPiController::DenoiseMode::Off);\n \t\t\telse\n \t\t\t\tdenoise->setMode(RPiController::DenoiseMode::ColourHighQuality);\ndiff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp\nindex 2b205b28..9c8865d2 100644\n--- a/src/ipa/rpi/vc4/vc4.cpp\n+++ b/src/ipa/rpi/vc4/vc4.cpp\n@@ -293,16 +293,16 @@ RPiController::StatisticsPtr IpaVc4::platformProcessStats(Span<uint8_t> mem)\n void IpaVc4::handleControls(const ControlList &controls)\n {\n \tstatic const std::map<int32_t, RPiController::DenoiseMode> DenoiseModeTable = {\n-\t\t{ controls::draft::NoiseReductionModeOff, RPiController::DenoiseMode::Off },\n-\t\t{ controls::draft::NoiseReductionModeFast, RPiController::DenoiseMode::ColourFast },\n-\t\t{ controls::draft::NoiseReductionModeHighQuality, RPiController::DenoiseMode::ColourHighQuality },\n-\t\t{ controls::draft::NoiseReductionModeMinimal, RPiController::DenoiseMode::ColourOff },\n-\t\t{ controls::draft::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality },\n+\t\t{ controls::NoiseReductionModeOff, RPiController::DenoiseMode::Off },\n+\t\t{ controls::NoiseReductionModeFast, RPiController::DenoiseMode::ColourFast },\n+\t\t{ controls::NoiseReductionModeHighQuality, RPiController::DenoiseMode::ColourHighQuality },\n+\t\t{ controls::NoiseReductionModeMinimal, RPiController::DenoiseMode::ColourOff },\n+\t\t{ controls::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality },\n \t};\n \n \tfor (auto const &ctrl : controls) {\n \t\tswitch (ctrl.first) {\n-\t\tcase controls::draft::NOISE_REDUCTION_MODE: {\n+\t\tcase controls::NOISE_REDUCTION_MODE: {\n \t\t\tRPiController::DenoiseAlgorithm *sdn = dynamic_cast<RPiController::DenoiseAlgorithm *>(\n \t\t\t\tcontroller_.getAlgorithm(\"SDN\"));\n \t\t\t/* Some platforms may have a combined \"denoise\" algorithm instead. */\ndiff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\nindex f26a1b1b..455693ac 100644\n--- a/src/libcamera/control_ids_core.yaml\n+++ b/src/libcamera/control_ids_core.yaml\n@@ -1361,4 +1361,33 @@ controls:\n description: |\n Enable or disable the lens shading correction.\n \n-...\n+ - NoiseReductionMode:\n+ type: int32_t\n+ direction: inout\n+ description: |\n+ Control to select the noise reduction algorithm mode. Currently\n+ identical to ANDROID_NOISE_REDUCTION_MODE.\n+\n+ Mode of operation for the noise reduction algorithm.\n+ enum:\n+ - name: NoiseReductionModeOff\n+ value: 0\n+ description: No noise reduction is applied\n+ - name: NoiseReductionModeFast\n+ value: 1\n+ description: |\n+ Noise reduction is applied without reducing the frame rate.\n+ - name: NoiseReductionModeHighQuality\n+ value: 2\n+ description: |\n+ High quality noise reduction at the expense of frame rate.\n+ - name: NoiseReductionModeMinimal\n+ value: 3\n+ description: |\n+ Minimal noise reduction is applied without reducing the frame rate.\n+ - name: NoiseReductionModeZSL\n+ value: 4\n+ description: |\n+ Noise reduction is applied at different levels to different streams.\n+\n+...\n\\ No newline at end of file\ndiff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml\nindex 03309eea..0e04cb16 100644\n--- a/src/libcamera/control_ids_draft.yaml\n+++ b/src/libcamera/control_ids_draft.yaml\n@@ -30,35 +30,6 @@ controls:\n The camera will cancel any active or completed metering sequence.\n The AE algorithm is reset to its initial state.\n \n- - NoiseReductionMode:\n- type: int32_t\n- direction: inout\n- description: |\n- Control to select the noise reduction algorithm mode. Currently\n- identical to ANDROID_NOISE_REDUCTION_MODE.\n-\n- Mode of operation for the noise reduction algorithm.\n- enum:\n- - name: NoiseReductionModeOff\n- value: 0\n- description: No noise reduction is applied\n- - name: NoiseReductionModeFast\n- value: 1\n- description: |\n- Noise reduction is applied without reducing the frame rate.\n- - name: NoiseReductionModeHighQuality\n- value: 2\n- description: |\n- High quality noise reduction at the expense of frame rate.\n- - name: NoiseReductionModeMinimal\n- value: 3\n- description: |\n- Minimal noise reduction is applied without reducing the frame rate.\n- - name: NoiseReductionModeZSL\n- value: 4\n- description: |\n- Noise reduction is applied at different levels to different streams.\n-\n - ColorCorrectionAberrationMode:\n type: int32_t\n direction: inout\n", "prefixes": [ "v1", "1/1" ] }