{"id":25170,"url":"https://patchwork.libcamera.org/api/patches/25170/?format=json","web_url":"https://patchwork.libcamera.org/patch/25170/","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":"<20251125000848.4103786-4-rui.wang@ideasonboard.com>","date":"2025-11-25T00:08:40","name":"[v1,03/11] ipa: rkisp1: controls: define control block","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2b12e3e821f3060dba133b280582e9e60fc0d046","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/25170/mbox/","series":[{"id":5612,"url":"https://patchwork.libcamera.org/api/series/5612/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5612","date":"2025-11-25T00:08:37","name":"ipa: rkisp1: DPF refactor and tuning improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/5612/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25170/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25170/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 01AF2C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Nov 2025 00:09:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B653460A8B;\n\tTue, 25 Nov 2025 01:09:10 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 489BC608CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Nov 2025 01:09:09 +0100 (CET)","from rui-Precision-7560.local (unknown\n\t[IPv6:2607:fea8:935b:7220:cb34:a7b8:53d:5466])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 735ED1785;\n\tTue, 25 Nov 2025 01:07:00 +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=\"oRmjqTgL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764029220;\n\tbh=UkCapkV5odQxTizNmJzAW0W4EduQbmEB8OJC9PPaCu8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=oRmjqTgLfHAobqYV0qdCiVGfsl6qJbda7XUXC2VV9h8hUIm1yGFTxj3IaX07Fln8q\n\tmy+21rjM0irJQsu85afoR02lox0WxiYQp/sM3+nTPKO2xWTBTGvRB4l8pxceUU3uZ/\n\t1OZO2db2ivqner9/ZeSe7Ii95H4zCc41Fi7GCg4k=","From":"Rui Wang <rui.wang@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Rui Wang <rui.wang@ideasonboard.com>","Subject":"[PATCH v1 03/11] ipa: rkisp1: controls: define control block","Date":"Mon, 24 Nov 2025 19:08:40 -0500","Message-ID":"<20251125000848.4103786-4-rui.wang@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20251125000848.4103786-1-rui.wang@ideasonboard.com>","References":"<20251125000848.4103786-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":"Reserve the next free vendor allocation for rkisp1 and add the dedicated\ncontrol_ids_rkisp1.yaml. Hook the new YAML into the Meson build so the\ngenerated control headers expose the rkisp1 control namespace.\n\nSigned-off-by: Rui Wang <rui.wang@ideasonboard.com>\n---\n include/libcamera/meson.build         |  1 +\n src/libcamera/control_ids_rkisp1.yaml | 73 +++++++++++++++++++++++++++\n src/libcamera/control_ranges.yaml     |  4 +-\n 3 files changed, 77 insertions(+), 1 deletion(-)\n create mode 100644 src/libcamera/control_ids_rkisp1.yaml","diff":"diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex 30ea76f9..3fd7ef94 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -39,6 +39,7 @@ controls_map = {\n         'draft': 'control_ids_draft.yaml',\n         'rpi/pisp': 'control_ids_rpi.yaml',\n         'rpi/vc4': 'control_ids_rpi.yaml',\n+        'rkisp1': 'control_ids_rkisp1.yaml',\n     },\n \n     'properties': {\ndiff --git a/src/libcamera/control_ids_rkisp1.yaml b/src/libcamera/control_ids_rkisp1.yaml\nnew file mode 100644\nindex 00000000..3e008ee4\n--- /dev/null\n+++ b/src/libcamera/control_ids_rkisp1.yaml\n@@ -0,0 +1,73 @@\n+# SPDX-License-Identifier: LGPL-2.1-or-later\n+#\n+# Copyright (C) 2025, Ideas On Board\n+#\n+# RkISP1 specific control definitions\n+---\n+# Unless otherwise stated, all controls are bi-directional, i.e. they can be\n+# set through Request::controls() and returned out through Request::metadata().\n+vendor: rkisp1\n+controls:\n+  # --- RkISP1 DPF controls ---\n+  - DenoiseMode:\n+      type: int32_t\n+      direction: inout\n+      description: |\n+        Controls the operating mode of the rkisp1 denoise pipeline. This setting is\n+        consumed by the DPF module and any additional denoise algorithms that honour\n+        the common mode state exposed here.\n+\n+        In Disabled mode (default) all denoise processing stages are disabled. This\n+        bypasses noise reduction and surfaces raw sensor data. Other denoise-related\n+        controls are ignored in this mode.\n+\n+        In Auto mode each denoise algorithm selects parameters automatically from the\n+        sensor tuning data and (if provided) the exposure index level table. Changes in\n+        scene brightness (analogue gain / exposure index) may cause algorithms to\n+        re-evaluate and reprogram hardware when an exposure index band boundary is\n+        crossed.\n+\n+        In Manual mode the automatically selected parameters are frozen at the moment\n+        the mode switch occurs (a snapshot is taken). Subsequent per-frame automatic\n+        updates are disabled until the mode is set back to Auto. While in Manual mode\n+        the application may modify any algorithm-specific override controls (for DPF:\n+        DpfChannelStrengths, DpfGreenSpatialCoefficients, DpfRedBlueSpatialCoefficients,\n+        DpfRbFilterSize, DpfNoiseLevelLookupCoefficients, DpfNoiseLevelLookupScaleMode).\n+        Individual denoise modules apply changes immediately to hardware.\n+\n+        In Reduction mode the algorithms use predefined noise reduction settings based\n+        on the active NoiseReductionMode control. This provides optimized presets for\n+        different noise reduction levels (e.g., minimal, high-quality, fast) without\n+        manual parameter tuning.\n+\n+        Transition Rules:\n+          * Auto -> Manual: The current effective (auto-selected) parameters\n+            are captured as the initial manual override values.\n+          * Manual -> Auto: All manual override state is discarded and the\n+            algorithm immediately reverts to automatic tuning selection,\n+            potentially reprogramming hardware that same frame.\n+          * Auto/Manual -> Reduction: Switches to using reduction mode configs\n+            based on the current NoiseReductionMode setting.\n+          * Reduction -> Auto/Manual: Reverts to the specified mode, discarding\n+            reduction-specific state.\n+\n+        If the application switches to Manual but supplies no overrides,\n+        the previously auto-derived parameters continue to be used unchanged.\n+      enum:\n+        - name: DenoiseModeDisabled\n+          value: 0\n+          description: |\n+            Disabled mode - DPF processing is completely disabled.\n+        - name: DenoiseModeAuto\n+          value: 1\n+          description: |\n+            Automatic mode - algorithm selects parameters based on tuning data.\n+        - name: DenoiseModeManual\n+          value: 2\n+          description: |\n+            Manual mode - parameters are frozen and can be overridden.\n+        - name: DenoiseModeReduction\n+          value: 3\n+          description: |\n+            Reduction mode - uses predefined noise reduction settings from tuning data.\n+...\ndiff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml\nindex 6752eb98..fc60de80 100644\n--- a/src/libcamera/control_ranges.yaml\n+++ b/src/libcamera/control_ranges.yaml\n@@ -15,6 +15,8 @@ ranges:\n   rpi: 20000\n   # Controls for debug metadata\n   debug: 30000\n-  # Next range starts at 40000\n+  # RkISP1 vendor controls\n+  rkisp1: 40000\n+  # Next range starts at 50000\n \n ...\n","prefixes":["v1","03/11"]}