{"id":14489,"url":"https://patchwork.libcamera.org/api/patches/14489/?format=json","web_url":"https://patchwork.libcamera.org/patch/14489/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211108131350.130665-20-jeanmichel.hautbois@ideasonboard.com>","date":"2021-11-08T13:13:47","name":"[libcamera-devel,19/22] ipa: ipu3: awb: Add support for color temperature","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"5befc15166403509e097f75ff24bcd6dcae35fb6","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14489/mbox/","series":[{"id":2696,"url":"https://patchwork.libcamera.org/api/series/2696/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2696","date":"2021-11-08T13:13:28","name":"IPA: IPU3: Introduce per-frame controls","version":1,"mbox":"https://patchwork.libcamera.org/series/2696/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14489/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14489/checks/","tags":{},"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 6AF4FC3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Nov 2021 13:14:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C76D60398;\n\tMon,  8 Nov 2021 14:14:20 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 471A36035D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Nov 2021 14:14:03 +0100 (CET)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:c2bb:76d0:68d7:a9a5])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CBEB31A38;\n\tMon,  8 Nov 2021 14:14:02 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cIQYOar3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1636377242;\n\tbh=cbMbwEVNYJgf7LSFwCuIfXkF0PIusRSEgf4QABqntVM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=cIQYOar324kd4z5xCxL0BgLossqQY3d+gf1GlnNd3ty0ouFxfciuEGdw26KI9jHP6\n\t9+Q4S2hyEyStCHBrsYBPk40zR7HRMjgDZKbmsa7mcq5Yr/ZZotOMSvkrtVZpUf8ljF\n\thd6pvfZAv2UwSz5hUnPJvU9cQ0hHldUk0/38N9lI=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon,  8 Nov 2021 14:13:47 +0100","Message-Id":"<20211108131350.130665-20-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20211108131350.130665-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20211108131350.130665-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 19/22] ipa: ipu3: awb: Add support for\n\tcolor temperature","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>"},"content":"The AWB estimates the color temperature, but it is not used at all. It\ncan be useful for debug purpose at least, but also for lux estimation\nlater, to be able to know the temperature estimated for a given frame.\n\nAdd a new member to the IPAFrameContext::awb for this purpose, and\nupdate the value in AWB.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/awb.cpp | 1 +\n src/ipa/ipu3/ipa_context.cpp    | 3 +++\n src/ipa/ipu3/ipa_context.h      | 2 ++\n 3 files changed, 6 insertions(+)","diff":"diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\nindex bd55d377..a3a5ac66 100644\n--- a/src/ipa/ipu3/algorithms/awb.cpp\n+++ b/src/ipa/ipu3/algorithms/awb.cpp\n@@ -385,6 +385,7 @@ void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)\n \tcontext.frameContext->awb.gains.blue = asyncResults_.blueGain;\n \tcontext.frameContext->awb.gains.green = asyncResults_.greenGain;\n \tcontext.frameContext->awb.gains.red = asyncResults_.redGain;\n+\tcontext.frameContext->awb.temperatureK = asyncResults_.temperatureK;\n }\n \n constexpr uint16_t Awb::threshold(float value)\ndiff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp\nindex ea92be77..9c0407df 100644\n--- a/src/ipa/ipu3/ipa_context.cpp\n+++ b/src/ipa/ipu3/ipa_context.cpp\n@@ -117,6 +117,9 @@ namespace libcamera::ipa::ipu3 {\n  *\n  * \\var IPAFrameContext::awb.gains.blue\n  * \\brief White balance gain for B channel\n+ *\n+ * \\var IPAFrameContext::awb.temperatureK\n+ * \\brief Color temperature estimated\n  */\n \n /**\ndiff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\nindex 69780915..3566dea1 100644\n--- a/src/ipa/ipu3/ipa_context.h\n+++ b/src/ipa/ipu3/ipa_context.h\n@@ -45,6 +45,8 @@ struct IPAFrameContext {\n \t\t\tdouble green;\n \t\t\tdouble blue;\n \t\t} gains;\n+\n+\t\tdouble temperatureK;\n \t} awb;\n \n \tstruct {\n","prefixes":["libcamera-devel","19/22"]}