{"id":22498,"url":"https://patchwork.libcamera.org/api/patches/22498/?format=json","web_url":"https://patchwork.libcamera.org/patch/22498/","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":"<20250109115412.356768-12-stefan.klug@ideasonboard.com>","date":"2025-01-09T11:54:02","name":"[v1,11/11] ipa: rkisp1: awb: Apply gains based on default colour temperature on start","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"771bb19841002387a6e419a847751d47418fdb15","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22498/mbox/","series":[{"id":4938,"url":"https://patchwork.libcamera.org/api/series/4938/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4938","date":"2025-01-09T11:53:51","name":"Add Bayesian AWB algorithm to libipa and rkisp1","version":1,"mbox":"https://patchwork.libcamera.org/series/4938/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22498/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22498/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 789CDC32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Jan 2025 11:55:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1984868541;\n\tThu,  9 Jan 2025 12:55:42 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD31D68549\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Jan 2025 12:55:34 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:93b9:eca8:897d:eae6])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 535676F3;\n\tThu,  9 Jan 2025 12:54:41 +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=\"p8eWFrIh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1736423681;\n\tbh=GhhoTJtyX+AEcCErZ2QM5LTWxhyVrJ4mPx3umBjy400=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=p8eWFrIh/qjxrgIvvkz5ol4wVYuJlhxHlEqi8rIG83xJzMTwDsPoVnR1JhLI6WV+F\n\t6WXW4/t5/4FFq06SDnvQTNgpPCrHhDeJbSs8FXymfJflVG4j2fLtoJDpbu0L/YQamV\n\t6fpEemmKVLK9NqgxBO4DxSeF1XK87vwWLeIDrTSU=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","Subject":"[PATCH v1 11/11] ipa: rkisp1: awb: Apply gains based on default\n\tcolour temperature on start","Date":"Thu,  9 Jan 2025 12:54:02 +0100","Message-ID":"<20250109115412.356768-12-stefan.klug@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20250109115412.356768-1-stefan.klug@ideasonboard.com>","References":"<20250109115412.356768-1-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","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>"},"content":"The colour gains are initialized with a default value of 1. Improve that\nby querying the auto white balance algorithm for the gains for a default\ncolour temperature. This is still not based on measurements, but it is\nstill better than the current implementation. If the algorithm doesn't\nimplement mapping from colour temperature to gains, it will internally\nfallback to 1.0.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/awb.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex 39a2c0589943..1761185b1181 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -125,7 +125,8 @@ int Awb::configure(IPAContext &context,\n \t\t   const IPACameraSensorInfo &configInfo)\n {\n \tcontext.activeState.awb.gains.manual = RGB<double>{ 1.0 };\n-\tcontext.activeState.awb.gains.automatic = RGB<double>{ 1.0 };\n+\tcontext.activeState.awb.gains.automatic =\n+\t\tawbAlgo_->gainsFromColourTemperature(kDefaultColourTemperature);\n \tcontext.activeState.awb.autoEnabled = true;\n \tcontext.activeState.awb.temperatureK = kDefaultColourTemperature;\n \n","prefixes":["v1","11/11"]}