[{"id":37877,"web_url":"https://patchwork.libcamera.org/comment/37877/","msgid":"<176909187999.2317359.9783679925175178756@isaac-ThinkPad-T16-Gen-2>","date":"2026-01-22T14:24:39","subject":"Re: [PATCH v10 3/7] ipa: rkisp1: algorithms: register noise\n\treduction controls","submitter":{"id":215,"url":"https://patchwork.libcamera.org/api/people/215/","name":"Isaac Scott","email":"isaac.scott@ideasonboard.com"},"content":"Hi Rui,\n\nThank you for the patch!\n\nQuoting Rui Wang (2026-01-20 15:30:53)\n> Register NoiseReductionMode controls based on the tuning data and default\n> to the active DPF mode. Remove the static NoiseReductionMode entry from\n> the IPA control map now that DPF owns its registration.\n> \n> Signed-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(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\n> index 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>         if (ret)\n>                 return ret;\n>  \n> +       /* Register available controls. */\n> +       registerControls(context);\n> +\n>         return 0;\n>  }\n>  \n> @@ -136,6 +139,24 @@ int Dpf::parseConfig(const YamlObject &tuningData)\n>         return 0;\n>  }\n>  \n> +void Dpf::registerControls(IPAContext &context)\n> +{\n> +       /*\n> +        * Populate the control map with the available noise reduction modes.\n> +        * This allows applications to query and select from the modes defined\n> +        * in the tuning data.\n> +        */\n> +       std::vector<ControlValue> modes{ controls::draft::NoiseReductionModeOff };\n> +       for (const auto &mode : noiseReductionModes_) {\n> +               modes.emplace_back(mode.modeValue);\n> +       }\n> +       /*\n> +        * Set the default mode to the active mode.\n> +        */\n> +       context.ctrlMap[&controls::draft::NoiseReductionMode] =\n> +               ControlInfo(modes, activeMode_->modeValue);\n> +}\n> +\n\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n>  int Dpf::parseSingleConfig(const YamlObject &tuningData,\n>                            rkisp1_cif_isp_dpf_config &config,\n>                            rkisp1_cif_isp_dpf_strength_config &strengthConfig)\n> diff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h\n> index 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>         };\n>  \n>         int parseConfig(const YamlObject &tuningData);\n> +       void registerControls(IPAContext &context);\n>         int parseSingleConfig(const YamlObject &tuningData,\n>                               rkisp1_cif_isp_dpf_config &config,\n>                               rkisp1_cif_isp_dpf_strength_config &strengthConfig);\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index 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>         { &controls::DebugMetadataEnable, ControlInfo(false, true, false) },\n> -       { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n>  };\n>  \n>  } /* namespace */\n> -- \n> 2.43.0\n>","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 C2902C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 14:24:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E92AA61FC4;\n\tThu, 22 Jan 2026 15:24:43 +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 3CE2961F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 15:24:43 +0100 (CET)","from thinkpad.ideasonboard.com\n\t(cpc90716-aztw32-2-0-cust408.18-1.cable.virginm.net [86.26.101.153])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 72816324;\n\tThu, 22 Jan 2026 15:24:10 +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=\"lPrlN1ml\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769091850;\n\tbh=OGYO1qkGJo53WX66XDGvKJFYxeKu+iTQMVGs5I7AyMs=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=lPrlN1mlm+c6wLpcl51GUUnjDGxix4pk2LkjkA6Qxvci6AtnFAEVvVP7SQqe7xW3o\n\t/tesm3MeTM6b+IAutNupsM1G/yV/GBJ6LO3i2rrjSxMvXd/+rstqQY6ZTOwf3jHjk8\n\tu1VXwLbUz/gfsFtSmpBwNxXNXhqqXJUJWqfF91fU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260120153057.1703714-4-rui.wang@ideasonboard.com>","References":"<20260120153057.1703714-1-rui.wang@ideasonboard.com>\n\t<20260120153057.1703714-4-rui.wang@ideasonboard.com>","Subject":"Re: [PATCH v10 3/7] ipa: rkisp1: algorithms: register noise\n\treduction controls","From":"Isaac Scott <isaac.scott@ideasonboard.com>","Cc":"Rui Wang <rui.wang@ideasonboard.com>","To":"Rui Wang <rui.wang@ideasonboard.com>, libcamera-devel@lists.libcamera.org","Date":"Thu, 22 Jan 2026 14:24:39 +0000","Message-ID":"<176909187999.2317359.9783679925175178756@isaac-ThinkPad-T16-Gen-2>","User-Agent":"alot/0.10","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>"}}]