[{"id":32981,"web_url":"https://patchwork.libcamera.org/comment/32981/","msgid":"<173644167341.2992722.3364387061129545523@ping.linuxembedded.co.uk>","date":"2025-01-09T16:54:33","subject":"Re: [PATCH v3 2/9] libcamera: software_isp: Store color temperature\n\tto metadata","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2024-12-10 15:34:32)\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> ---\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>                   [[maybe_unused]] const uint32_t frame,\n>                   [[maybe_unused]] IPAFrameContext &frameContext,\n>                   const SwIspStats *stats,\n> -                 [[maybe_unused]] ControlList &metadata)\n> +                 ControlList &metadata)\n>  {\n>         const SwIspStats::Histogram &histogram = stats->yHistogram;\n>         const uint8_t blackLevel = context.activeState.blc.level;\n> @@ -63,6 +65,7 @@ void Awb::process(IPAContext &context,\n>         RGB<double> rgbGains{ { 1 / gains.red, 1 / gains.green, 1 / gains.blue } };\n>         uint32_t temperature = estimateCCT(rgbGains);\n>         context.activeState.awb.temperatureK = temperature;\n> +       metadata.set(controls::ColourTemperature, temperature);\n\nAs long as this doesn't break anything - adding it even if it's not yet\nused is fine with me! (and beneficial to get it in)\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>  \n>         LOG(IPASoftAwb, Debug)\n>                 << \"gain R/B: \" << gains.red << \"/\" << gains.blue\n> -- \n> 2.44.2\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 231A6C32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Jan 2025 16:54:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 42B98684E0;\n\tThu,  9 Jan 2025 17:54:38 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E52761880\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Jan 2025 17:54:36 +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 A15EC110F;\n\tThu,  9 Jan 2025 17:53:42 +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=\"v/6HL5jV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1736441622;\n\tbh=MBp96Jk+7jjrhTyHhRGecUumHk1o5Fo5F8kIlFe+zZA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=v/6HL5jV4qy5y34c5p+T7nOqkLl9QtiFPNTStWana1hEljxV3Hrml9+qufFhcO9sl\n\tYeVTTOGcuZJftnY3oX6S3q7xlNv61XnMO0xLSjzBwcgKZq8ahRNcCrH3vLu87Ii55i\n\tSqNnxEIgLULNQ04pWgVb+DyQh3ykmHEwRf8H9jQk=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20241210153440.1007470-3-mzamazal@redhat.com>","References":"<20241210153440.1007470-1-mzamazal@redhat.com>\n\t<20241210153440.1007470-3-mzamazal@redhat.com>","Subject":"Re: [PATCH v3 2/9] libcamera: software_isp: Store color temperature\n\tto metadata","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tRobert Mader <robert.mader@collabora.com>,\n\tHans de Goede <hdegoede@redhat.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Thu, 09 Jan 2025 16:54:33 +0000","Message-ID":"<173644167341.2992722.3364387061129545523@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>"}}]