{"id":25504,"url":"https://patchwork.libcamera.org/api/patches/25504/?format=json","web_url":"https://patchwork.libcamera.org/patch/25504/","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":"<20251211232246.31330-11-bryan.odonoghue@linaro.org>","date":"2025-12-11T23:22:35","name":"[v5,10/20] libcamera: software_isp: Move Bayer params init from DebayerCpu to Debayer","commit_ref":null,"pull_url":null,"state":"accepted","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/25504/mbox/","series":[{"id":5656,"url":"https://patchwork.libcamera.org/api/series/5656/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5656","date":"2025-12-11T23:22:25","name":"GPUISP precursor series","version":5,"mbox":"https://patchwork.libcamera.org/series/5656/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25504/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25504/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 8A818C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Dec 2025 23:23:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4F86161657;\n\tFri, 12 Dec 2025 00:23:50 +0100 (CET)","from mail-pf1-x436.google.com (mail-pf1-x436.google.com\n\t[IPv6:2607:f8b0:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 24EDB61643\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 00:23:48 +0100 (CET)","by mail-pf1-x436.google.com with SMTP id\n\td2e1a72fcca58-7b89c1ce9easo757377b3a.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Dec 2025 15:23:48 -0800 (PST)","from inspiron14p-linux (M106185144161.v4.enabler.ne.jp.\n\t[106.185.144.161]) by smtp.gmail.com with ESMTPSA id\n\td2e1a72fcca58-7f4c4ab52aasm3399933b3a.38.2025.12.11.15.23.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Dec 2025 15:23:46 -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=\"DuCYtJuk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765495426; x=1766100226;\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=KQPTsn/KLpLpdnxwrT8L2zFzJbbxCaiz8WDvZQ7olVM=;\n\tb=DuCYtJukqfMFLd5Ed2zcN2VEbokvbcgQQN6xotBIU1nVAScVrdwMkJ2JSkt2Y/tQ1I\n\t5GfKtuQNS0j4iHBemntA6h3Z4zaW+k84o40FfwrnVoYFA3Mrl5S913J7hmltT42dm1wU\n\tsm7H55GoTJPYdNXNGQRNQanSKd7OUxWSAPGIFg9dShtqHP1mGWNBezs0xT0zgUC7SpQn\n\tVUrf9pjzAaLgJvsu+2Lc4h9SvISL2LCKmHz1VMV0nE3BgW5gBZDlT+Z/4cFkxsBJ3XG5\n\tK9hBmY7FVDxGQlM3P6As3L7lCOkR1rBIXOYteeuQfvTfL+0rOh4+0xMjXINL+SAN2rDl\n\tNEqg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765495426; x=1766100226;\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=KQPTsn/KLpLpdnxwrT8L2zFzJbbxCaiz8WDvZQ7olVM=;\n\tb=X6NhUrNrGbQt6I5jLPVB2aiJHOlXAvIrYbnZKIo6O9CzOBSD4Swzegl4TwGIirPYAZ\n\tqBdQK2Sp0UYj0Oh0QWuzfhne52/E7qw0ESyIvWdEtsJwmOcv9OsxUgIghVcmn1XB02re\n\tZI4KaAZI3qVtrKdB3CaoxB6jp7sr1/lfzSYfAv7eL4YKFCOvBxLhBcOB5pRwX9m5ZudG\n\tvbPKrDlhLBHc+OauybSwDDMzNu9GHunv8cFVCOxCtPATATM2og5NfJQmMxh0GUvxv8O9\n\tJCiDj1xReFgWmakKhIVIFlPn4pCfCIjYhE2ycI4F4Ueq0ISaRQVzScJ7IeIerunE8e3+\n\t6/TA==","X-Gm-Message-State":"AOJu0YyvP/5jDHdHm6NenVMI05HE5erCBHBDiRjOxkMbEg84EYkcviuM\n\tETjfHVrzEz+nntVhVFDiBHy9KHJ+Vru2Yp0pjUZcRZcOXXksJc+o8YeaAzVp/zI2uPsSh/6ENJl\n\tCynuM","X-Gm-Gg":"AY/fxX4XUznrwB4EdPeFwPCgjEvH/mmuC/ZA2k4lovl4YOHapmK8UE+amLopI15t/DZ\n\tqri+rcqwUZRKoGmwlqb3YDE1R3jPCOFsU7OS6MBPgxVoC0Z6P7BFubC29xi39SoOeTw9WG3CKTT\n\twy2ea9L4bh/vJk9sIE9SAtXPC/r59o+Pi88V+IeZla1aQi50IQfAIqKI+7CSL7kdIb0qhia8z5Q\n\toV+XHEzkV/LR4ahfC0Gs9EWcisKXnGiLBUbFDdfnInI+h+svPMMgZPwCjCT0/M2tEvTfQ0f32PV\n\t1YEjsuCw3PxfLkKkslpHHtpN4X8kOEin35j434Y8UZ4tsp6UHyQIXD9UO5BqJx5DIbkuo93yS9V\n\tby/dsDAjV9o53tienBJvpA6CjCoIv552XHXueLr9ggwDXb/KcIYInJ+V/D8KQhvLRpOyXZzfTmt\n\tFJ3rvnkd1Y6Ryia/wwTiT2ZAvwY1r88A5PmJwjT1bplkBUzoDHZ24/yZU/aSfc3Q==","X-Google-Smtp-Source":"AGHT+IH1C7OmG0P59HYn7vAi4jppeVQSDclMjaJ/6VXFcIK/IEHidBzZUeelguZe4U9Fqd5Zq6i71w==","X-Received":"by 2002:a05:6a00:8c11:b0:7e1:b7ba:d5a2 with SMTP id\n\td2e1a72fcca58-7f664c09e44mr224853b3a.0.1765495426422; \n\tThu, 11 Dec 2025 15:23:46 -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 v5 10/20] libcamera: software_isp: Move Bayer params init\n\tfrom DebayerCpu to Debayer","Date":"Thu, 11 Dec 2025 23:22:35 +0000","Message-ID":"<20251211232246.31330-11-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251211232246.31330-1-bryan.odonoghue@linaro.org>","References":"<20251211232246.31330-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 1e3f08673..8cadfaadc 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 b562985a6..f4373ddeb 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":["v5","10/20"]}