[{"id":30391,"web_url":"https://patchwork.libcamera.org/comment/30391/","msgid":"<00b1d954-18d1-4b69-aadf-244eb21b4905@ideasonboard.com>","date":"2024-07-12T15:26:52","subject":"Re: [PATCH v1 2/5] ipa rkisp1: Remove temperatureK from FrameContext","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Stefan\n\nOn 12/07/2024 15:32, Stefan Klug wrote:\n> The frame context is used to store data used for processing that frame.\n> It is later used to either act as input for other algorithms or to fill\n> the metadata.  For the colour temperature this is not needed, as the\n> meatadata shall not contain the value that was active when the image was\n> processed, but the value that was calculated based on the statistics for\n> that image. This is no functional change.\n>\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n> ---\n>   src/ipa/rkisp1/algorithms/awb.cpp | 7 ++-----\n>   src/ipa/rkisp1/ipa_context.h      | 1 -\n>   2 files changed, 2 insertions(+), 6 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index 1a5d4776970a..18f750207793 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -277,7 +277,6 @@ void Awb::process(IPAContext &context,\n>   \t */\n>   \tif (redMean < kMeanMinThreshold && greenMean < kMeanMinThreshold &&\n>   \t    blueMean < kMeanMinThreshold) {\n> -\t\tframeContext.awb.temperatureK = activeState.awb.temperatureK;\n>   \t\treturn;\n>   \t}\n>   \n> @@ -309,21 +308,19 @@ void Awb::process(IPAContext &context,\n>   \tactiveState.awb.gains.automatic.blue = blueGain;\n>   \tactiveState.awb.gains.automatic.green = 1.0;\n>   \n> -\tframeContext.awb.temperatureK = activeState.awb.temperatureK;\n> -\n>   \tmetadata.set(controls::AwbEnable, frameContext.awb.autoEnabled);\n>   \tmetadata.set(controls::ColourGains, {\n>   \t\t\tstatic_cast<float>(frameContext.awb.gains.red),\n>   \t\t\tstatic_cast<float>(frameContext.awb.gains.blue)\n>   \t\t});\n> -\tmetadata.set(controls::ColourTemperature, frameContext.awb.temperatureK);\n> +\tmetadata.set(controls::ColourTemperature, activeState.awb.temperatureK);\n>   \n>   \tLOG(RkISP1Awb, Debug) << std::showpoint\n>   \t\t<< \"Means [\" << redMean << \", \" << greenMean << \", \" << blueMean\n>   \t\t<< \"], gains [\" << activeState.awb.gains.automatic.red << \", \"\n>   \t\t<< activeState.awb.gains.automatic.green << \", \"\n>   \t\t<< activeState.awb.gains.automatic.blue << \"], temp \"\n> -\t\t<< frameContext.awb.temperatureK << \"K\";\n> +\t\t<< activeState.awb.temperatureK << \"K\";\n>   }\n>   \n>   REGISTER_IPA_ALGORITHM(Awb, \"Awb\")\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 1d0e9030af1c..27a9bf62fc16 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -136,7 +136,6 @@ struct IPAFrameContext : public FrameContext {\n>   \t\t\tdouble blue;\n>   \t\t} gains;\n>   \n> -\t\tunsigned int temperatureK;\n>   \t\tbool autoEnabled;\n>   \t} awb;\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 62189BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Jul 2024 15:27:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF4246336F;\n\tFri, 12 Jul 2024 17:26:58 +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 4756962E17\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jul 2024 17:26:56 +0200 (CEST)","from [192.168.0.43]\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8FC3D735\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jul 2024 17:26:21 +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=\"Ejo+QZ+7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720797981;\n\tbh=1DWDsaHox4Du9EebfAnZ6c4SOwdBcFc6uhVbCnfndTo=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=Ejo+QZ+7GewUK2OklHfrAny7eKUSA9jrnHdmboZzwkTRrRlWU1FY2pRn0R7NS+dFU\n\tcpHZl3wETJmByRQwCU5sAJLWnJHYVzUmV/msey9/YmAhZUbpdkEjKKwOvY2r1rh54A\n\tP8SE3BnFYSIZf/3e1pXH/TNk1bwSUoUryahKp6fs=","Message-ID":"<00b1d954-18d1-4b69-aadf-244eb21b4905@ideasonboard.com>","Date":"Fri, 12 Jul 2024 16:26:52 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1 2/5] ipa rkisp1: Remove temperatureK from FrameContext","To":"libcamera-devel@lists.libcamera.org","References":"<20240712143227.3036702-1-stefan.klug@ideasonboard.com>\n\t<20240712143227.3036702-3-stefan.klug@ideasonboard.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","Autocrypt":"addr=dan.scally@ideasonboard.com; keydata=\n\txsFNBG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"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30406,"web_url":"https://patchwork.libcamera.org/comment/30406/","msgid":"<172100084338.4121597.1485407596823174948@ping.linuxembedded.co.uk>","date":"2024-07-14T23:47:23","subject":"Re: [PATCH v1 2/5] ipa rkisp1: Remove temperatureK from FrameContext","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-07-12 15:32:03)\n> The frame context is used to store data used for processing that frame.\n> It is later used to either act as input for other algorithms or to fill\n> the metadata.  For the colour temperature this is not needed, as the\n> meatadata shall not contain the value that was active when the image was\n> processed, but the value that was calculated based on the statistics for\n> that image. This is no functional change.\n\nDoes any other algo want to know the current colour temperature though?\n\nOh, I see - they would get that from the activestate ... ? which would\nthen always be the most recently calculated \n\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 7 ++-----\n>  src/ipa/rkisp1/ipa_context.h      | 1 -\n>  2 files changed, 2 insertions(+), 6 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index 1a5d4776970a..18f750207793 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -277,7 +277,6 @@ void Awb::process(IPAContext &context,\n>          */\n>         if (redMean < kMeanMinThreshold && greenMean < kMeanMinThreshold &&\n>             blueMean < kMeanMinThreshold) {\n> -               frameContext.awb.temperatureK = activeState.awb.temperatureK;\n>                 return;\n>         }\n\nThe braces then become redundant here if this is a simple return ...\n\nBut other than that..\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>  \n> @@ -309,21 +308,19 @@ void Awb::process(IPAContext &context,\n>         activeState.awb.gains.automatic.blue = blueGain;\n>         activeState.awb.gains.automatic.green = 1.0;\n>  \n> -       frameContext.awb.temperatureK = activeState.awb.temperatureK;\n> -\n>         metadata.set(controls::AwbEnable, frameContext.awb.autoEnabled);\n>         metadata.set(controls::ColourGains, {\n>                         static_cast<float>(frameContext.awb.gains.red),\n>                         static_cast<float>(frameContext.awb.gains.blue)\n>                 });\n> -       metadata.set(controls::ColourTemperature, frameContext.awb.temperatureK);\n> +       metadata.set(controls::ColourTemperature, activeState.awb.temperatureK);\n>  \n>         LOG(RkISP1Awb, Debug) << std::showpoint\n>                 << \"Means [\" << redMean << \", \" << greenMean << \", \" << blueMean\n>                 << \"], gains [\" << activeState.awb.gains.automatic.red << \", \"\n>                 << activeState.awb.gains.automatic.green << \", \"\n>                 << activeState.awb.gains.automatic.blue << \"], temp \"\n> -               << frameContext.awb.temperatureK << \"K\";\n> +               << activeState.awb.temperatureK << \"K\";\n>  }\n>  \n>  REGISTER_IPA_ALGORITHM(Awb, \"Awb\")\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 1d0e9030af1c..27a9bf62fc16 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -136,7 +136,6 @@ struct IPAFrameContext : public FrameContext {\n>                         double blue;\n>                 } gains;\n>  \n> -               unsigned int temperatureK;\n>                 bool autoEnabled;\n>         } awb;\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 A051CBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 14 Jul 2024 23:47:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C200C6336F;\n\tMon, 15 Jul 2024 01:47:27 +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 96F9B63364\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Jul 2024 01:47:26 +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 4D94C496;\n\tMon, 15 Jul 2024 01:46:50 +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=\"I+PoOg4+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1721000810;\n\tbh=wo0I6/GaiGYft0/NIgbqpNZITfI6hIA3w6fIioaEHw0=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=I+PoOg4+F0aMDTRMwwg86qYoRPNFjpDq9zjNsMEqbFCfZ9GZiY5k/gHUvKOTvtTyJ\n\tD3keVHSNNZDyJcjtxL2wwD/Qsk7guxADjW4jxWgJxkehaCNpmS6Iwse5l/72MRxD+J\n\tdLsVw31aQ0bnwWdjld1qWBfTL+y/s2Qx1+PsrQEg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240712143227.3036702-3-stefan.klug@ideasonboard.com>","References":"<20240712143227.3036702-1-stefan.klug@ideasonboard.com>\n\t<20240712143227.3036702-3-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v1 2/5] ipa rkisp1: Remove temperatureK from FrameContext","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, 15 Jul 2024 00:47:23 +0100","Message-ID":"<172100084338.4121597.1485407596823174948@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":30434,"web_url":"https://patchwork.libcamera.org/comment/30434/","msgid":"<ZpoTGdPc_CynK_WW@pyrite.rasen.tech>","date":"2024-07-19T07:17:45","subject":"Re: [PATCH v1 2/5] ipa rkisp1: Remove temperatureK from FrameContext","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Fri, Jul 12, 2024 at 04:32:03PM +0200, Stefan Klug wrote:\n> The frame context is used to store data used for processing that frame.\n> It is later used to either act as input for other algorithms or to fill\n> the metadata.  For the colour temperature this is not needed, as the\n> meatadata shall not contain the value that was active when the image was\n> processed, but the value that was calculated based on the statistics for\n> that image. This is no functional change.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 7 ++-----\n>  src/ipa/rkisp1/ipa_context.h      | 1 -\n>  2 files changed, 2 insertions(+), 6 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index 1a5d4776970a..18f750207793 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -277,7 +277,6 @@ void Awb::process(IPAContext &context,\n>  \t */\n>  \tif (redMean < kMeanMinThreshold && greenMean < kMeanMinThreshold &&\n>  \t    blueMean < kMeanMinThreshold) {\n> -\t\tframeContext.awb.temperatureK = activeState.awb.temperatureK;\n>  \t\treturn;\n>  \t}\n>  \n> @@ -309,21 +308,19 @@ void Awb::process(IPAContext &context,\n>  \tactiveState.awb.gains.automatic.blue = blueGain;\n>  \tactiveState.awb.gains.automatic.green = 1.0;\n>  \n> -\tframeContext.awb.temperatureK = activeState.awb.temperatureK;\n> -\n>  \tmetadata.set(controls::AwbEnable, frameContext.awb.autoEnabled);\n>  \tmetadata.set(controls::ColourGains, {\n>  \t\t\tstatic_cast<float>(frameContext.awb.gains.red),\n>  \t\t\tstatic_cast<float>(frameContext.awb.gains.blue)\n>  \t\t});\n> -\tmetadata.set(controls::ColourTemperature, frameContext.awb.temperatureK);\n> +\tmetadata.set(controls::ColourTemperature, activeState.awb.temperatureK);\n>  \n>  \tLOG(RkISP1Awb, Debug) << std::showpoint\n>  \t\t<< \"Means [\" << redMean << \", \" << greenMean << \", \" << blueMean\n>  \t\t<< \"], gains [\" << activeState.awb.gains.automatic.red << \", \"\n>  \t\t<< activeState.awb.gains.automatic.green << \", \"\n>  \t\t<< activeState.awb.gains.automatic.blue << \"], temp \"\n> -\t\t<< frameContext.awb.temperatureK << \"K\";\n> +\t\t<< activeState.awb.temperatureK << \"K\";\n>  }\n>  \n>  REGISTER_IPA_ALGORITHM(Awb, \"Awb\")\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 1d0e9030af1c..27a9bf62fc16 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -136,7 +136,6 @@ struct IPAFrameContext : public FrameContext {\n>  \t\t\tdouble blue;\n>  \t\t} gains;\n>  \n> -\t\tunsigned int temperatureK;\n>  \t\tbool autoEnabled;\n>  \t} awb;\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 99111C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Jul 2024 07:17:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 22A9963372;\n\tFri, 19 Jul 2024 09:17:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 64082619A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Jul 2024 09:17:52 +0200 (CEST)","from pyrite.rasen.tech (h175-177-049-024.catv02.itscom.jp\n\t[175.177.49.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5D31F471;\n\tFri, 19 Jul 2024 09:17:12 +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=\"uAJfEu2Q\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1721373433;\n\tbh=udcaTkYJW8wiFBQR5PcpBz8z4IYK+gc+Pj2pL5y4Y4E=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=uAJfEu2QHgij3E+nfXPI0MLFlwot6qqzJFUyVQCu9oN397U7SnlZFzEaIahqDyUC8\n\tBOYqpEV6MUBw0z8GVJvKRJxzTDDYO1NHvpRTSiZi1gYLOtV12D+Gig4Ap9eu6wYUyA\n\to3SSaUb+iQ2bUBiSSxvzHXkvbeTGAP6oGz9U5ud0=","Date":"Fri, 19 Jul 2024 16:17:45 +0900","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1 2/5] ipa rkisp1: Remove temperatureK from FrameContext","Message-ID":"<ZpoTGdPc_CynK_WW@pyrite.rasen.tech>","References":"<20240712143227.3036702-1-stefan.klug@ideasonboard.com>\n\t<20240712143227.3036702-3-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240712143227.3036702-3-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>"}}]