[{"id":33796,"web_url":"https://patchwork.libcamera.org/comment/33796/","msgid":"<174344130551.3394313.854422602604660472@ping.linuxembedded.co.uk>","date":"2025-03-31T17:15:05","subject":"Re: [PATCH v2 09/17] ipa: rkisp1: Refactor automatic/manual\n\tstructure in IPAActiveState","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-03-19 16:11:14)\n> Swap gains and automatic/manual in the IPAActiveState structure. This is\n> in preparation to adding another member, which is easier in the new\n> structure. The patch contains no functional changes.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n> ---\n> \n> Changes in v2:\n> - Use one named struct instead of two anonymous ones\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 24 ++++++++++++------------\n>  src/ipa/rkisp1/ipa_context.h      | 10 ++++++----\n>  2 files changed, 18 insertions(+), 16 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index eafe93081bb1..a9759e53f593 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -124,8 +124,8 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData)\n>  int Awb::configure(IPAContext &context,\n>                    const IPACameraSensorInfo &configInfo)\n>  {\n> -       context.activeState.awb.gains.manual = RGB<double>{ 1.0 };\n> -       context.activeState.awb.gains.automatic =\n> +       context.activeState.awb.manual.gains = RGB<double>{ 1.0 };\n> +       context.activeState.awb.automatic.gains =\n>                 awbAlgo_->gainsFromColourTemperature(kDefaultColourTemperature);\n>         context.activeState.awb.autoEnabled = true;\n>         context.activeState.awb.temperatureK = kDefaultColourTemperature;\n> @@ -173,8 +173,8 @@ void Awb::queueRequest(IPAContext &context,\n>         const auto &colourTemperature = controls.get(controls::ColourTemperature);\n>         bool update = false;\n>         if (colourGains) {\n> -               awb.gains.manual.r() = (*colourGains)[0];\n> -               awb.gains.manual.b() = (*colourGains)[1];\n> +               awb.manual.gains.r() = (*colourGains)[0];\n> +               awb.manual.gains.b() = (*colourGains)[1];\n>                 /*\n>                  * \\todo Colour temperature reported in metadata is now\n>                  * incorrect, as we can't deduce the temperature from the gains.\n> @@ -183,17 +183,17 @@ void Awb::queueRequest(IPAContext &context,\n>                 update = true;\n>         } else if (colourTemperature) {\n>                 const auto &gains = awbAlgo_->gainsFromColourTemperature(*colourTemperature);\n> -               awb.gains.manual.r() = gains.r();\n> -               awb.gains.manual.b() = gains.b();\n> +               awb.manual.gains.r() = gains.r();\n> +               awb.manual.gains.b() = gains.b();\n>                 awb.temperatureK = *colourTemperature;\n>                 update = true;\n>         }\n>  \n>         if (update)\n>                 LOG(RkISP1Awb, Debug)\n> -                       << \"Set colour gains to \" << awb.gains.manual;\n> +                       << \"Set colour gains to \" << awb.manual.gains;\n>  \n> -       frameContext.awb.gains = awb.gains.manual;\n> +       frameContext.awb.gains = awb.manual.gains;\n>         frameContext.awb.temperatureK = awb.temperatureK;\n>  }\n>  \n> @@ -208,7 +208,7 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n>          * most up-to-date automatic values we can read.\n>          */\n>         if (frameContext.awb.autoEnabled) {\n> -               frameContext.awb.gains = context.activeState.awb.gains.automatic;\n> +               frameContext.awb.gains = context.activeState.awb.automatic.gains;\n>                 frameContext.awb.temperatureK = context.activeState.awb.temperatureK;\n>         }\n>  \n> @@ -325,14 +325,14 @@ void Awb::process(IPAContext &context,\n>         /* Filter the values to avoid oscillations. */\n>         double speed = 0.2;\n>         awbResult.gains = awbResult.gains * speed +\n> -                         activeState.awb.gains.automatic * (1 - speed);\n> +                         activeState.awb.automatic.gains * (1 - speed);\n>  \n> -       activeState.awb.gains.automatic = awbResult.gains;\n> +       activeState.awb.automatic.gains = awbResult.gains;\n>  \n>         LOG(RkISP1Awb, Debug)\n>                 << std::showpoint\n>                 << \"Means \" << rgbMeans << \", gains \"\n> -               << activeState.awb.gains.automatic << \", temp \"\n> +               << activeState.awb.automatic.gains << \", temp \"\n>                 << activeState.awb.temperatureK << \"K\";\n>  }\n>  \n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 474f7036f003..6bc922a82971 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -89,10 +89,12 @@ struct IPAActiveState {\n>         } agc;\n>  \n>         struct {\n> -               struct {\n> -                       RGB<double> manual;\n> -                       RGB<double> automatic;\n> -               } gains;\n> +               struct AwbState {\n> +                       RGB<double> gains;\n> +               };\n> +\n> +               AwbState manual;\n> +               AwbState automatic;\n\nLater I wonder if we should have 'AwbState' defined as something in\nlibipa - so we can ensure all libipa users have the same control state\n...\n\nBut that's on top/separate.\n\nI'm fine with this if it helps simplify.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>  \n>                 unsigned int temperatureK;\n>                 bool autoEnabled;\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 B6222C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 31 Mar 2025 17:15:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5217868981;\n\tMon, 31 Mar 2025 19:15:10 +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 1DDDD68967\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 31 Mar 2025 19:15:09 +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 63C78703;\n\tMon, 31 Mar 2025 19:13:17 +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=\"R3qkBNq2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743441197;\n\tbh=EXt5TJ5Q1VoHa/SB2L9HN9zying6QriC68mEK0Ia7Rs=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=R3qkBNq2j50pUVBbqTzJSWWg2VH5p7lcmxG4Gd8bzTas5ITT5uOmvd+yVLv/curf0\n\tvel96BRWuXlCl6bHLFfhcK86PyZqcnPKojK5uoaYoMrWpDoy+QubW2tT2AuJtk6vvA\n\tcZTPxRlRjXVgVae7hTDBAgjpynY1xqLeSy0+UYHQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250319161152.63625-10-stefan.klug@ideasonboard.com>","References":"<20250319161152.63625-1-stefan.klug@ideasonboard.com>\n\t<20250319161152.63625-10-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v2 09/17] ipa: rkisp1: Refactor automatic/manual\n\tstructure in IPAActiveState","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":"Mon, 31 Mar 2025 18:15:05 +0100","Message-ID":"<174344130551.3394313.854422602604660472@ping.linuxembedded.co.uk>","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>"}},{"id":33829,"web_url":"https://patchwork.libcamera.org/comment/33829/","msgid":"<20250401011623.GT14432@pendragon.ideasonboard.com>","date":"2025-04-01T01:16:23","subject":"Re: [PATCH v2 09/17] ipa: rkisp1: Refactor automatic/manual\n\tstructure in IPAActiveState","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stefan,\n\nThank you for the patch.\n\nOn Wed, Mar 19, 2025 at 05:11:14PM +0100, Stefan Klug wrote:\n> Swap gains and automatic/manual in the IPAActiveState structure. This is\n> in preparation to adding another member, which is easier in the new\n> structure. The patch contains no functional changes.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n> ---\n> \n> Changes in v2:\n> - Use one named struct instead of two anonymous ones\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 24 ++++++++++++------------\n>  src/ipa/rkisp1/ipa_context.h      | 10 ++++++----\n>  2 files changed, 18 insertions(+), 16 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index eafe93081bb1..a9759e53f593 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -124,8 +124,8 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData)\n>  int Awb::configure(IPAContext &context,\n>  \t\t   const IPACameraSensorInfo &configInfo)\n>  {\n> -\tcontext.activeState.awb.gains.manual = RGB<double>{ 1.0 };\n> -\tcontext.activeState.awb.gains.automatic =\n> +\tcontext.activeState.awb.manual.gains = RGB<double>{ 1.0 };\n> +\tcontext.activeState.awb.automatic.gains =\n\nThe current order reads better than the new one, but I suppose easing\naddition of new fields is more important.\n\n>  \t\tawbAlgo_->gainsFromColourTemperature(kDefaultColourTemperature);\n>  \tcontext.activeState.awb.autoEnabled = true;\n>  \tcontext.activeState.awb.temperatureK = kDefaultColourTemperature;\n> @@ -173,8 +173,8 @@ void Awb::queueRequest(IPAContext &context,\n>  \tconst auto &colourTemperature = controls.get(controls::ColourTemperature);\n>  \tbool update = false;\n>  \tif (colourGains) {\n> -\t\tawb.gains.manual.r() = (*colourGains)[0];\n> -\t\tawb.gains.manual.b() = (*colourGains)[1];\n> +\t\tawb.manual.gains.r() = (*colourGains)[0];\n> +\t\tawb.manual.gains.b() = (*colourGains)[1];\n>  \t\t/*\n>  \t\t * \\todo Colour temperature reported in metadata is now\n>  \t\t * incorrect, as we can't deduce the temperature from the gains.\n> @@ -183,17 +183,17 @@ void Awb::queueRequest(IPAContext &context,\n>  \t\tupdate = true;\n>  \t} else if (colourTemperature) {\n>  \t\tconst auto &gains = awbAlgo_->gainsFromColourTemperature(*colourTemperature);\n> -\t\tawb.gains.manual.r() = gains.r();\n> -\t\tawb.gains.manual.b() = gains.b();\n> +\t\tawb.manual.gains.r() = gains.r();\n> +\t\tawb.manual.gains.b() = gains.b();\n>  \t\tawb.temperatureK = *colourTemperature;\n>  \t\tupdate = true;\n>  \t}\n>  \n>  \tif (update)\n>  \t\tLOG(RkISP1Awb, Debug)\n> -\t\t\t<< \"Set colour gains to \" << awb.gains.manual;\n> +\t\t\t<< \"Set colour gains to \" << awb.manual.gains;\n>  \n> -\tframeContext.awb.gains = awb.gains.manual;\n> +\tframeContext.awb.gains = awb.manual.gains;\n>  \tframeContext.awb.temperatureK = awb.temperatureK;\n>  }\n>  \n> @@ -208,7 +208,7 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n>  \t * most up-to-date automatic values we can read.\n>  \t */\n>  \tif (frameContext.awb.autoEnabled) {\n> -\t\tframeContext.awb.gains = context.activeState.awb.gains.automatic;\n> +\t\tframeContext.awb.gains = context.activeState.awb.automatic.gains;\n>  \t\tframeContext.awb.temperatureK = context.activeState.awb.temperatureK;\n>  \t}\n>  \n> @@ -325,14 +325,14 @@ void Awb::process(IPAContext &context,\n>  \t/* Filter the values to avoid oscillations. */\n>  \tdouble speed = 0.2;\n>  \tawbResult.gains = awbResult.gains * speed +\n> -\t\t\t  activeState.awb.gains.automatic * (1 - speed);\n> +\t\t\t  activeState.awb.automatic.gains * (1 - speed);\n>  \n> -\tactiveState.awb.gains.automatic = awbResult.gains;\n> +\tactiveState.awb.automatic.gains = awbResult.gains;\n>  \n>  \tLOG(RkISP1Awb, Debug)\n>  \t\t<< std::showpoint\n>  \t\t<< \"Means \" << rgbMeans << \", gains \"\n> -\t\t<< activeState.awb.gains.automatic << \", temp \"\n> +\t\t<< activeState.awb.automatic.gains << \", temp \"\n>  \t\t<< activeState.awb.temperatureK << \"K\";\n>  }\n>  \n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 474f7036f003..6bc922a82971 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -89,10 +89,12 @@ struct IPAActiveState {\n>  \t} agc;\n>  \n>  \tstruct {\n> -\t\tstruct {\n> -\t\t\tRGB<double> manual;\n> -\t\t\tRGB<double> automatic;\n> -\t\t} gains;\n> +\t\tstruct AwbState {\n> +\t\t\tRGB<double> gains;\n> +\t\t};\n> +\n> +\t\tAwbState manual;\n> +\t\tAwbState automatic;\n\nYou're missing the documentation update. With that,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>  \t\tunsigned int temperatureK;\n>  \t\tbool autoEnabled;","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 E6BBFC3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Apr 2025 01:16:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 084F068981;\n\tTue,  1 Apr 2025 03:16:50 +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 A119862C66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Apr 2025 03:16:48 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-147-224-nat.elisa-mobile.fi\n\t[85.76.147.224])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D06E6F9;\n\tTue,  1 Apr 2025 03:14:56 +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=\"iZqSVKAy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743470096;\n\tbh=exLACBDg8ZB+4z9yiKd59ezM9pQ4PzmmodqtDRqXUxI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iZqSVKAybThEOP1HdIY9mT4ln4RQk/0M2QUeSmMg5FtCdpSf9R2nFNSbWVKcLm6Tl\n\tpuixHBcpYTV/KaAsfAkLkcOIggk6yZLO2grWg5ilHRJoOcl/VJifo6hFehCEqdEa2D\n\tBp5sIa2pvchkoPEaLlY0QhbkMRs4tJyb6LsfGBCM=","Date":"Tue, 1 Apr 2025 04:16:23 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 09/17] ipa: rkisp1: Refactor automatic/manual\n\tstructure in IPAActiveState","Message-ID":"<20250401011623.GT14432@pendragon.ideasonboard.com>","References":"<20250319161152.63625-1-stefan.klug@ideasonboard.com>\n\t<20250319161152.63625-10-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250319161152.63625-10-stefan.klug@ideasonboard.com>","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":33864,"web_url":"https://patchwork.libcamera.org/comment/33864/","msgid":"<y53lnsw57e6kl2e6n4tlgzyepvfwqlohtfuqhik3sg3llw54e3@nzn74w2zaald>","date":"2025-04-01T21:11:17","subject":"Re: [PATCH v2 09/17] ipa: rkisp1: Refactor automatic/manual\n\tstructure in IPAActiveState","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"On Tue, Apr 01, 2025 at 04:16:23AM +0300, Laurent Pinchart wrote:\n> Hi Stefan,\n> \n> Thank you for the patch.\n> \n> On Wed, Mar 19, 2025 at 05:11:14PM +0100, Stefan Klug wrote:\n> > Swap gains and automatic/manual in the IPAActiveState structure. This is\n> > in preparation to adding another member, which is easier in the new\n> > structure. The patch contains no functional changes.\n> > \n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > \n> > ---\n> > \n> > Changes in v2:\n> > - Use one named struct instead of two anonymous ones\n> > ---\n> >  src/ipa/rkisp1/algorithms/awb.cpp | 24 ++++++++++++------------\n> >  src/ipa/rkisp1/ipa_context.h      | 10 ++++++----\n> >  2 files changed, 18 insertions(+), 16 deletions(-)\n> > \n> > diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> > index eafe93081bb1..a9759e53f593 100644\n> > --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> > +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> > @@ -124,8 +124,8 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData)\n> >  int Awb::configure(IPAContext &context,\n> >  \t\t   const IPACameraSensorInfo &configInfo)\n> >  {\n> > -\tcontext.activeState.awb.gains.manual = RGB<double>{ 1.0 };\n> > -\tcontext.activeState.awb.gains.automatic =\n> > +\tcontext.activeState.awb.manual.gains = RGB<double>{ 1.0 };\n> > +\tcontext.activeState.awb.automatic.gains =\n> \n> The current order reads better than the new one, but I suppose easing\n> addition of new fields is more important.\n> \n> >  \t\tawbAlgo_->gainsFromColourTemperature(kDefaultColourTemperature);\n> >  \tcontext.activeState.awb.autoEnabled = true;\n> >  \tcontext.activeState.awb.temperatureK = kDefaultColourTemperature;\n> > @@ -173,8 +173,8 @@ void Awb::queueRequest(IPAContext &context,\n> >  \tconst auto &colourTemperature = controls.get(controls::ColourTemperature);\n> >  \tbool update = false;\n> >  \tif (colourGains) {\n> > -\t\tawb.gains.manual.r() = (*colourGains)[0];\n> > -\t\tawb.gains.manual.b() = (*colourGains)[1];\n> > +\t\tawb.manual.gains.r() = (*colourGains)[0];\n> > +\t\tawb.manual.gains.b() = (*colourGains)[1];\n> >  \t\t/*\n> >  \t\t * \\todo Colour temperature reported in metadata is now\n> >  \t\t * incorrect, as we can't deduce the temperature from the gains.\n> > @@ -183,17 +183,17 @@ void Awb::queueRequest(IPAContext &context,\n> >  \t\tupdate = true;\n> >  \t} else if (colourTemperature) {\n> >  \t\tconst auto &gains = awbAlgo_->gainsFromColourTemperature(*colourTemperature);\n> > -\t\tawb.gains.manual.r() = gains.r();\n> > -\t\tawb.gains.manual.b() = gains.b();\n> > +\t\tawb.manual.gains.r() = gains.r();\n> > +\t\tawb.manual.gains.b() = gains.b();\n> >  \t\tawb.temperatureK = *colourTemperature;\n> >  \t\tupdate = true;\n> >  \t}\n> >  \n> >  \tif (update)\n> >  \t\tLOG(RkISP1Awb, Debug)\n> > -\t\t\t<< \"Set colour gains to \" << awb.gains.manual;\n> > +\t\t\t<< \"Set colour gains to \" << awb.manual.gains;\n> >  \n> > -\tframeContext.awb.gains = awb.gains.manual;\n> > +\tframeContext.awb.gains = awb.manual.gains;\n> >  \tframeContext.awb.temperatureK = awb.temperatureK;\n> >  }\n> >  \n> > @@ -208,7 +208,7 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n> >  \t * most up-to-date automatic values we can read.\n> >  \t */\n> >  \tif (frameContext.awb.autoEnabled) {\n> > -\t\tframeContext.awb.gains = context.activeState.awb.gains.automatic;\n> > +\t\tframeContext.awb.gains = context.activeState.awb.automatic.gains;\n> >  \t\tframeContext.awb.temperatureK = context.activeState.awb.temperatureK;\n> >  \t}\n> >  \n> > @@ -325,14 +325,14 @@ void Awb::process(IPAContext &context,\n> >  \t/* Filter the values to avoid oscillations. */\n> >  \tdouble speed = 0.2;\n> >  \tawbResult.gains = awbResult.gains * speed +\n> > -\t\t\t  activeState.awb.gains.automatic * (1 - speed);\n> > +\t\t\t  activeState.awb.automatic.gains * (1 - speed);\n> >  \n> > -\tactiveState.awb.gains.automatic = awbResult.gains;\n> > +\tactiveState.awb.automatic.gains = awbResult.gains;\n> >  \n> >  \tLOG(RkISP1Awb, Debug)\n> >  \t\t<< std::showpoint\n> >  \t\t<< \"Means \" << rgbMeans << \", gains \"\n> > -\t\t<< activeState.awb.gains.automatic << \", temp \"\n> > +\t\t<< activeState.awb.automatic.gains << \", temp \"\n> >  \t\t<< activeState.awb.temperatureK << \"K\";\n> >  }\n> >  \n> > diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> > index 474f7036f003..6bc922a82971 100644\n> > --- a/src/ipa/rkisp1/ipa_context.h\n> > +++ b/src/ipa/rkisp1/ipa_context.h\n> > @@ -89,10 +89,12 @@ struct IPAActiveState {\n> >  \t} agc;\n> >  \n> >  \tstruct {\n> > -\t\tstruct {\n> > -\t\t\tRGB<double> manual;\n> > -\t\t\tRGB<double> automatic;\n> > -\t\t} gains;\n> > +\t\tstruct AwbState {\n> > +\t\t\tRGB<double> gains;\n> > +\t\t};\n> > +\n> > +\t\tAwbState manual;\n> > +\t\tAwbState automatic;\n> \n> You're missing the documentation update. With that,\n\nOuch. Turns out the doxygen documentation doesn't include ipa/rkisp1 at\nall. Adding that shows that we are missing waaay more things here. So I\nremoved it again and keep it for a later patch :-)\n\nNevertheless the v3 will contain updated docs for the fields at stake\nhere.\n\nBest regards,\nStefan\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> >  \n> >  \t\tunsigned int temperatureK;\n> >  \t\tbool autoEnabled;\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 07B90C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Apr 2025 21:11:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2A1F068981;\n\tTue,  1 Apr 2025 23:11:22 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF0A668947\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Apr 2025 23:11:20 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:14c7:4fcc:495b:719f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7A3E4741;\n\tTue,  1 Apr 2025 23:09:28 +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=\"wL3XUSOx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743541768;\n\tbh=3t6zruZmESquLyxWFI9pfwVmnJKPQj9Ze2j4Q6beVYA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=wL3XUSOxPfd0JBqkrDGMeCvdGGQZe6HtzSonfh4jtkwnO7AqFH9znSRkAqQFvLrUp\n\t9gR3gcJ1m4hvrObLiL+h+cCMqU/KEreP0wm2O/DuSjBwWr1ypoyfgm0yKgb0YThVli\n\tX5qxjUa1YNYovqh874npqtqlBfqSFJsQtXv+JSY0=","Date":"Tue, 1 Apr 2025 23:11:17 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 09/17] ipa: rkisp1: Refactor automatic/manual\n\tstructure in IPAActiveState","Message-ID":"<y53lnsw57e6kl2e6n4tlgzyepvfwqlohtfuqhik3sg3llw54e3@nzn74w2zaald>","References":"<20250319161152.63625-1-stefan.klug@ideasonboard.com>\n\t<20250319161152.63625-10-stefan.klug@ideasonboard.com>\n\t<20250401011623.GT14432@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250401011623.GT14432@pendragon.ideasonboard.com>","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>"}}]