[{"id":33183,"web_url":"https://patchwork.libcamera.org/comment/33183/","msgid":"<20250126225703.GF1133@pendragon.ideasonboard.com>","date":"2025-01-26T22:57:03","subject":"Re: [PATCH v4 2/9] libcamera: software_isp: Store color temperature\n\tto metadata","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Milan,\n\nThank you for the patch.\n\nOn Mon, Jan 13, 2025 at 02:50:59PM +0100, Milan Zamazal wrote:\n> Image color temperature is a piece of information that should be\n> reported in metadata, let's put it there.\n> \n> Metadata is currently not reported in simple pipeline but we should make\n> at least newly added information ready to be reported.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/simple/algorithms/awb.cpp | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n> index f4fe1af6..30af3d31 100644\n> --- a/src/ipa/simple/algorithms/awb.cpp\n> +++ b/src/ipa/simple/algorithms/awb.cpp\n> @@ -12,6 +12,8 @@\n>  \n>  #include <libcamera/base/log.h>\n>  \n> +#include <libcamera/control_ids.h>\n> +\n>  #include \"libipa/colours.h\"\n>  #include \"simple/ipa_context.h\"\n>  \n> @@ -34,7 +36,7 @@ void Awb::process(IPAContext &context,\n>  \t\t  [[maybe_unused]] const uint32_t frame,\n>  \t\t  [[maybe_unused]] IPAFrameContext &frameContext,\n>  \t\t  const SwIspStats *stats,\n> -\t\t  [[maybe_unused]] ControlList &metadata)\n> +\t\t  ControlList &metadata)\n>  {\n>  \tconst SwIspStats::Histogram &histogram = stats->yHistogram;\n>  \tconst uint8_t blackLevel = context.activeState.blc.level;\n> @@ -63,6 +65,7 @@ void Awb::process(IPAContext &context,\n>  \tRGB<double> rgbGains{ { 1 / gains.red, 1 / gains.green, 1 / gains.blue } };\n>  \tuint32_t temperature = estimateCCT(rgbGains);\n>  \tcontext.activeState.awb.temperatureK = temperature;\n> +\tmetadata.set(controls::ColourTemperature, temperature);\n>  \n>  \tLOG(IPASoftAwb, Debug)\n>  \t\t<< \"gain R/B: \" << gains.red << \"/\" << gains.blue","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 CD606BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 26 Jan 2025 22:57:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D36286855D;\n\tSun, 26 Jan 2025 23:57:15 +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 48E8568506\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 26 Jan 2025 23:57:14 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E744410D8;\n\tSun, 26 Jan 2025 23:56:07 +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=\"EAGUBA+v\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1737932168;\n\tbh=dpBAxRo9wol2T+x9ebRtpXaDAPDFxdgXoLayk66m2To=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EAGUBA+vgIgsJ1LS0vBuSWpnl1ItzRM03oU6DvlQNU1b/wV1E3+yFgDcCCcLsKS5i\n\tUp5TDPsffVEL0/RmwRVlVk77MKd1VBmibMSEx/Xa6cfoaRGlW2fr73d+V3hrdyQlua\n\t1bkN0YduPWv1TYzSg3+BxCwWa7Kd+KCpy8BI2090=","Date":"Mon, 27 Jan 2025 00:57:03 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tRobert Mader <robert.mader@collabora.com>,\n\tHans de Goede <hdegoede@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v4 2/9] libcamera: software_isp: Store color temperature\n\tto metadata","Message-ID":"<20250126225703.GF1133@pendragon.ideasonboard.com>","References":"<20250113135108.13924-1-mzamazal@redhat.com>\n\t<20250113135108.13924-3-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250113135108.13924-3-mzamazal@redhat.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>"}}]