[{"id":36486,"web_url":"https://patchwork.libcamera.org/comment/36486/","msgid":"<176157354132.3742839.18145023802163980600@ping.linuxembedded.co.uk>","date":"2025-10-27T13:59:01","subject":"Re: [PATCH] ipa: rkisp1: dpf: Enable strength after enable Dpf","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Rui Wang (2025-10-24 13:01:07)\n> The filter strength configuration block was previously only enabled on the\n> first frame (frame == 0). Apply the strength values when denoise is active.\n> This prevents the strength config from being disabled on subsequent frames.\n> \n> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/rkisp1/algorithms/dpf.cpp | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\n> index cb6095da..e95fb95d 100644\n> --- a/src/ipa/rkisp1/algorithms/dpf.cpp\n> +++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n> @@ -251,9 +251,10 @@ void Dpf::prepare(IPAContext &context, const uint32_t frame,\n>                         mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED;\n>         }\n>  \n> -       if (frame == 0) {\n> -               auto strengthConfig = params->block<BlockType::DpfStrength>();\n> -               strengthConfig.setEnabled(true);\n> +       auto strengthConfig = params->block<BlockType::DpfStrength>();\n> +       strengthConfig.setEnabled(frameContext.dpf.denoise);\n> +\n> +       if (frameContext.dpf.denoise) {\n>                 *strengthConfig = strengthConfig_;\n>         }\n>  }\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 868F7BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Oct 2025 13:59:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 682A960758;\n\tMon, 27 Oct 2025 14:59:05 +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 9CDC06069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Oct 2025 14:59:04 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 88E161661;\n\tMon, 27 Oct 2025 14:57:16 +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=\"Tpatx/PX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761573436;\n\tbh=Rxan0Y36CNClg2MWHI47Ea/2wqqiWiUDtYjG/zVJmCA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Tpatx/PXrljZNNT7oB8FZm4EYdfaiUEW/f+R6RCA8VMMQbmvMCx/iD+Y4fH/PIUTh\n\tSgPuNwrVzbN6fETAvISNgb2aoLul/fUxI0fLFPAfB/pWn4dN3TGWfAwd5xuCEDf50G\n\tCkjMXLTSMg5fTLlar0m2OFxBt5mRFPz2eIv0Kfws=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251024120107.681968-1-rui.wang@ideasonboard.com>","References":"<20251024120107.681968-1-rui.wang@ideasonboard.com>","Subject":"Re: [PATCH] ipa: rkisp1: dpf: Enable strength after enable Dpf","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Rui Wang <rui.wang@ideasonboard.com>","To":"Rui Wang <rui.wang@ideasonboard.com>, libcamera-devel@lists.libcamera.org","Date":"Mon, 27 Oct 2025 13:59:01 +0000","Message-ID":"<176157354132.3742839.18145023802163980600@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}},{"id":36487,"web_url":"https://patchwork.libcamera.org/comment/36487/","msgid":"<04ff0519-aafa-4736-b804-38ab0a503590@ideasonboard.com>","date":"2025-10-27T14:06:18","subject":"Re: [PATCH] ipa: rkisp1: dpf: Enable strength after enable Dpf","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 10. 27. 14:59 keltezéssel, Kieran Bingham írta:\n> Quoting Rui Wang (2025-10-24 13:01:07)\n>> The filter strength configuration block was previously only enabled on the\n>> first frame (frame == 0). Apply the strength values when denoise is active.\n>> This prevents the strength config from being disabled on subsequent frames.\n>>\n>> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>\n> \n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n>> ---\n>>   src/ipa/rkisp1/algorithms/dpf.cpp | 7 ++++---\n>>   1 file changed, 4 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\n>> index cb6095da..e95fb95d 100644\n>> --- a/src/ipa/rkisp1/algorithms/dpf.cpp\n>> +++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n>> @@ -251,9 +251,10 @@ void Dpf::prepare(IPAContext &context, const uint32_t frame,\n>>                          mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED;\n>>          }\n>>   \n>> -       if (frame == 0) {\n>> -               auto strengthConfig = params->block<BlockType::DpfStrength>();\n>> -               strengthConfig.setEnabled(true);\n>> +       auto strengthConfig = params->block<BlockType::DpfStrength>();\n>> +       strengthConfig.setEnabled(frameContext.dpf.denoise);\n>> +\n>> +       if (frameContext.dpf.denoise) {\n>>                  *strengthConfig = strengthConfig_;\n\nThis can be moved into the `if` block above.\n\n\nBut I must be missing something. As far as I understand the idea here is\nto apply this on the first frame because it comes from the tuning file\nand does not change (and the hardware keeps the state once set at least\nuntil the end of the capture session). But then why is it not enough to\nset it on the first frame? It will be reset if when `BlockType::Dpf` is\ndisabled or something similar? Or is my assumption that the hardware\nremembers the last set value incorrect?\n\n\nRegards,\nBarnabás Pőcze\n\n\n>>          }\n>>   }\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 D69A3C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Oct 2025 14:06:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E3F760758;\n\tMon, 27 Oct 2025 15:06: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 A9F636069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Oct 2025 15:06:23 +0100 (CET)","from [192.168.33.25] (185.182.215.162.nat.pool.zt.hu\n\t[185.182.215.162])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B8B3A16AE;\n\tMon, 27 Oct 2025 15:04:34 +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=\"qYsST+bY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761573874;\n\tbh=VKGXE+riSRUldq7a22pqvVTDrDmDu+ozQ+biRATOM8k=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=qYsST+bYLWx+kNFiABFETQ7H6OXjvDkMuvN8i7oKHJycJbuX+jJkyMu8QTAZn5iBX\n\tSYUUEz6ZVO8N/RvPi5kouOhFgADFOp1R9wfTJdaS61mQZiFCxw9OXPLHBE3NSO00IC\n\t4r9QwdnRnR4c4w3OvM1gjXGl7fCbqsVzSRlm/Avk=","Message-ID":"<04ff0519-aafa-4736-b804-38ab0a503590@ideasonboard.com>","Date":"Mon, 27 Oct 2025 15:06:18 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] ipa: rkisp1: dpf: Enable strength after enable Dpf","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tRui Wang <rui.wang@ideasonboard.com>, libcamera-devel@lists.libcamera.org","References":"<20251024120107.681968-1-rui.wang@ideasonboard.com>\n\t<176157354132.3742839.18145023802163980600@ping.linuxembedded.co.uk>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<176157354132.3742839.18145023802163980600@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":36763,"web_url":"https://patchwork.libcamera.org/comment/36763/","msgid":"<1b1b22c7-eaa1-4cf1-9039-1e05c8373629@ideasonboard.com>","date":"2025-11-10T19:38:51","subject":"Re: [PATCH] ipa: rkisp1: dpf: Enable strength after enable Dpf","submitter":{"id":241,"url":"https://patchwork.libcamera.org/api/people/241/","name":"Rui Wang","email":"rui.wang@ideasonboard.com"},"content":"On 2025-10-27 10:06, Barnabás Pőcze wrote:\n> Hi\n>\n> 2025. 10. 27. 14:59 keltezéssel, Kieran Bingham írta:\n>> Quoting Rui Wang (2025-10-24 13:01:07)\n>>> The filter strength configuration block was previously only enabled \n>>> on the\n>>> first frame (frame == 0). Apply the strength values when denoise is \n>>> active.\n>>> This prevents the strength config from being disabled on subsequent \n>>> frames.\n>>>\n>>> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>\n>>\n>>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>>> ---\n>>>   src/ipa/rkisp1/algorithms/dpf.cpp | 7 ++++---\n>>>   1 file changed, 4 insertions(+), 3 deletions(-)\n>>>\n>>> diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp \n>>> b/src/ipa/rkisp1/algorithms/dpf.cpp\n>>> index cb6095da..e95fb95d 100644\n>>> --- a/src/ipa/rkisp1/algorithms/dpf.cpp\n>>> +++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n>>> @@ -251,9 +251,10 @@ void Dpf::prepare(IPAContext &context, const \n>>> uint32_t frame,\n>>>                          mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED;\n>>>          }\n>>>   -       if (frame == 0) {\n>>> -               auto strengthConfig = \n>>> params->block<BlockType::DpfStrength>();\n>>> -               strengthConfig.setEnabled(true);\n>>> +       auto strengthConfig = params->block<BlockType::DpfStrength>();\n>>> +       strengthConfig.setEnabled(frameContext.dpf.denoise);\n>>> +\n>>> +       if (frameContext.dpf.denoise) {\n>>>                  *strengthConfig = strengthConfig_;\n>\n> This can be moved into the `if` block above.\n>\n>\n> But I must be missing something. As far as I understand the idea here is\n> to apply this on the first frame because it comes from the tuning file\n> and does not change (and the hardware keeps the state once set at least\n> until the end of the capture session). But then why is it not enough to\n> set it on the first frame? It will be reset if when `BlockType::Dpf` is\n> disabled or something similar? Or is my assumption that the hardware\n> remembers the last set value incorrect?\n>\nyes , move this  *strengthConfig = strengthConfig_; into above 'if' \nblock is better. will push a new patch\n\n  this update triggered by \"NoiseReduction*\"  control from camshark .  \n  which handle by enqeueRuest and then\n\nupdate both frameContext.dpf.update and frameContext.dpf.denoise\n\n  then prepare() will handle the isp hardware configuration applicant.\n\neither camshark's NoiseReduction control modification would trigger the \nisp denoise block update .\n\nand the spcific configuration of DPF , which read out from yaml file.\n  To verify the code working : I have to add dpf configration into \ntuning file,\n\n- Dpf:\nDomainFilter:\ng: [ 16, 16, 16, 16, 16, 16]\nrb: [ 16, 16, 16, 16, 16, 16]\nNoiseLevelFunction:\ncoeff: [\n1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023,\n1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023,\n1023\n]\nscale-mode: \"linear\"\nFilterStrength:\nr: 1\ng: 1\nb: 1\n\n\n\n\n>\n> Regards,\n> Barnabás Pőcze\n>\n>\n>>>          }\n>>>   }\n>>> -- \n>>> 2.43.0\n>>>\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 D33C1C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Nov 2025 19:39:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 22E63609D8;\n\tMon, 10 Nov 2025 20:39:06 +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 EC23260856\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Nov 2025 20:39:04 +0100 (CET)","from [192.168.31.114] (unknown [209.216.122.90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5DA7550A;\n\tMon, 10 Nov 2025 20:37: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=\"LtRYLcJn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1762803426;\n\tbh=vEJ6ZqS4HhoYh5MepM1es8aynpd1+QbOZqKjb7dke2A=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=LtRYLcJnztvJ2+8w+BJ09uNN8RT/XpTaWkkK049UUSUgL07My3wnH0un4ngMze2k1\n\tjqwEqYFBNE9QnZeWn7F7I6AG+XzV4toMVg4T43mZq5xpb8TJpMnDuH4KWkPn2bnzUI\n\tiJH/N08yL8hCkm0mJTL06UdW1mab0Dd16IWBaC0Q=","Message-ID":"<1b1b22c7-eaa1-4cf1-9039-1e05c8373629@ideasonboard.com>","Date":"Mon, 10 Nov 2025 14:38:51 -0500","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] ipa: rkisp1: dpf: Enable strength after enable Dpf","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","References":"<20251024120107.681968-1-rui.wang@ideasonboard.com>\n\t<176157354132.3742839.18145023802163980600@ping.linuxembedded.co.uk>\n\t<04ff0519-aafa-4736-b804-38ab0a503590@ideasonboard.com>","Content-Language":"en-US","From":"rui wang <rui.wang@ideasonboard.com>","In-Reply-To":"<04ff0519-aafa-4736-b804-38ab0a503590@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]