[{"id":37989,"web_url":"https://patchwork.libcamera.org/comment/37989/","msgid":"<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>","date":"2026-01-28T12:52:32","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2026-01-28 11:43:57)\n> Now, when we have a combined matrix, we can apply AWB gains to it\n> directly in awb.cpp.\n> \n> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/ipa/simple/algorithms/awb.cpp | 5 +++++\n>  src/ipa/simple/algorithms/lut.cpp | 5 +----\n>  2 files changed, 6 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n> index 18d97f707..31726658a 100644\n> --- a/src/ipa/simple/algorithms/awb.cpp\n> +++ b/src/ipa/simple/algorithms/awb.cpp\n> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n>                   [[maybe_unused]] DebayerParams *params)\n>  {\n>         auto &gains = context.activeState.awb.gains;\n> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> +                                            0, gains.g(), 0,\n> +                                            0, 0, gains.b() } };\n> +       context.activeState.combinedMatrix =\n> +               context.activeState.combinedMatrix * gainMatrix;\n\nI'm all for moving this out of lut.cpp - so :\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nBut ordering matters here - so I think there's a likely hood we'll have\nto move the final combination out to the upper layer and leave the\nalgorithms to just work out their parameters.\n\n\n\n>         /* Just report, the gains are applied in LUT algorithm. */\n>         frameContext.gains.red = gains.r();\n>         frameContext.gains.blue = gains.b();\n> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> index 9740f8c8d..d8e92c613 100644\n> --- a/src/ipa/simple/algorithms/lut.cpp\n> +++ b/src/ipa/simple/algorithms/lut.cpp\n> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n>                         params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n>                 }\n>         } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> -                                                    0, gains.g(), 0,\n> -                                                    0, 0, gains.b() } };\n> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n> +               auto &matrix = context.activeState.combinedMatrix;\n>                 auto &red = params->redCcm;\n>                 auto &green = params->greenCcm;\n>                 auto &blue = params->blueCcm;\n> -- \n> 2.52.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 4EEB9C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 12:52:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 795A761FD0;\n\tWed, 28 Jan 2026 13:52:37 +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 DDCF261FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 13:52:35 +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 BDEF0E70;\n\tWed, 28 Jan 2026 13:51:58 +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=\"AXIvmLpn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769604718;\n\tbh=R7AGhJN8TumjL9zEuPUAQjijbOPNxCXoAtB5T9+oi7s=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=AXIvmLpnxKRYa5QqLaisBx2ECgSIVQnNRrgZmbkXBCfozK15383RJdgCxuVB4WEJM\n\tvu8mplF/vy/b4Eo58A3B2vxWFxhu8D0HqMKQyt6/f9y58AX54MmQo5T4T2ykWkfV/W\n\tlpR5T+C+DM++Tayz1/paMN3tCcYXnfpEcisn7SO0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260128114402.31570-11-mzamazal@redhat.com>","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tRobert Mader <robert.mader@collabora.com>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Wed, 28 Jan 2026 12:52:32 +0000","Message-ID":"<176960475289.3376561.13374543330548565257@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":37998,"web_url":"https://patchwork.libcamera.org/comment/37998/","msgid":"<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-28T14:48:42","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n\n> Quoting Milan Zamazal (2026-01-28 11:43:57)\n>> Now, when we have a combined matrix, we can apply AWB gains to it\n>> directly in awb.cpp.\n>\n>> \n>> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/ipa/simple/algorithms/awb.cpp | 5 +++++\n>>  src/ipa/simple/algorithms/lut.cpp | 5 +----\n>>  2 files changed, 6 insertions(+), 4 deletions(-)\n>> \n>> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n>> index 18d97f707..31726658a 100644\n>> --- a/src/ipa/simple/algorithms/awb.cpp\n>> +++ b/src/ipa/simple/algorithms/awb.cpp\n>> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n>>                   [[maybe_unused]] DebayerParams *params)\n>>  {\n>>         auto &gains = context.activeState.awb.gains;\n>> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n>> +                                            0, gains.g(), 0,\n>> +                                            0, 0, gains.b() } };\n>> +       context.activeState.combinedMatrix =\n>> +               context.activeState.combinedMatrix * gainMatrix;\n>\n> I'm all for moving this out of lut.cpp - so :\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> But ordering matters here - so I think there's a likely hood we'll have\n> to move the final combination out to the upper layer and leave the\n> algorithms to just work out their parameters.\n\nDo you mean it's permitted to change the predefined order of the\nalgorithms?  Why would one need to do so?\n\n>>         /* Just report, the gains are applied in LUT algorithm. */\n>>         frameContext.gains.red = gains.r();\n>>         frameContext.gains.blue = gains.b();\n>> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n>> index 9740f8c8d..d8e92c613 100644\n>> --- a/src/ipa/simple/algorithms/lut.cpp\n>> +++ b/src/ipa/simple/algorithms/lut.cpp\n>> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n>>                         params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n>>                 }\n>>         } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n>> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n>> -                                                    0, gains.g(), 0,\n>> -                                                    0, 0, gains.b() } };\n>> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n>> +               auto &matrix = context.activeState.combinedMatrix;\n>>                 auto &red = params->redCcm;\n>>                 auto &green = params->greenCcm;\n>>                 auto &blue = params->blueCcm;\n>> -- \n>> 2.52.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 BB7FFC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 14:48:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EDEC361FC9;\n\tWed, 28 Jan 2026 15:48:51 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1F16F61FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 15:48:50 +0100 (CET)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-414-_3lEC2LePOqO-Kea8668xQ-1; Wed, 28 Jan 2026 09:48:45 -0500","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-4801d21c280so47931475e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 06:48:45 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-435e10e4762sm7298031f8f.6.2026.01.28.06.48.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 28 Jan 2026 06:48:43 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"VAaKEbgG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769611728;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=JMKGWdlX7IXWnZKeOwmH18nEIuIbDHAV4D1lrAtbFLg=;\n\tb=VAaKEbgGCtyNjGKpNo5SUxIcFVVS8bWs5hjWd2uecngzCelTjqSFDgibgp0mgpTfxSHuOP\n\tSbjVm9Tac/47R6PlRfIrC1jH9CAant7taNsMYUYe4z6y1TdiQJtv9kMed06ISrlzTBIBbU\n\tkvLf1monMbKuDilv1hjIjV1XuOERmK8=","X-MC-Unique":"_3lEC2LePOqO-Kea8668xQ-1","X-Mimecast-MFC-AGG-ID":"_3lEC2LePOqO-Kea8668xQ_1769611725","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769611724; x=1770216524;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=JMKGWdlX7IXWnZKeOwmH18nEIuIbDHAV4D1lrAtbFLg=;\n\tb=W8GUsjHNgLiVZfNA0rL8d1BDKb4j5GzAtnlfdruumBXalZfWPsxCVhXPhlCL4v76u2\n\ttuZnA4ver6TVGw11nAguDrzS6M+VSFqGtBpJnbXqu7TpxoZB+Ll1zMHl5NaPKVS5TdQ7\n\tJpTnneWnFj63rdZnEpOpOoWsppKTma7SuXxJVtcbLn3WW/Stw66m4UUWzmi7a+GEL14X\n\tSckTdlxhldOjJqx260eP/foBL7vszy7Mryzzn2Z/zW52gwjARjh4JNAioC1X+9wuVKBA\n\tzCru5wewiSkU1n14I0zxPvC4ZL19NrWidaxzr8EAkfgxzYimaiENDNTIzr84kx+kwE+8\n\tQOzw==","X-Gm-Message-State":"AOJu0YwtuOkROEdXtjApB3K84kdeEPeDcgvbRyxWL8qrUvGgpGsj+Rp2\n\t/Vyhi78AkvbmVu4Y6xaqDt30E2cdhlMQNFHfU1FJ2lrmrGLbgM1bHrpPBcA++8ISl0F1aKwAKQs\n\t3MZceR7n37H9wfhOdPyZNx4xHlYFd4WfSx7iIpEYb/KnSB4z+/BI4xr+omI/4/gTcYMsm4b/xcd\n\tA=","X-Gm-Gg":"AZuq6aKJNlEbJ/yccinuWkiSxizKVvsZ2pU2Tzwms8P3NKLjOlMZbKGQgzUXHcNalOO\n\tK+HZoASSAZyK/s6Ww0gkaCTZnmJUUojoC0XWURCRXi/2I1pRrNkVrCq+zyuWG1S6jl92Mc+pXs/\n\twhqTYAjgEoCWa9lLh4ysqZLo4grI49cPd1Esg/eQhiE3zKFuuID2Ze8+v0O7yW7L/7qru0ehLu6\n\tD12Q8mhaR1msIV6GklinJDzOtYIDQTdem2dSK7gKkaAsEyb4JRVdIdCv5Bpb9LieC3Wy5NkoZJd\n\tvuxuTC3gnfL4+An4v2SzRd3QxhpvCvXjvGmVYfTgJCom4KDyLvDIvUl1Y81hi15HWV0jWBVEEIF\n\t+4G1BAIfJpZmuX6MpXzp1GFiiQF16GA510oVab95OSK4P+vqHflgLxw+fWeFf29U=","X-Received":["by 2002:a05:6000:2481:b0:435:aecf:9674 with SMTP id\n\tffacd0b85a97d-435dd1bcdd2mr7058739f8f.55.1769611724493; \n\tWed, 28 Jan 2026 06:48:44 -0800 (PST)","by 2002:a05:6000:2481:b0:435:aecf:9674 with SMTP id\n\tffacd0b85a97d-435dd1bcdd2mr7058715f8f.55.1769611724000; \n\tWed, 28 Jan 2026 06:48:44 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Robert Mader\n\t<robert.mader@collabora.com>","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","In-Reply-To":"<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>\n\t(Kieran Bingham's message of \"Wed, 28 Jan 2026 12:52:32 +0000\")","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>\n\t<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>","Date":"Wed, 28 Jan 2026 15:48:42 +0100","Message-ID":"<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"S6cfAv63cBLGpmUcH4apQOFycjAJ4owUrCQGXaVdwZQ_1769611725","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":37999,"web_url":"https://patchwork.libcamera.org/comment/37999/","msgid":"<176961199701.3376561.15835792546502047968@ping.linuxembedded.co.uk>","date":"2026-01-28T14:53:17","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2026-01-28 14:48:42)\n> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n> \n> > Quoting Milan Zamazal (2026-01-28 11:43:57)\n> >> Now, when we have a combined matrix, we can apply AWB gains to it\n> >> directly in awb.cpp.\n> >\n> >> \n> >> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >> ---\n> >>  src/ipa/simple/algorithms/awb.cpp | 5 +++++\n> >>  src/ipa/simple/algorithms/lut.cpp | 5 +----\n> >>  2 files changed, 6 insertions(+), 4 deletions(-)\n> >> \n> >> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n> >> index 18d97f707..31726658a 100644\n> >> --- a/src/ipa/simple/algorithms/awb.cpp\n> >> +++ b/src/ipa/simple/algorithms/awb.cpp\n> >> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n> >>                   [[maybe_unused]] DebayerParams *params)\n> >>  {\n> >>         auto &gains = context.activeState.awb.gains;\n> >> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> >> +                                            0, gains.g(), 0,\n> >> +                                            0, 0, gains.b() } };\n> >> +       context.activeState.combinedMatrix =\n> >> +               context.activeState.combinedMatrix * gainMatrix;\n> >\n> > I'm all for moving this out of lut.cpp - so :\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > But ordering matters here - so I think there's a likely hood we'll have\n> > to move the final combination out to the upper layer and leave the\n> > algorithms to just work out their parameters.\n> \n> Do you mean it's permitted to change the predefined order of the\n> algorithms?  Why would one need to do so?\n\nI mean at the moment it's *not* well defined, and therefore this could\ncould break.\n\nI.e. if someone were to put in the tuning file:\n\n - Gamma\n - Awb\n\nit would be a different processing order than\n\n - Awb\n - Gamma\n\nAnd that could impact multiplications into the combinedMatrix.\n\n> \n> >>         /* Just report, the gains are applied in LUT algorithm. */\n> >>         frameContext.gains.red = gains.r();\n> >>         frameContext.gains.blue = gains.b();\n> >> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> >> index 9740f8c8d..d8e92c613 100644\n> >> --- a/src/ipa/simple/algorithms/lut.cpp\n> >> +++ b/src/ipa/simple/algorithms/lut.cpp\n> >> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n> >>                         params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n> >>                 }\n> >>         } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n> >> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> >> -                                                    0, gains.g(), 0,\n> >> -                                                    0, 0, gains.b() } };\n> >> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n> >> +               auto &matrix = context.activeState.combinedMatrix;\n> >>                 auto &red = params->redCcm;\n> >>                 auto &green = params->greenCcm;\n> >>                 auto &blue = params->blueCcm;\n> >> -- \n> >> 2.52.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 36C96C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 14:53:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6752561FC9;\n\tWed, 28 Jan 2026 15:53:22 +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 7275E61FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 15:53:20 +0100 (CET)","from monstersaurus.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 53C2DC6F;\n\tWed, 28 Jan 2026 15:52:43 +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=\"MHNC7H9e\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769611963;\n\tbh=rn83Is2P5ThR/0JDoJeq+/nmukPZ8IrA0xxRlSYsFkk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=MHNC7H9eFm6vvJumrVnOphQoFLAdpyzLqoH79dQlo8Oak9Bkpe4RLhxyHG/McKIWg\n\tqqnLCEXCwBeOf+l8HRftGMAYJdzhEICjVFvZu+5ZSQY/yMfaM4vrM1cvg0AmZb656i\n\tbZV68wtFbUzl6Tg3P/ocdt3dVSYhNUFLMwRbCW9E=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>\n\t<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>\n\t<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tRobert Mader <robert.mader@collabora.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Date":"Wed, 28 Jan 2026 14:53:17 +0000","Message-ID":"<176961199701.3376561.15835792546502047968@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":38000,"web_url":"https://patchwork.libcamera.org/comment/38000/","msgid":"<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com>","date":"2026-01-28T15:00:31","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 28. 15:53 keltezéssel, Kieran Bingham írta:\n> Quoting Milan Zamazal (2026-01-28 14:48:42)\n>> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n>>\n>>> Quoting Milan Zamazal (2026-01-28 11:43:57)\n>>>> Now, when we have a combined matrix, we can apply AWB gains to it\n>>>> directly in awb.cpp.\n>>>\n>>>>\n>>>> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n>>>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>>>> ---\n>>>>   src/ipa/simple/algorithms/awb.cpp | 5 +++++\n>>>>   src/ipa/simple/algorithms/lut.cpp | 5 +----\n>>>>   2 files changed, 6 insertions(+), 4 deletions(-)\n>>>>\n>>>> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n>>>> index 18d97f707..31726658a 100644\n>>>> --- a/src/ipa/simple/algorithms/awb.cpp\n>>>> +++ b/src/ipa/simple/algorithms/awb.cpp\n>>>> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n>>>>                    [[maybe_unused]] DebayerParams *params)\n>>>>   {\n>>>>          auto &gains = context.activeState.awb.gains;\n>>>> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n>>>> +                                            0, gains.g(), 0,\n>>>> +                                            0, 0, gains.b() } };\n>>>> +       context.activeState.combinedMatrix =\n>>>> +               context.activeState.combinedMatrix * gainMatrix;\n>>>\n>>> I'm all for moving this out of lut.cpp - so :\n>>>\n>>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>\n>>> But ordering matters here - so I think there's a likely hood we'll have\n>>> to move the final combination out to the upper layer and leave the\n>>> algorithms to just work out their parameters.\n>>\n>> Do you mean it's permitted to change the predefined order of the\n>> algorithms?  Why would one need to do so?\n> \n> I mean at the moment it's *not* well defined, and therefore this could\n> could break.\n> \n> I.e. if someone were to put in the tuning file:\n> \n>   - Gamma\n>   - Awb\n> \n> it would be a different processing order than\n> \n>   - Awb\n>   - Gamma\n> \n> And that could impact multiplications into the combinedMatrix.\n\nI think eventually this \"footgun\" should be removed and each algorithm should be\nable to specify forward/backward dependencies and the list should be sorted\naccordingly when loading the configuration.\n\n\n\n> \n>>\n>>>>          /* Just report, the gains are applied in LUT algorithm. */\n>>>>          frameContext.gains.red = gains.r();\n>>>>          frameContext.gains.blue = gains.b();\n>>>> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n>>>> index 9740f8c8d..d8e92c613 100644\n>>>> --- a/src/ipa/simple/algorithms/lut.cpp\n>>>> +++ b/src/ipa/simple/algorithms/lut.cpp\n>>>> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n>>>>                          params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n>>>>                  }\n>>>>          } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n>>>> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n>>>> -                                                    0, gains.g(), 0,\n>>>> -                                                    0, 0, gains.b() } };\n>>>> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n>>>> +               auto &matrix = context.activeState.combinedMatrix;\n>>>>                  auto &red = params->redCcm;\n>>>>                  auto &green = params->greenCcm;\n>>>>                  auto &blue = params->blueCcm;\n>>>> --\n>>>> 2.52.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 F126CC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 15:00:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3824161FD0;\n\tWed, 28 Jan 2026 16:00:36 +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 5B90461FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 16:00:34 +0100 (CET)","from [192.168.33.40] (185.221.142.123.nat.pool.zt.hu\n\t[185.221.142.123])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 44206C6F;\n\tWed, 28 Jan 2026 15:59:57 +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=\"VRwI9vlz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769612397;\n\tbh=l1Um2Rly79rg/20JUSxQCCCt4W43hLNZYMRaYAXbRmI=;\n\th=Date:Subject:To:References:From:Cc:In-Reply-To:From;\n\tb=VRwI9vlzQnij4AVMlr6hW4wNqVLJdq/vYyMw/ZgezT0ZbHU4pup0HGZFW9FRqqu1s\n\t++YJlNx1x5cD05KFD3Tr0psDm8ssRYC6DBTzf1guq90re7kmXqs76o2zGOPc5WUiM4\n\tTodH3HwySzOMRCjMC+r7KMTC7T3cpdxMyeCT+kww=","Message-ID":"<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com>","Date":"Wed, 28 Jan 2026 16:00:31 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>\n\t<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>\n\t<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<lMwZOWScsi6STgM8njF2Fgap1D6zmF0t4KbCB-PHj2dGBamRf1kBCQgbBezjko3bp5xHt1zCVJOh3g8q51IiVQ==@protonmail.internalid>\n\t<176961199701.3376561.15835792546502047968@ping.linuxembedded.co.uk>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","Cc":"libcamera-devel@lists.libcamera.org,\n\tRobert Mader <robert.mader@collabora.com>","In-Reply-To":"<176961199701.3376561.15835792546502047968@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":38003,"web_url":"https://patchwork.libcamera.org/comment/38003/","msgid":"<176961375041.3376561.14109450923447358309@ping.linuxembedded.co.uk>","date":"2026-01-28T15:22:30","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2026-01-28 15:00:31)\n> 2026. 01. 28. 15:53 keltezéssel, Kieran Bingham írta:\n> > Quoting Milan Zamazal (2026-01-28 14:48:42)\n> >> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n> >>\n> >>> Quoting Milan Zamazal (2026-01-28 11:43:57)\n> >>>> Now, when we have a combined matrix, we can apply AWB gains to it\n> >>>> directly in awb.cpp.\n> >>>\n> >>>>\n> >>>> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n> >>>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >>>> ---\n> >>>>   src/ipa/simple/algorithms/awb.cpp | 5 +++++\n> >>>>   src/ipa/simple/algorithms/lut.cpp | 5 +----\n> >>>>   2 files changed, 6 insertions(+), 4 deletions(-)\n> >>>>\n> >>>> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n> >>>> index 18d97f707..31726658a 100644\n> >>>> --- a/src/ipa/simple/algorithms/awb.cpp\n> >>>> +++ b/src/ipa/simple/algorithms/awb.cpp\n> >>>> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n> >>>>                    [[maybe_unused]] DebayerParams *params)\n> >>>>   {\n> >>>>          auto &gains = context.activeState.awb.gains;\n> >>>> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> >>>> +                                            0, gains.g(), 0,\n> >>>> +                                            0, 0, gains.b() } };\n> >>>> +       context.activeState.combinedMatrix =\n> >>>> +               context.activeState.combinedMatrix * gainMatrix;\n> >>>\n> >>> I'm all for moving this out of lut.cpp - so :\n> >>>\n> >>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >>>\n> >>> But ordering matters here - so I think there's a likely hood we'll have\n> >>> to move the final combination out to the upper layer and leave the\n> >>> algorithms to just work out their parameters.\n> >>\n> >> Do you mean it's permitted to change the predefined order of the\n> >> algorithms?  Why would one need to do so?\n> > \n> > I mean at the moment it's *not* well defined, and therefore this could\n> > could break.\n> > \n> > I.e. if someone were to put in the tuning file:\n> > \n> >   - Gamma\n> >   - Awb\n> > \n> > it would be a different processing order than\n> > \n> >   - Awb\n> >   - Gamma\n> > \n> > And that could impact multiplications into the combinedMatrix.\n> \n> I think eventually this \"footgun\" should be removed and each algorithm should be\n> able to specify forward/backward dependencies and the list should be sorted\n> accordingly when loading the configuration.\n> \n> \n\nAbsolutely - that's why I haven't blocked this patch here - (this series\nis now merged).\n\nIt's something we need to tackle on top.\n\n\n> \n> > \n> >>\n> >>>>          /* Just report, the gains are applied in LUT algorithm. */\n> >>>>          frameContext.gains.red = gains.r();\n> >>>>          frameContext.gains.blue = gains.b();\n> >>>> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> >>>> index 9740f8c8d..d8e92c613 100644\n> >>>> --- a/src/ipa/simple/algorithms/lut.cpp\n> >>>> +++ b/src/ipa/simple/algorithms/lut.cpp\n> >>>> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n> >>>>                          params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n> >>>>                  }\n> >>>>          } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n> >>>> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> >>>> -                                                    0, gains.g(), 0,\n> >>>> -                                                    0, 0, gains.b() } };\n> >>>> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n> >>>> +               auto &matrix = context.activeState.combinedMatrix;\n> >>>>                  auto &red = params->redCcm;\n> >>>>                  auto &green = params->greenCcm;\n> >>>>                  auto &blue = params->blueCcm;\n> >>>> --\n> >>>> 2.52.0\n> >>>>\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 9EE76C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 15:22:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BBC6B61FD0;\n\tWed, 28 Jan 2026 16:22:34 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4D68361FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 16:22:33 +0100 (CET)","from monstersaurus.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 1F4E6581;\n\tWed, 28 Jan 2026 16:21:56 +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=\"RPnY9NRb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769613716;\n\tbh=psXFZp4+zxujE7DcZEdYsW3K5wvAb8wQnlZo2OquFhY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=RPnY9NRbil8O0FUV6x2pGKAKJZfthH7FRd8RyeXzFTY5PDVNtTl4TUMqXgiYVRciO\n\twVS+vHSlri0BhHphgYegPi9TjqEPyQd1sbIaoQ5uSL3/cxu9ExexmGq4m0cwve6qPf\n\tShtmFeI0CHIUnWfpfhLtOxtxmUzld9E1hufKUx70=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com>","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>\n\t<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>\n\t<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<lMwZOWScsi6STgM8njF2Fgap1D6zmF0t4KbCB-PHj2dGBamRf1kBCQgbBezjko3bp5xHt1zCVJOh3g8q51IiVQ==@protonmail.internalid>\n\t<176961199701.3376561.15835792546502047968@ping.linuxembedded.co.uk>\n\t<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com>","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tRobert Mader <robert.mader@collabora.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","Date":"Wed, 28 Jan 2026 15:22:30 +0000","Message-ID":"<176961375041.3376561.14109450923447358309@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":38009,"web_url":"https://patchwork.libcamera.org/comment/38009/","msgid":"<855x8lbso1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-28T16:36:46","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> 2026. 01. 28. 15:53 keltezéssel, Kieran Bingham írta:\n>> Quoting Milan Zamazal (2026-01-28 14:48:42)\n>>> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n>\n>>>\n>>>> Quoting Milan Zamazal (2026-01-28 11:43:57)\n>>>>> Now, when we have a combined matrix, we can apply AWB gains to it\n>>>>> directly in awb.cpp.\n>>>>\n>>>>>\n>>>>> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n>>>>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>>>>> ---\n>>>>>   src/ipa/simple/algorithms/awb.cpp | 5 +++++\n>>>>>   src/ipa/simple/algorithms/lut.cpp | 5 +----\n>>>>>   2 files changed, 6 insertions(+), 4 deletions(-)\n>>>>>\n>>>>> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n>>>>> index 18d97f707..31726658a 100644\n>>>>> --- a/src/ipa/simple/algorithms/awb.cpp\n>>>>> +++ b/src/ipa/simple/algorithms/awb.cpp\n>>>>> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n>>>>>                    [[maybe_unused]] DebayerParams *params)\n>>>>>   {\n>>>>>          auto &gains = context.activeState.awb.gains;\n>>>>> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n>>>>> +                                            0, gains.g(), 0,\n>>>>> +                                            0, 0, gains.b() } };\n>>>>> +       context.activeState.combinedMatrix =\n>>>>> +               context.activeState.combinedMatrix * gainMatrix;\n>>>>\n>>>> I'm all for moving this out of lut.cpp - so :\n>>>>\n>>>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>>\n>>>> But ordering matters here - so I think there's a likely hood we'll have\n>>>> to move the final combination out to the upper layer and leave the\n>>>> algorithms to just work out their parameters.\n>>>\n>>> Do you mean it's permitted to change the predefined order of the\n>>> algorithms?  Why would one need to do so?\n>> I mean at the moment it's *not* well defined, and therefore this could\n>> could break.\n>> I.e. if someone were to put in the tuning file:\n>>   - Gamma\n>>   - Awb\n>> it would be a different processing order than\n>>   - Awb\n>>   - Gamma\n>> And that could impact multiplications into the combinedMatrix.\n>\n> I think eventually this \"footgun\" should be removed and each algorithm should be\n> able to specify forward/backward dependencies and the list should be sorted\n> accordingly when loading the configuration.\n\nIndeed, it's at least impractical to make the algorithms fully\nindependent.  Another example is that CCM depends on temperature, which\nis determined by AWB.\n\nIs there any use case for the user / tuning file to change the order of\nthe algorithms?  Or are we only talking about mistakes or is it just\nthat all what's not forbidden is permitted?  If the latter, could we\nsimply define the order of the algorithms somewhere in the code?\n\n>> \n>>>\n>>>>>          /* Just report, the gains are applied in LUT algorithm. */\n>>>>>          frameContext.gains.red = gains.r();\n>>>>>          frameContext.gains.blue = gains.b();\n>>>>> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n>>>>> index 9740f8c8d..d8e92c613 100644\n>>>>> --- a/src/ipa/simple/algorithms/lut.cpp\n>>>>> +++ b/src/ipa/simple/algorithms/lut.cpp\n>>>>> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n>>>>>                          params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n>>>>>                  }\n>>>>>          } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n>>>>> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n>>>>> -                                                    0, gains.g(), 0,\n>>>>> -                                                    0, 0, gains.b() } };\n>>>>> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n>>>>> +               auto &matrix = context.activeState.combinedMatrix;\n>>>>>                  auto &red = params->redCcm;\n>>>>>                  auto &green = params->greenCcm;\n>>>>>                  auto &blue = params->blueCcm;\n>>>>> --\n>>>>> 2.52.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 95E0FC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 16:36:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1B43961FD1;\n\tWed, 28 Jan 2026 17:36:57 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 97D0061FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 17:36:54 +0100 (CET)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-531-EU2B1eJ_NSeO-pNadF99MA-1; Wed, 28 Jan 2026 11:36:49 -0500","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-48071615686so251825e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 08:36:49 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-48066aaf235sm136757745e9.0.2026.01.28.08.36.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 28 Jan 2026 08:36:47 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"ZoXa+5lc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769618213;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=ifjS70LaputRi0aho80v5Eg3t7TZuSh2fMbEhjLmPL4=;\n\tb=ZoXa+5lc1sDK56rN2rAyq4dW/PwgyDZyWqFFBWuD+5NAa7fS0qILDybySuf2eSw7sVVGxq\n\tcGuN7f5aT9krX+C0JsS6wYR0/YxX7N85dfFU3x/pTk+IRViqUJgGs+RSWeqWalYvIQC2Ex\n\ttCyKGF4O7joZh721QWWF19nQo84ob3o=","X-MC-Unique":"EU2B1eJ_NSeO-pNadF99MA-1","X-Mimecast-MFC-AGG-ID":"EU2B1eJ_NSeO-pNadF99MA_1769618208","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769618208; x=1770223008;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ga4O53jXfyrK1ZykVlsCHQEeYfA3P4WYUVllP+EzV3k=;\n\tb=maUQIyusYgvalYmV/JV9H2+f4yZItQpDk0WkU7FIBYJ+S8qZjG9QlT9vOk4BPIErdZ\n\tb8dw7PK6bDgQbgCIiwvwBmkpvuSEdCxdgKU4g/W1L2DmEBQ4ncrCHi/Mm85W2f1Yo13F\n\t++z1UQBOGxyKHKoN1Exe9DRhedVbZeviOSKF6nQ7T/xJeOr5EmCG+MgrmEwbjKNnTza0\n\tcsS5DT+qr2wLQpbFDKvFerRprgb6gVB8oxOhVfNeD8qhWwCC5gdFOzQOUMuELPybhGjn\n\ttvHAkdHDZsNFoDaWR7f5itNiKFRCqeIo+yO0/lH9mKMzxr/Kz1ph42UEPEoBsxs/XSSV\n\tpO9A==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCUOmrm6SPOMl/jL6fWxgboangKsp1+TyP67DSYVXW8zW52zzVpb9xQXj3YqLuMFeDqjnVpvOSDnQulufwkqXKs=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Yzmwq0ZflP3+zCqWEosWhxi3P1e2srgvepXWJrhx0TkGmcbNUm4\n\tW4bxolYVscE1dTPvkC07C+/Yq1PV4QgDABPX0dLTsA2B7B89ErQEDo5EIDoUwtW7lcrnx53QU0y\n\tiGzRmLRkagbjId/Fkc2L5+93jlc5vmHePBhkruC29Ls/v8g+db62g/FG/rOjDLMiRYYluzjO1Yu\n\t0=","X-Gm-Gg":"AZuq6aKziXmYd1xfEmIXhYGVzVOpNvLWZNoV87eUQuE33sZRnrqRyDlXowGPYI15Jfl\n\txmlpeffP+UTPS5iFSMPgcPBlfpQsJ6OmRng/yudzULbbPbbzP7xfmgqZKbtjrMey0OljDFKjC6y\n\tSZJZ/fUdF60MIhQcLLYkJ6uSQ/zR8yEKYCz57j4lOH/IXKwJn93pg876v+e81jDqp56Yhj7RoUA\n\tjLRtpXli7LnkDPNQwIsbSk6aFzVT0HDriHDyFRStp9Deni6rRGf7CWbuxLqzkV/mUdV/AQB6UIK\n\tljKZRUcJfmF8rUXcwVdxFLnZ6VgMfmnTB2K3hYaxwqQCUlLO97sNCeXZNO3exukcxoh88BCb2iz\n\ts6JGVHPe1RuhiAn+H+JedDXRV/3/XvFoVWB82Cj7Tqk3b2d7/hqrjXxxO764hA+0=","X-Received":["by 2002:a05:600c:3acd:b0:480:690e:f14a with SMTP id\n\t5b1f17b1804b1-48069c32249mr70343275e9.14.1769618208396; \n\tWed, 28 Jan 2026 08:36:48 -0800 (PST)","by 2002:a05:600c:3acd:b0:480:690e:f14a with SMTP id\n\t5b1f17b1804b1-48069c32249mr70343035e9.14.1769618207985; \n\tWed, 28 Jan 2026 08:36:47 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org,  Robert Mader\n\t<robert.mader@collabora.com>","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","In-Reply-To":"<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Wed,\n\t28 Jan 2026  16:00:31 +0100\")","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>\n\t<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>\n\t<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<lMwZOWScsi6STgM8njF2Fgap1D6zmF0t4KbCB-PHj2dGBamRf1kBCQgbBezjko3bp5xHt1zCVJOh3g8q51IiVQ==@protonmail.internalid>\n\t<176961199701.3376561.15835792546502047968@ping.linuxembedded.co.uk>\n\t<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com>","Date":"Wed, 28 Jan 2026 17:36:46 +0100","Message-ID":"<855x8lbso1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"cUnksjSlRN2s9QiGNa1bnz_5sNo8K-heMdUMBX3yU9w_1769618208","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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":38016,"web_url":"https://patchwork.libcamera.org/comment/38016/","msgid":"<176969744838.4065899.288736634351284953@ping.linuxembedded.co.uk>","date":"2026-01-29T14:37:28","subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2026-01-28 16:36:46)\n> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n> \n> > 2026. 01. 28. 15:53 keltezéssel, Kieran Bingham írta:\n> >> Quoting Milan Zamazal (2026-01-28 14:48:42)\n> >>> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n> >\n> >>>\n> >>>> Quoting Milan Zamazal (2026-01-28 11:43:57)\n> >>>>> Now, when we have a combined matrix, we can apply AWB gains to it\n> >>>>> directly in awb.cpp.\n> >>>>\n> >>>>>\n> >>>>> Reviewed-by: Robert Mader <robert.mader@collabora.com>\n> >>>>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >>>>> ---\n> >>>>>   src/ipa/simple/algorithms/awb.cpp | 5 +++++\n> >>>>>   src/ipa/simple/algorithms/lut.cpp | 5 +----\n> >>>>>   2 files changed, 6 insertions(+), 4 deletions(-)\n> >>>>>\n> >>>>> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n> >>>>> index 18d97f707..31726658a 100644\n> >>>>> --- a/src/ipa/simple/algorithms/awb.cpp\n> >>>>> +++ b/src/ipa/simple/algorithms/awb.cpp\n> >>>>> @@ -40,6 +40,11 @@ void Awb::prepare(IPAContext &context,\n> >>>>>                    [[maybe_unused]] DebayerParams *params)\n> >>>>>   {\n> >>>>>          auto &gains = context.activeState.awb.gains;\n> >>>>> +       Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> >>>>> +                                            0, gains.g(), 0,\n> >>>>> +                                            0, 0, gains.b() } };\n> >>>>> +       context.activeState.combinedMatrix =\n> >>>>> +               context.activeState.combinedMatrix * gainMatrix;\n> >>>>\n> >>>> I'm all for moving this out of lut.cpp - so :\n> >>>>\n> >>>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >>>>\n> >>>> But ordering matters here - so I think there's a likely hood we'll have\n> >>>> to move the final combination out to the upper layer and leave the\n> >>>> algorithms to just work out their parameters.\n> >>>\n> >>> Do you mean it's permitted to change the predefined order of the\n> >>> algorithms?  Why would one need to do so?\n> >> I mean at the moment it's *not* well defined, and therefore this could\n> >> could break.\n> >> I.e. if someone were to put in the tuning file:\n> >>   - Gamma\n> >>   - Awb\n> >> it would be a different processing order than\n> >>   - Awb\n> >>   - Gamma\n> >> And that could impact multiplications into the combinedMatrix.\n> >\n> > I think eventually this \"footgun\" should be removed and each algorithm should be\n> > able to specify forward/backward dependencies and the list should be sorted\n> > accordingly when loading the configuration.\n> \n> Indeed, it's at least impractical to make the algorithms fully\n> independent.  Another example is that CCM depends on temperature, which\n> is determined by AWB.\n> \n> Is there any use case for the user / tuning file to change the order of\n> the algorithms?  Or are we only talking about mistakes or is it just\n> that all what's not forbidden is permitted?  If the latter, could we\n> simply define the order of the algorithms somewhere in the code?\n\nNo - users 'shouldn't' change the ordering in the tuning file - but\ncurrently there is no guidance or specification of what is the correct\nordering, so I can absolutley expect mistakes to occur here - hence the\ndiscussion point. (or future action point)\n\n\n> \n> >> \n> >>>\n> >>>>>          /* Just report, the gains are applied in LUT algorithm. */\n> >>>>>          frameContext.gains.red = gains.r();\n> >>>>>          frameContext.gains.blue = gains.b();\n> >>>>> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> >>>>> index 9740f8c8d..d8e92c613 100644\n> >>>>> --- a/src/ipa/simple/algorithms/lut.cpp\n> >>>>> +++ b/src/ipa/simple/algorithms/lut.cpp\n> >>>>> @@ -107,10 +107,7 @@ void Lut::prepare(IPAContext &context,\n> >>>>>                          params->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n> >>>>>                  }\n> >>>>>          } else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n> >>>>> -               Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n> >>>>> -                                                    0, gains.g(), 0,\n> >>>>> -                                                    0, 0, gains.b() } };\n> >>>>> -               auto matrix = context.activeState.combinedMatrix * gainMatrix;\n> >>>>> +               auto &matrix = context.activeState.combinedMatrix;\n> >>>>>                  auto &red = params->redCcm;\n> >>>>>                  auto &green = params->greenCcm;\n> >>>>>                  auto &blue = params->blueCcm;\n> >>>>> --\n> >>>>> 2.52.0\n> >>>>>\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 39AA4C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Jan 2026 14:37:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7AE8D61FC9;\n\tThu, 29 Jan 2026 15:37:33 +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 BBBDE615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Jan 2026 15:37:31 +0100 (CET)","from monstersaurus.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 D4BEC1661;\n\tThu, 29 Jan 2026 15:36:53 +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=\"BCREvzLX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769697413;\n\tbh=UbAKgyCjQMDisl3C6fI017+x9/yuLP4ZblH9Tu+qf0Y=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=BCREvzLXiJKsucd3LxA0na383KOKwcUbP94g165U3EsimOaodWYCNKLHqtKCuGlmh\n\tb5lG0R3CUbm5kKYqM1wlcflUIqKS7VFv+FSqVl0acT7sN24wx3g42iVlF4K5KMev18\n\tIXhQurtQz4g0X9pnCWxQPyFcGPuSLzmOjGn9B+mc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<855x8lbso1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","References":"<20260128114402.31570-1-mzamazal@redhat.com>\n\t<20260128114402.31570-11-mzamazal@redhat.com>\n\t<176960475289.3376561.13374543330548565257@ping.linuxembedded.co.uk>\n\t<85h5s5bxo5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<lMwZOWScsi6STgM8njF2Fgap1D6zmF0t4KbCB-PHj2dGBamRf1kBCQgbBezjko3bp5xHt1zCVJOh3g8q51IiVQ==@protonmail.internalid>\n\t<176961199701.3376561.15835792546502047968@ping.linuxembedded.co.uk>\n\t<7bf2776f-1d88-450f-9776-7722704ebf9f@ideasonboard.com>\n\t<855x8lbso1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Subject":"Re: [PATCH v5 10/15] libcamera: ipa: simple: Apply gain matrix in\n\tawb","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tRobert Mader <robert.mader@collabora.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","Date":"Thu, 29 Jan 2026 14:37:28 +0000","Message-ID":"<176969744838.4065899.288736634351284953@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>"}}]