[{"id":39100,"web_url":"https://patchwork.libcamera.org/comment/39100/","msgid":"<be3fc36d-7c66-4079-8853-19e80b28ddd7@protonmail.com>","date":"2026-06-16T08:29:38","subject":"Re: [PATCH 02/10] ipu3: awb: Remove CCM settings from Awb algorithm","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"2026. 06. 16. 8:41 keltezéssel, Daniel Scally írta:\n> The IPU3 AWB algorithm currently defines a CCM matrix that is just\n> a no-op. Remove the settings entirely; they need really to go in to\n> a dedicated CCM algorithm.\n> \n> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n> ---\n\nI presume no transformation is done by the hardware after this change?\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/ipa/ipu3/algorithms/awb.cpp | 10 ----------\n>   1 file changed, 10 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644\n> --- a/src/ipa/ipu3/algorithms/awb.cpp\n> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = {\n>   \t.opt_center_sqr = { 419904, 133956 },\n>   };\n> \n> -/* Default color correction matrix defined as an identity matrix */\n> -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = {\n> -\t8191, 0, 0, 0,\n> -\t0, 8191, 0, 0,\n> -\t0, 0, 8191, 0\n> -};\n> -\n>   /**\n>    * \\class Awb\n>    * \\brief A Grey world white balance correction algorithm\n> @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context,\n> \n>   \tLOG(IPU3Awb, Debug) << \"Color temperature estimated: \" << asyncResults_.temperatureK;\n> \n> -\t/* The CCM matrix may change when color temperature will be used */\n> -\tparams->acc_param.ccm = imguCssCcmDefault;\n> \n>   \tparams->use.acc_awb = 1;\n>   \tparams->use.acc_bnr = 1;\n> -\tparams->use.acc_ccm = 1;\n>   }\n> \n>   /* Generate an RGB vector with the average values for each zone */\n> \n> --\n> 2.43.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7ECB7C3261\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Jun 2026 08:29:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 23DCE625A1;\n\tTue, 16 Jun 2026 10:29:43 +0200 (CEST)","from mail-106118.protonmail.ch (mail-106118.protonmail.ch\n\t[79.135.106.118])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CDBBB61754\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2026 10:29:41 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"juD+MAsB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1781598581; x=1781857781;\n\tbh=p9e7by8iWsjRM/1aHvTpPk/RHWQFY12nl25/PalHHAc=;\n\th=Date:To:From:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=juD+MAsBWN7eyNpbERHE1mUpEVgtGgdpyG9zWOMv+ZGJLxQDFvKAxYOVWz5KITc9r\n\t3vLMk+Zg7r/xaheJxp89/h/6ArUb16GU2doQ4Ee0NUjxmacmyX3ro/KdFOp82VWkx1\n\t+kXkQu79/PUoYSEyWNhSjCAtXsSdjZj+xzft4LAv2yZB+PCmvFr/6JyN0vEkVM4THf\n\tJ/nunwRrfoma61uJVifs/9EQ4zS+IRPdTmge4zRc7Tl21OVb8WSa2UANqSyvBEcOy+\n\teAtLcP4p3uyf8kU5h3vXAEngT1ipsa4YshNRtOEfdGBOEZX+yxRDM9oRgv2cYXs4ef\n\tIXzAi0ZWXsI2Q==","Date":"Tue, 16 Jun 2026 08:29:38 +0000","To":"Daniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","From":"=?utf-8?q?P=C5=91cze_Barnab=C3=A1s?= <pobrn@protonmail.com>","Subject":"Re: [PATCH 02/10] ipu3: awb: Remove CCM settings from Awb algorithm","Message-ID":"<be3fc36d-7c66-4079-8853-19e80b28ddd7@protonmail.com>","In-Reply-To":"<20260616-ipu3-libipa-rework-v1-2-d4448b54f1d8@ideasonboard.com>","References":"<20260616-ipu3-libipa-rework-v1-0-d4448b54f1d8@ideasonboard.com>\n\t<20260616-ipu3-libipa-rework-v1-2-d4448b54f1d8@ideasonboard.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"db55981964c11e7f2e6151142ef8c76880121696","MIME-Version":"1.0","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":39102,"web_url":"https://patchwork.libcamera.org/comment/39102/","msgid":"<da33ae30-07a0-40b2-ba2a-552916e860d3@ideasonboard.com>","date":"2026-06-16T08:41:27","subject":"Re: [PATCH 02/10] ipu3: awb: Remove CCM settings from Awb algorithm","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Barnabas\n\nOn 16/06/2026 09:29, Pőcze Barnabás wrote:\n> 2026. 06. 16. 8:41 keltezéssel, Daniel Scally írta:\n>> The IPU3 AWB algorithm currently defines a CCM matrix that is just\n>> a no-op. Remove the settings entirely; they need really to go in to\n>> a dedicated CCM algorithm.\n>>\n>> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n>> ---\n> \n> I presume no transformation is done by the hardware after this change?\n\nHm no actually it will revert to using the driver defined matrix [1], which is not an identity matrix:\n\nconst struct ipu3_uapi_ccm_mat_config imgu_css_ccm_defaults = {\n\t 9775, -2671,  1087, 0,\n\t-1071,  8303,   815, 0,\n\t  -23, -7887, 16103, 0\n};\n\n\n[1] https://elixir.bootlin.com/linux/v7.1/source/drivers/staging/media/ipu3/ipu3-tables.c#L9334\n> \n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> \n>>    src/ipa/ipu3/algorithms/awb.cpp | 10 ----------\n>>    1 file changed, 10 deletions(-)\n>>\n>> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n>> index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644\n>> --- a/src/ipa/ipu3/algorithms/awb.cpp\n>> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n>> @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = {\n>>    \t.opt_center_sqr = { 419904, 133956 },\n>>    };\n>>\n>> -/* Default color correction matrix defined as an identity matrix */\n>> -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = {\n>> -\t8191, 0, 0, 0,\n>> -\t0, 8191, 0, 0,\n>> -\t0, 0, 8191, 0\n>> -};\n>> -\n>>    /**\n>>     * \\class Awb\n>>     * \\brief A Grey world white balance correction algorithm\n>> @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context,\n>>\n>>    \tLOG(IPU3Awb, Debug) << \"Color temperature estimated: \" << asyncResults_.temperatureK;\n>>\n>> -\t/* The CCM matrix may change when color temperature will be used */\n>> -\tparams->acc_param.ccm = imguCssCcmDefault;\n>>\n>>    \tparams->use.acc_awb = 1;\n>>    \tparams->use.acc_bnr = 1;\n>> -\tparams->use.acc_ccm = 1;\n>>    }\n>>\n>>    /* Generate an RGB vector with the average values for each zone */\n>>\n>> --\n>> 2.43.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 7875CBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Jun 2026 08:41:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A24B661754;\n\tTue, 16 Jun 2026 10:41:33 +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 D1C9C61754\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2026 10:41:31 +0200 (CEST)","from [192.168.0.43]\n\t(chfd-03-b2-v4wan-176392-cust229.vm15.cable.virginm.net\n\t[82.19.20.230])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6241946F;\n\tTue, 16 Jun 2026 10:40:58 +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=\"eurnEGht\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781599258;\n\tbh=KGAj2EuoWhdWE6WYDbxI/40917YVY/yxX7H07Ly8fi8=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=eurnEGhtGVr76nZU5Nc6/PH+NrEPzRSguiw/ZlTp5OU4l5Axk8IaoEljjexQoOA5n\n\tyTKb+AxPKd8TJCpgWsBzulNubmoA1eQat41DPPRgl1l1MniNWlej+iasRlJ33TKD7G\n\tHAnEcavuBDGpnsgRL1vecJIKFKkjvAYz3BqZbe0A=","Message-ID":"<da33ae30-07a0-40b2-ba2a-552916e860d3@ideasonboard.com>","Date":"Tue, 16 Jun 2026 09:41:27 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 02/10] ipu3: awb: Remove CCM settings from Awb algorithm","To":"=?utf-8?q?P=C5=91cze_Barnab=C3=A1s?= <pobrn@protonmail.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260616-ipu3-libipa-rework-v1-0-d4448b54f1d8@ideasonboard.com>\n\t<20260616-ipu3-libipa-rework-v1-2-d4448b54f1d8@ideasonboard.com>\n\t<be3fc36d-7c66-4079-8853-19e80b28ddd7@protonmail.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","In-Reply-To":"<be3fc36d-7c66-4079-8853-19e80b28ddd7@protonmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39103,"web_url":"https://patchwork.libcamera.org/comment/39103/","msgid":"<0a8fbe49-485f-416f-8801-8fdb74c08948@ideasonboard.com>","date":"2026-06-16T08:48:12","subject":"Re: [PATCH 02/10] ipu3: awb: Remove CCM settings from Awb algorithm","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 06. 16. 10:41 keltezéssel, Dan Scally írta:\n> Hi Barnabas\n> \n> On 16/06/2026 09:29, Pőcze Barnabás wrote:\n>> 2026. 06. 16. 8:41 keltezéssel, Daniel Scally írta:\n>>> The IPU3 AWB algorithm currently defines a CCM matrix that is just\n>>> a no-op. Remove the settings entirely; they need really to go in to\n>>> a dedicated CCM algorithm.\n>>>\n>>> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n>>> ---\n>>\n>> I presume no transformation is done by the hardware after this change?\n> \n> Hm no actually it will revert to using the driver defined matrix [1], which is not an identity matrix:\n> \n> const struct ipu3_uapi_ccm_mat_config imgu_css_ccm_defaults = {\n>       9775, -2671,  1087, 0,\n>      -1071,  8303,   815, 0,\n>        -23, -7887, 16103, 0\n> };\n> \n\nAhh, I see, I suppose it's fine because later changes will set the CCM matrix.\n\n\n> \n> [1] https://elixir.bootlin.com/linux/v7.1/source/drivers/staging/media/ipu3/ipu3-tables.c#L9334\n>>\n>> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>\n>>\n>>>    src/ipa/ipu3/algorithms/awb.cpp | 10 ----------\n>>>    1 file changed, 10 deletions(-)\n>>>\n>>> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n>>> index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644\n>>> --- a/src/ipa/ipu3/algorithms/awb.cpp\n>>> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n>>> @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = {\n>>>        .opt_center_sqr = { 419904, 133956 },\n>>>    };\n>>>\n>>> -/* Default color correction matrix defined as an identity matrix */\n>>> -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = {\n>>> -    8191, 0, 0, 0,\n>>> -    0, 8191, 0, 0,\n>>> -    0, 0, 8191, 0\n>>> -};\n>>> -\n>>>    /**\n>>>     * \\class Awb\n>>>     * \\brief A Grey world white balance correction algorithm\n>>> @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context,\n>>>\n>>>        LOG(IPU3Awb, Debug) << \"Color temperature estimated: \" << asyncResults_.temperatureK;\n>>>\n>>> -    /* The CCM matrix may change when color temperature will be used */\n>>> -    params->acc_param.ccm = imguCssCcmDefault;\n>>>\n>>>        params->use.acc_awb = 1;\n>>>        params->use.acc_bnr = 1;\n>>> -    params->use.acc_ccm = 1;\n>>>    }\n>>>\n>>>    /* Generate an RGB vector with the average values for each zone */\n>>>\n>>> -- \n>>> 2.43.0\n>>>\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 C256EC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Jun 2026 08:48:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE349625A5;\n\tTue, 16 Jun 2026 10:48: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 2FBA461754\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2026 10:48:15 +0200 (CEST)","from [192.168.33.27] (185.221.142.169.nat.pool.zt.hu\n\t[185.221.142.169])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B2C05D0;\n\tTue, 16 Jun 2026 10:47:41 +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=\"wqAd4nif\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781599661;\n\tbh=Z5g493AbzC7/94+vmcRlXV3QK3/deyR/xPlPVeGQYGo=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=wqAd4nifklkFHBmNbPZ7sUtm3jS3s0CR513H3czCRdRArT9zggeAZEuVUt2YqEk2w\n\tyT4lPy7Hb+nlFY7Nbqda022+hJZoHbUMwLhBw5iMmzFn++xBbuXpbideRfqd0y3JMm\n\tBFgINLiZ+EJ/xEUfZhsIsVmufguK1GBCOX8C6b3A=","Message-ID":"<0a8fbe49-485f-416f-8801-8fdb74c08948@ideasonboard.com>","Date":"Tue, 16 Jun 2026 10:48:12 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 02/10] ipu3: awb: Remove CCM settings from Awb algorithm","To":"Dan Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260616-ipu3-libipa-rework-v1-0-d4448b54f1d8@ideasonboard.com>\n\t<20260616-ipu3-libipa-rework-v1-2-d4448b54f1d8@ideasonboard.com>\n\t<be3fc36d-7c66-4079-8853-19e80b28ddd7@protonmail.com>\n\t<da33ae30-07a0-40b2-ba2a-552916e860d3@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<da33ae30-07a0-40b2-ba2a-552916e860d3@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]