[{"id":35434,"web_url":"https://patchwork.libcamera.org/comment/35434/","msgid":"<52c590c8-5106-4166-9fb2-737ddb662110@ideasonboard.com>","date":"2025-08-15T10:46:01","subject":"Re: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint\n\tlogging","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Stefan\n\nOn 15/08/2025 11:29, Stefan Klug wrote:\n> The debug log statements in constraintClampGain() are after the\n> assignment of gain. So they correctly log when the constraint applies,\n> but the gain values logged are the same. Fix that.\n> \n> Fixes: 42e18c96bcb7 (\"libipa: agc_mean_luminance: Add debug logging\")\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n\n> ---\n> \n> Changes in v3:\n> - Added this patch\n> ---\n>   src/ipa/libipa/agc_mean_luminance.cpp | 4 ++--\n>   1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> index ff96a381ffce..fce1a5064870 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> @@ -488,18 +488,18 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,\n>   \n>   \t\tif (constraint.bound == AgcConstraint::Bound::Lower &&\n>   \t\t    newGain > gain) {\n> -\t\t\tgain = newGain;\n>   \t\t\tLOG(AgcMeanLuminance, Debug)\n>   \t\t\t\t<< \"Apply lower bound: \" << gain << \" to \"\n>   \t\t\t\t<< newGain;\n> +\t\t\tgain = newGain;\n>   \t\t}\n>   \n>   \t\tif (constraint.bound == AgcConstraint::Bound::Upper &&\n>   \t\t    newGain < gain) {\n> -\t\t\tgain = newGain;\n>   \t\t\tLOG(AgcMeanLuminance, Debug)\n>   \t\t\t\t<< \"Apply upper bound: \" << gain << \" to \"\n>   \t\t\t\t<< newGain;\n> +\t\t\tgain = newGain;\n>   \t\t}\n>   \t}\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 145C0BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Aug 2025 10:46:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 161A16925A;\n\tFri, 15 Aug 2025 12:46:06 +0200 (CEST)","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 C0B3A6924E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Aug 2025 12:46:04 +0200 (CEST)","from [192.168.0.43]\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C7AF556D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Aug 2025 12:45:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gpusBX1e\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755254709;\n\tbh=939k5PxW0QneahjAs7wJXDmJDt7uTgNea9MO+SWcceA=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=gpusBX1e0WMqTffUWqmVEIlnfUStcI1/C3QC2yO/wqm893WAhXUqdOf6g407mtZN5\n\tQio3dFa7FJmM5JdpfdFl/81RQFNNnntQERfkvwrhxt3zAHL3PAhcaPUrdUhszhNbTn\n\tHtsbQ15JzC6rOTRioJCJ8ixTBxrtVE5r+sx/Gj8I=","Message-ID":"<52c590c8-5106-4166-9fb2-737ddb662110@ideasonboard.com>","Date":"Fri, 15 Aug 2025 11:46:01 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint\n\tlogging","To":"libcamera-devel@lists.libcamera.org","References":"<20250815102945.1602071-1-stefan.klug@ideasonboard.com>\n\t<20250815102945.1602071-8-stefan.klug@ideasonboard.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","In-Reply-To":"<20250815102945.1602071-8-stefan.klug@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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":35436,"web_url":"https://patchwork.libcamera.org/comment/35436/","msgid":"<175525568711.560048.6417816459236854696@ping.linuxembedded.co.uk>","date":"2025-08-15T11:01:27","subject":"Re: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint\n\tlogging","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-08-15 11:29:27)\n> The debug log statements in constraintClampGain() are after the\n> assignment of gain. So they correctly log when the constraint applies,\n> but the gain values logged are the same. Fix that.\n> \n> Fixes: 42e18c96bcb7 (\"libipa: agc_mean_luminance: Add debug logging\")\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n> \n> Changes in v3:\n> - Added this patch\n> ---\n>  src/ipa/libipa/agc_mean_luminance.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> index ff96a381ffce..fce1a5064870 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> @@ -488,18 +488,18 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,\n>  \n>                 if (constraint.bound == AgcConstraint::Bound::Lower &&\n>                     newGain > gain) {\n> -                       gain = newGain;\n>                         LOG(AgcMeanLuminance, Debug)\n>                                 << \"Apply lower bound: \" << gain << \" to \"\n>                                 << newGain;\n> +                       gain = newGain;\n>                 }\n>  \n>                 if (constraint.bound == AgcConstraint::Bound::Upper &&\n>                     newGain < gain) {\n> -                       gain = newGain;\n>                         LOG(AgcMeanLuminance, Debug)\n>                                 << \"Apply upper bound: \" << gain << \" to \"\n>                                 << newGain;\n> +                       gain = newGain;\n>                 }\n>         }\n>  \n> -- \n> 2.48.1\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 37DDFBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Aug 2025 11:01:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 506176925A;\n\tFri, 15 Aug 2025 13:01:31 +0200 (CEST)","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 11B056924E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Aug 2025 13:01:30 +0200 (CEST)","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 1F63B56D;\n\tFri, 15 Aug 2025 13:00:35 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dSEF2WzP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755255635;\n\tbh=4TekoN1JLMIXTEGtvwpPRTCVemskxYxRNGDA7BYG5sY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=dSEF2WzPa5fqTXLF0pW9IGRpP/804D87/VB9juX+JbcL5DhSmNRKlG3qMZz221Fvm\n\tuF7PBRFPSnP3fnRkLZxSLxa/R9z5UIRSnm0TdsqaaPvVAEb2ZJzALDoQJQW7Px5JHn\n\thxjtVJoGD1DPH6OCHHYf7lfdfRAShYv5kPua3m/U=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250815102945.1602071-8-stefan.klug@ideasonboard.com>","References":"<20250815102945.1602071-1-stefan.klug@ideasonboard.com>\n\t<20250815102945.1602071-8-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint\n\tlogging","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 15 Aug 2025 12:01:27 +0100","Message-ID":"<175525568711.560048.6417816459236854696@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":35710,"web_url":"https://patchwork.libcamera.org/comment/35710/","msgid":"<175706898160.1787083.72896827881260278@neptunite.rasen.tech>","date":"2025-09-05T10:43:01","subject":"Re: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint\n\tlogging","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-08-15 19:29:27)\n> The debug log statements in constraintClampGain() are after the\n> assignment of gain. So they correctly log when the constraint applies,\n> but the gain values logged are the same. Fix that.\n> \n> Fixes: 42e18c96bcb7 (\"libipa: agc_mean_luminance: Add debug logging\")\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> \n> ---\n> \n> Changes in v3:\n> - Added this patch\n> ---\n>  src/ipa/libipa/agc_mean_luminance.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> index ff96a381ffce..fce1a5064870 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> @@ -488,18 +488,18 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,\n>  \n>                 if (constraint.bound == AgcConstraint::Bound::Lower &&\n>                     newGain > gain) {\n> -                       gain = newGain;\n>                         LOG(AgcMeanLuminance, Debug)\n>                                 << \"Apply lower bound: \" << gain << \" to \"\n>                                 << newGain;\n> +                       gain = newGain;\n>                 }\n>  \n>                 if (constraint.bound == AgcConstraint::Bound::Upper &&\n>                     newGain < gain) {\n> -                       gain = newGain;\n>                         LOG(AgcMeanLuminance, Debug)\n>                                 << \"Apply upper bound: \" << gain << \" to \"\n>                                 << newGain;\n> +                       gain = newGain;\n>                 }\n>         }\n>  \n> -- \n> 2.48.1\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 614BDC332C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Sep 2025 10:43:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8DE7E6936D;\n\tFri,  5 Sep 2025 12:43:20 +0200 (CEST)","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 9089C69357\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Sep 2025 12:43:08 +0200 (CEST)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:dbfb:387c:7405:52bc])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 0F684F09;\n\tFri,  5 Sep 2025 12:41:57 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qNWs/RSS\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1757068918;\n\tbh=BL6mfZayZORdQ5BtEWhMsVkpDCqC6RTTyGIMBOMKXxg=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=qNWs/RSSpGqTW4VF56ePqIJqrdm1fFN0uu852mgxkb/hZEGFcOG1UEOdF7LU2X9bF\n\tGdHQkLzS/Ao5EnP/1s+0H+mG2xz50+zFV6hrKg6tCiRqlr43789n4ylGT1gSiNClKj\n\tq7s56FOFuOCdfEqN0O65MAdQWONaETIkfUWhtB+k=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250815102945.1602071-8-stefan.klug@ideasonboard.com>","References":"<20250815102945.1602071-1-stefan.klug@ideasonboard.com>\n\t<20250815102945.1602071-8-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint\n\tlogging","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 05 Sep 2025 19:43:01 +0900","Message-ID":"<175706898160.1787083.72896827881260278@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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>"}}]