[{"id":35347,"web_url":"https://patchwork.libcamera.org/comment/35347/","msgid":"<e1b39782-6d39-432e-9d40-a326280ee0ac@ideasonboard.com>","date":"2025-08-11T15:07:11","subject":"Re: [PATCH v2 07/16] libipa: agc_mean_luminance: Configure the\n\texposure mode helpers","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Stefan\n\nOn 08/08/2025 15:12, Stefan Klug wrote:\n> Add a function to configure the exposure mode helpers with the line\n> length and sensor helper to take quantization effects into account.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>   src/ipa/libipa/agc_mean_luminance.cpp | 15 +++++++++++++++\n>   src/ipa/libipa/agc_mean_luminance.h   |  1 +\n>   2 files changed, 16 insertions(+)\n> \n> diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> index ff96a381ffce..58c4dfc9add2 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> @@ -311,6 +311,21 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData)\n>   \treturn 0;\n>   }\n>   \n> +/**\n> + * \\brief Configure the exposure mode helpers\n> + * \\param[in] lineLength The sensor line length\n> + * \\param[in] sensorHelper The sensor helper\n> + *\n> + * This function configures the exposure mode helpers so they can correctly\n> + * take quantization effects into account.\n> + */\n> +void AgcMeanLuminance::configure(utils::Duration lineLength,\n\nVery very mild dislike of the word \"length\" to name a Duration which my \npersonality compels me to mention, but with this name or any other:\n\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n\n> +\t\t\t\t const CameraSensorHelper *sensorHelper)\n> +{\n> +\tfor (auto &[id, helper] : exposureModeHelpers_)\n> +\t\thelper->configure(lineLength, sensorHelper);\n> +}\n> +\n>   /**\n>    * \\brief Parse tuning data for AeConstraintMode and AeExposureMode controls\n>    * \\param[in] tuningData the YamlObject representing the tuning data\n> diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h\n> index cad7ef845487..a7c7e006af42 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.h\n> +++ b/src/ipa/libipa/agc_mean_luminance.h\n> @@ -42,6 +42,7 @@ public:\n>   \t\tdouble yTarget;\n>   \t};\n>   \n> +\tvoid configure(utils::Duration lineLength, const CameraSensorHelper *sensorHelper);\n>   \tint parseTuningData(const YamlObject &tuningData);\n>   \n>   \tvoid setExposureCompensation(double gain)","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 D350FBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Aug 2025 15:07:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C32669233;\n\tMon, 11 Aug 2025 17:07:16 +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 8FE1B69233\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Aug 2025 17:07:14 +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 693BD4A4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Aug 2025 17:06:22 +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=\"pu/Jzay8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1754924782;\n\tbh=mialsiqIWqJKAZjwOZ+oVlJRr7MPSxq90cFFAEJJPRo=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=pu/Jzay8qO8ilLOZQZYUUkDWXn9x8Km/36VKIg4KhfQQeQqD+EERkILOxDgtnWHsH\n\tMz6NXEXc8hXsd5ErfDpcYXkpprc5kXnlZHbpdVGyTDUfOA//4FLU1Z50sE0a5F3ybe\n\tyocFu3WJPWBxVP9ymY3s+iIu5MGaP9BT77TqU/i0=","Message-ID":"<e1b39782-6d39-432e-9d40-a326280ee0ac@ideasonboard.com>","Date":"Mon, 11 Aug 2025 16:07:11 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 07/16] libipa: agc_mean_luminance: Configure the\n\texposure mode helpers","To":"libcamera-devel@lists.libcamera.org","References":"<20250808141315.413839-1-stefan.klug@ideasonboard.com>\n\t<20250808141315.413839-8-stefan.klug@ideasonboard.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","In-Reply-To":"<20250808141315.413839-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":35365,"web_url":"https://patchwork.libcamera.org/comment/35365/","msgid":"<175507481965.944315.14294693257050274901@localhost>","date":"2025-08-13T08:46:59","subject":"Re: [PATCH v2 07/16] libipa: agc_mean_luminance: Configure the\n\texposure mode helpers","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Dan,\n\nThank you for the review.\n\nQuoting Dan Scally (2025-08-11 17:07:11)\n> Hi Stefan\n> \n> On 08/08/2025 15:12, Stefan Klug wrote:\n> > Add a function to configure the exposure mode helpers with the line\n> > length and sensor helper to take quantization effects into account.\n> > \n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > ---\n> >   src/ipa/libipa/agc_mean_luminance.cpp | 15 +++++++++++++++\n> >   src/ipa/libipa/agc_mean_luminance.h   |  1 +\n> >   2 files changed, 16 insertions(+)\n> > \n> > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> > index ff96a381ffce..58c4dfc9add2 100644\n> > --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> > +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> > @@ -311,6 +311,21 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData)\n> >       return 0;\n> >   }\n> >   \n> > +/**\n> > + * \\brief Configure the exposure mode helpers\n> > + * \\param[in] lineLength The sensor line length\n> > + * \\param[in] sensorHelper The sensor helper\n> > + *\n> > + * This function configures the exposure mode helpers so they can correctly\n> > + * take quantization effects into account.\n> > + */\n> > +void AgcMeanLuminance::configure(utils::Duration lineLength,\n> \n> Very very mild dislike of the word \"length\" to name a Duration which my \n> personality compels me to mention, but with this name or any other:\n\nIndeed lineDuration sound better. I'll rename that.\n\n> \n> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n\nThanks,\nStefan\n\n> \n> > +                              const CameraSensorHelper *sensorHelper)\n> > +{\n> > +     for (auto &[id, helper] : exposureModeHelpers_)\n> > +             helper->configure(lineLength, sensorHelper);\n> > +}\n> > +\n> >   /**\n> >    * \\brief Parse tuning data for AeConstraintMode and AeExposureMode controls\n> >    * \\param[in] tuningData the YamlObject representing the tuning data\n> > diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h\n> > index cad7ef845487..a7c7e006af42 100644\n> > --- a/src/ipa/libipa/agc_mean_luminance.h\n> > +++ b/src/ipa/libipa/agc_mean_luminance.h\n> > @@ -42,6 +42,7 @@ public:\n> >               double yTarget;\n> >       };\n> >   \n> > +     void configure(utils::Duration lineLength, const CameraSensorHelper *sensorHelper);\n> >       int parseTuningData(const YamlObject &tuningData);\n> >   \n> >       void setExposureCompensation(double gain)\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 041A1BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Aug 2025 08:47:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8E23069249;\n\tWed, 13 Aug 2025 10:47:04 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D43361443\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Aug 2025 10:47:03 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:2c15:6671:9c33:a3cb])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 871D3346;\n\tWed, 13 Aug 2025 10:46: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=\"VQ5vesm3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755074769;\n\tbh=+X3lrP3iwHeCkePvPA569/cO+RznjJEUQgJBUAccP1g=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=VQ5vesm3yZF+YUg+uTno28eNZaXTmr+FGamgOf5pG0+t2S/N4i8FkhrOmr/0dMGDh\n\thPoKmFgxrD9p2eJFWMSkOsmKNs5cJRO3bNp4Ww6X09aNs+w6S05QhiNktNslb6e0NG\n\t0Bo5G9oAxvohMTcLEOiCoQeMkzG/fllD6sqPJnYM=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<e1b39782-6d39-432e-9d40-a326280ee0ac@ideasonboard.com>","References":"<20250808141315.413839-1-stefan.klug@ideasonboard.com>\n\t<20250808141315.413839-8-stefan.klug@ideasonboard.com>\n\t<e1b39782-6d39-432e-9d40-a326280ee0ac@ideasonboard.com>","Subject":"Re: [PATCH v2 07/16] libipa: agc_mean_luminance: Configure the\n\texposure mode helpers","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Dan Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 13 Aug 2025 10:46:59 +0200","Message-ID":"<175507481965.944315.14294693257050274901@localhost>","User-Agent":"alot/0.12.dev8+g2c003385c862.d20250602","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>"}}]