{"id":25111,"url":"https://patchwork.libcamera.org/api/patches/25111/?format=json","web_url":"https://patchwork.libcamera.org/patch/25111/","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":"<20251120232019.3590-11-bryan.odonoghue@linaro.org>","date":"2025-11-20T23:20:07","name":"[10/22] libcamera: software_isp: Move Bayer params init from DebayerCpu to Debayer","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"bc98b0414802a4f733a0902cf99234a261030282","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25111/mbox/","series":[{"id":5599,"url":"https://patchwork.libcamera.org/api/series/5599/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5599","date":"2025-11-20T23:19:57","name":"GPUISP precursor series","version":1,"mbox":"https://patchwork.libcamera.org/series/5599/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25111/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25111/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 675A5C3333\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 23:20:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1268460AB2;\n\tFri, 21 Nov 2025 00:20:45 +0100 (CET)","from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A6AE60A8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:20:43 +0100 (CET)","by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-47798ded6fcso8877155e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 15:20:43 -0800 (PST)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-477bf3af0ecsm11618415e9.9.2025.11.20.15.20.41\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Nov 2025 15:20:41 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"rxwqmCzz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763680842; x=1764285642;\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=6taQd3w4X1L7oCzH3j3Wpop7VYRFzi9h4x9pwFGHnV8=;\n\tb=rxwqmCzztppcewPysY5p7W1ZLgV5HlEVbO0tq+WzYzk8uOTVQouNpaWe5ro8X5rxPc\n\tYuW9SMQUbwC0jYPk8mvJ7KYmi91x3JaC+uKcu4q2MXcVUn2iCBfJcrCRjg4TYnrRD/a6\n\tMH/A0a6/TQN7quQj280iArXejn20UM41+ILjVgOgJ+o9QpWCzC2q3Y8ClicqgFDMvR++\n\tsp2FT92SxggokygjksV88rnKZ4vmVM1mdub5gFr7kmgWf9MM2MDRR6xo0MP8MKjFWhm5\n\tFdeLxA7cOx1MwWZ+CJ6+O3QwSmGJFlm4ffQInQgT/0Bwb62o0jtpUHgiQkP0BU3FD9X0\n\ts5bw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763680842; x=1764285642;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=6taQd3w4X1L7oCzH3j3Wpop7VYRFzi9h4x9pwFGHnV8=;\n\tb=taEzp2YkJ3tEvAZHwzR1HcsMfRXHx9jFsKGfVx7rUSPQsq7cPILNAmpsSlpyEOZFaO\n\tuEaiutk3o2GZuFlJ4xe/C/PANL+fu8KOBF5NKstEC6vjBF7ZyCeMvCUa09pEQGi1raOB\n\t/F8Yulem0CaxrtDD6p27TqHk+/tt3/TJ2GXYfNvIs/ZzBwx74XfaqXlEPVnW7HK5qVq0\n\tbvaDCaeN/NJGbIKKDSygc+OYe+2LflwnPYmQIzOIc9oQLBLFa/O1637lOrOAQsBSKWnm\n\tjUm0XLcReQ4B6p8038D6l0vHANqotpsATEZKZEHDx0FeAMXlu2Ydwxzq3Pa7s2jDgZK4\n\t6Ntw==","X-Gm-Message-State":"AOJu0YyEc5rvnBs4wMvv6EQtftnSUO6JD/NgIu+8OSMs8FAvkyi0LTa+\n\tvF4PVamm/QCXr75/CNW+GONaqoGhqBHqikBLsGWnenNSHBFhUNsgOTUgtKjAAkrI0sFGqXy2+/Q\n\tw+WfxHJM=","X-Gm-Gg":"ASbGncsg42fld5zKRIX3dp4L3W8VSRHC1z7bJNKTdRB/BAtjiN7RQ8LO9hRNayuhYwd\n\tSLpcIPM6c2VotZrUJTjKhC36Vh3rf+dDHmJq9GXLPBsgkuU10NlK9HVMRAHotwfpiedehD7hAYY\n\t74QDxt4jfO/oyb8AuILK9WypgoubUPS5crbRWn6o+nDeNXXUcC28NMcMRgBr/qIIBNKKMAer9nW\n\tXQawelLcTxdAyGmN14YEoKlqSjN9BlSYrBdH+DEXvK0sFo4nDwXaKfDy3MY5Np/pbFeBDW26mWa\n\t309zHQttpTuGtD7f2YSg7JiFENkW+wVwxki4Wzvd5bAwC8/nZa3qFuuN8wZHXjD+NFSEOQmJ4p7\n\tc2fB2DWdJ0zVspMeTsfDZIpA1PD+LZN+PVIVgzKcFpN+EvmhR/NNmRf8nbOPc45A9Mpgf/0Gumy\n\tqCPrgyVuEc4vK7clihraotCLOFk7EhqIbAloG/L3iiBTYQThcR/uXktu5oj9LmRUpTFhU=","X-Google-Smtp-Source":"AGHT+IGPVfSINfNlHRtOdH9zwOfPn0hHHkM5fDAP7QiF9spkFXScVpbOrajmrhoafPWNJd4UspJyyA==","X-Received":"by 2002:a05:600c:5249:b0:477:5897:a0c4 with SMTP id\n\t5b1f17b1804b1-477c10c858bmr541755e9.4.1763680842624; \n\tThu, 20 Nov 2025 15:20:42 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"[PATCH 10/22] libcamera: software_isp: Move Bayer params init from\n\tDebayerCpu to Debayer","Date":"Thu, 20 Nov 2025 23:20:07 +0000","Message-ID":"<20251120232019.3590-11-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.51.2","In-Reply-To":"<20251120232019.3590-1-bryan.odonoghue@linaro.org>","References":"<20251120232019.3590-1-bryan.odonoghue@linaro.org>","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":"Move the initialisation of Bayer params and CCM to a new constructor in the\nDebayer class.\n\nEnsure we call the base class constructor from DebayerCpu's constructor in\nthe expected constructor order Debayer then DebayerCpu.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer.cpp     | 11 +++++++++++\n src/libcamera/software_isp/debayer.h       |  2 +-\n src/libcamera/software_isp/debayer_cpu.cpp |  8 --------\n 3 files changed, 12 insertions(+), 9 deletions(-)","diff":"diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex e9130df1e..f267f8c7f 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -109,6 +109,17 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(Debayer)\n \n+Debayer::Debayer(const GlobalConfiguration &configuration) : bench_(configuration)\n+{\n+\t/* Initialize color lookup tables */\n+\tfor (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {\n+\t\tred_[i] = green_[i] = blue_[i] = i;\n+\t\tredCcm_[i] = { static_cast<int16_t>(i), 0, 0 };\n+\t\tgreenCcm_[i] = { 0, static_cast<int16_t>(i), 0 };\n+\t\tblueCcm_[i] = { 0, 0, static_cast<int16_t>(i) };\n+\t}\n+}\n+\n Debayer::~Debayer()\n {\n }\ndiff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex 578535b20..dc0b8e67b 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -33,7 +33,7 @@ LOG_DECLARE_CATEGORY(Debayer)\n class Debayer : public Object\n {\n public:\n-\tDebayer (const GlobalConfiguration &configuration) : bench_(configuration) {};\n+\tDebayer (const GlobalConfiguration &configuration);\n \tvirtual ~Debayer() = 0;\n \n \tvirtual int configure(const StreamConfiguration &inputCfg,\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex e55599f09..8f42d706b 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -57,14 +57,6 @@ DebayerCpu::DebayerCpu(std::unique_ptr<SwStatsCpu> stats, const GlobalConfigurat\n \t */\n \tenableInputMemcpy_ =\n \t\tconfiguration.option<bool>({ \"software_isp\", \"copy_input_buffer\" }).value_or(true);\n-\n-\t/* Initialize color lookup tables */\n-\tfor (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {\n-\t\tred_[i] = green_[i] = blue_[i] = i;\n-\t\tredCcm_[i] = { static_cast<int16_t>(i), 0, 0 };\n-\t\tgreenCcm_[i] = { 0, static_cast<int16_t>(i), 0 };\n-\t\tblueCcm_[i] = { 0, 0, static_cast<int16_t>(i) };\n-\t}\n }\n \n DebayerCpu::~DebayerCpu() = default;\n","prefixes":["10/22"]}