{"id":21423,"url":"https://patchwork.libcamera.org/api/patches/21423/?format=json","web_url":"https://patchwork.libcamera.org/patch/21423/","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":"<20240930084040.2919-2-naush@raspberrypi.com>","date":"2024-09-30T08:40:39","name":"[1/2] ipa: rpi: awb: Add a const for the default colour temperature","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"6b52088d4af34ef97ed2f0000bfef476e1930c0f","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/21423/mbox/","series":[{"id":4638,"url":"https://patchwork.libcamera.org/api/series/4638/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4638","date":"2024-09-30T08:40:38","name":"RPi: AWB bias","version":1,"mbox":"https://patchwork.libcamera.org/series/4638/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21423/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21423/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 43C03C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Sep 2024 08:40:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E8A5363512;\n\tMon, 30 Sep 2024 10:40:33 +0200 (CEST)","from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0FC0D6350F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 10:40:30 +0200 (CEST)","by mail-wm1-x334.google.com with SMTP id\n\t5b1f17b1804b1-42f5a663ed5so3907685e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 01:40:30 -0700 (PDT)","from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-37cd57423afsm8463421f8f.90.2024.09.30.01.40.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Sep 2024 01:40:28 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"FD9GLb5n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727685629; x=1728290429;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=kEQT44ygkQycnvCLuOXQchB36OoSxbxMmuyht28SyVg=;\n\tb=FD9GLb5nsVBRr7kaUT0G1aNQ042Zy7nkU9ENvsrxHJLx8EKtnpfXNMob445wkvAdjx\n\tcKqY5uXlZr8Wpa4WWJ5ob5bGIN4IaTVkndoaSnen9cvttf+l0pkC0WSh7irG9uUOsqss\n\t7BhIxKX1uo4C+b6wqrVOkyYhCZMm0nTs7c02LJKnz0AXA8qt0WS4ry1qep41TwahvhI+\n\tlXdihF89nk8NnwD5jo80g/y/s8Wg6lZ7Qtgmb9uG90RydML0mPT8Nome5Cq67HVKrRlo\n\tELFbrBkA5co+inGF0L7FvZxfcFCN1E289QGsYQgiROcJd11spckNZv+Z2a7aPEN5SW0C\n\tjW9A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727685629; x=1728290429;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=kEQT44ygkQycnvCLuOXQchB36OoSxbxMmuyht28SyVg=;\n\tb=sbgqIxpbYK8f4fhAtKkr6gKKYXBzq8f7xJTYf4ebRw/uuSh8Ikfym2OCxhp98We7fn\n\txXCp0jomrBp85TNL7M6qP49Ua1boMEJ/FMaDE5J0tnnomEsGCpmCdfISeLuh7+73uXg9\n\t+NYE+WW9AfzMHSzFuIaRlbHXCXYBWE0MMAdVBhL+kzyMm39f0om+NPuyWGgdzarlvD0w\n\txMeZKUXwzUoaFkVpQsd3y+DVX75ro3d5OIDu7AkXTu8YesurewSJmbV8dJV6oBP5ZbDf\n\tFm4V67Hs+2HRPNj4wHSYQWARJaLjLi9w7JQLep+MFc6zl17tkbx15D5pU1Y+W7wJmf3q\n\t2Plg==","X-Gm-Message-State":"AOJu0YyBgGQx2Qu4EUnlZitEDqFQb4PI0fVrR3PKhwJgqdmmLzWXpLw4\n\t1mFUvlniV0LvQaGE/YJVnpklNW3usg0eVo0pF5CS912qMdlnH6cURCVjPyqc0l7YrM/+y6oDPtV\n\tD","X-Google-Smtp-Source":"AGHT+IEnBYNATANGzp8zFK2GZ2WzNEwt4OwoT+kryoSpHGvk2mecLpGVbLd3A9A7YPLe0RQWGUWO8Q==","X-Received":"by 2002:a05:600c:3b92:b0:42c:d084:ed69 with SMTP id\n\t5b1f17b1804b1-42f584855f3mr36427615e9.4.1727685629212; \n\tMon, 30 Sep 2024 01:40:29 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>","Subject":"[PATCH 1/2] ipa: rpi: awb: Add a const for the default colour\n\ttemperature","Date":"Mon, 30 Sep 2024 09:40:39 +0100","Message-Id":"<20240930084040.2919-2-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20240930084040.2919-1-naush@raspberrypi.com>","References":"<20240930084040.2919-1-naush@raspberrypi.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":"A default CT of 4500K is used in a couple of places. Add a constexpr\nvalue for the default CT value and use it instead.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/controller/rpi/awb.cpp | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)","diff":"diff --git a/src/ipa/rpi/controller/rpi/awb.cpp b/src/ipa/rpi/controller/rpi/awb.cpp\nindex f45525bce2d1..24f296fc66fa 100644\n--- a/src/ipa/rpi/controller/rpi/awb.cpp\n+++ b/src/ipa/rpi/controller/rpi/awb.cpp\n@@ -20,6 +20,8 @@ using namespace libcamera;\n \n LOG_DEFINE_CATEGORY(RPiAwb)\n \n+constexpr double DefaultCT = 4500.0;\n+\n #define NAME \"rpi.awb\"\n \n /*\n@@ -214,7 +216,7 @@ void Awb::initialise()\n \t\tsyncResults_.gainB = 1.0 / config_.ctB.eval(syncResults_.temperatureK);\n \t} else {\n \t\t/* random values just to stop the world blowing up */\n-\t\tsyncResults_.temperatureK = 4500;\n+\t\tsyncResults_.temperatureK = DefaultCT;\n \t\tsyncResults_.gainR = syncResults_.gainG = syncResults_.gainB = 1.0;\n \t}\n \tprevSyncResults_ = syncResults_;\n@@ -716,7 +718,7 @@ void Awb::awbGrey()\n \t\tsumR += *ri, sumB += *bi;\n \tdouble gainR = sumR.G / (sumR.R + 1),\n \t       gainB = sumB.G / (sumB.B + 1);\n-\tasyncResults_.temperatureK = 4500; /* don't know what it is */\n+\tasyncResults_.temperatureK = DefaultCT; /* don't know what it is */\n \tasyncResults_.gainR = gainR;\n \tasyncResults_.gainG = 1.0;\n \tasyncResults_.gainB = gainB;\n","prefixes":["1/2"]}