Patch Detail
Show a patch.
GET /api/1.1/patches/25297/?format=api
{ "id": 25297, "url": "https://patchwork.libcamera.org/api/1.1/patches/25297/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25297/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251202133157.661407-12-bryan.odonoghue@linaro.org>", "date": "2025-12-02T13:31:42", "name": "[v3,11/22] libcamera: software_isp: Move param select code to Debayer base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "44bd0718fe6cad16f30dbbea9a4ea2d753665f5c", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25297/mbox/", "series": [ { "id": 5630, "url": "https://patchwork.libcamera.org/api/1.1/series/5630/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5630", "date": "2025-12-02T13:31:31", "name": "GPUISP precursor series", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5630/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25297/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25297/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 46F76C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 2 Dec 2025 13:32:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A86A560D0B;\n\tTue, 2 Dec 2025 14:32:24 +0100 (CET)", "from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D2DB60C8C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 2 Dec 2025 14:32:14 +0100 (CET)", "by mail-wm1-x32b.google.com with SMTP id\n\t5b1f17b1804b1-477bf34f5f5so36196365e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 02 Dec 2025 05:32:14 -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\tffacd0b85a97d-42e1c5c30c4sm33363322f8f.9.2025.12.02.05.32.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 02 Dec 2025 05:32:13 -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=\"nUtHyror\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764682333; x=1765287133;\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=eHob+j+mTcN+DmZI0Jjd1599ddaYfYHVsPKAaDomjAg=;\n\tb=nUtHyrorpmd84Q2szErt7OY320nqbZNiBtW/AZde0xsypcQqkraSt9DIlASqkbM/EE\n\t4FqiC5gF834thZ3YzmOxshhDQTtW3v7DuVwwiyOmw/kY6u/dK6G+b7WadEdLjoDAHBjE\n\tyjqG+NyRG+BppVqFfmWrXU5Xp8pcBeH8RpEYOiFLmfGlZRKxEu8+iswoLov3+/6TIarJ\n\txXOafuhcZ5jU+q3ol1MzhrIwEO97wIJyI4bJzWLeSmBNBiQq1ErDilX20oMhA9psNtRn\n\tKaYmMzd64C/0ytjfN7zOFGMP/RtvNDsn/P3JFTdEpb83QZpkccdHHmSlmlkBdB284sWS\n\t2q9w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764682333; x=1765287133;\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=eHob+j+mTcN+DmZI0Jjd1599ddaYfYHVsPKAaDomjAg=;\n\tb=tRctv+yywdEbqohHFR+Jn2eSYZCwlLvuSqG4AQWMfSv3mJq/xet8UdO2m+iHDxMa3A\n\t4NEv19A6wxSFLSg98sDtIV5QwCqO1Sv3Pc4KcaqNBVjrzpeCJGwvgUII/X4mKoH+7Mgh\n\t7g8Ee25wihCq7jhOQK/nxb/lrCIBSRLl7S5Hw1MErN33AZ1fG8ksH1B3h92tz7JPkDyc\n\tqhi5fgMbrYy1f1fFpSnP4wQhP975n+tjhxaLieH8kDMpmnUEFULOIF5yIFtdzTOj5Lsb\n\tKfeCeeB4S4QzQl619w1wPg16Xkoa99yBkOxN3Pzwiw63rqukTZQQFDyfbVkLSSr0EjfQ\n\tUdAg==", "X-Gm-Message-State": "AOJu0YwYh0toU6OKWMp9deW/Gy6tu8qeSi88O50uoOt8P9cQgxsHO7l3\n\tWNtOAQqRoyqpDeomkv9Qax07y3zrx48faq2X5dlLBM9ZjNsRvUWbPR7NAn3/mtbZ5JyquUCDZMV\n\tv9T8l", "X-Gm-Gg": "ASbGncsT93nSgbDtuzgnDWEln9cuKycCWe7etUt5b1Go/sUiKKtt0QWMCHQJxIJ5Xwh\n\tvpO8RZhIC9SKorHmrpFPfwd3WueEv3UnFrEyGtqeC5f/0aediCpydlCPbh42k5tmMARlbFlLIDW\n\tCRy0dhY+uLgzfaS1lW9b700Ag42jOoKUqDqhKuUnusbOcfuRQVrfmLiSFUy6XVpLZI0XrCNHizr\n\tT7q4A0C478IG1JgKMvgpVb/B4HVNQs9N1pnUlLDc8107jjC9+1hFibOPR4wsAGQl3yRz3fh1+Za\n\tD0E01zu88/+8EQyh5SvQVGZcCz5td/wRK56Qx2fuPLN145KOnldPnCSFYdyP9DP5zDmxEm3pODz\n\tBYoFr2+alt4HVHuD4KcenQLEkW61hpP8n055cK8INpqiyaQavBtpf806lFnx+K6iTuA9Rftb3ap\n\t3PVK2lbaG0MKuegJTsE8lfzS/xhzmlUZ+U6zB2ggV+EIuaDH10baA11pLXBvWhggMcN54=", "X-Google-Smtp-Source": "AGHT+IH45vLV5fKOXC82R9Mr/pZXwM9s5zTKvOwbbSliygXuCVFBXXrJ7ryiNLaUDevshfUuundZYA==", "X-Received": "by 2002:a5d:5d85:0:b0:429:c851:69ab with SMTP id\n\tffacd0b85a97d-42e0f35a730mr31038773f8f.55.1764682333407; \n\tTue, 02 Dec 2025 05:32:13 -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 v3 11/22] libcamera: software_isp: Move param select code to\n\tDebayer base class", "Date": "Tue, 2 Dec 2025 13:31:42 +0000", "Message-ID": "<20251202133157.661407-12-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251202133157.661407-1-bryan.odonoghue@linaro.org>", "References": "<20251202133157.661407-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 parameter selection code into the Debayer base class in-order to\nfacilitate reuse of the lookup tables in the eGL shaders.\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 | 28 ++++++++++++++++++++++\n src/libcamera/software_isp/debayer.h | 3 +++\n src/libcamera/software_isp/debayer_cpu.cpp | 20 +---------------\n 3 files changed, 32 insertions(+), 19 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 8cadfaadc..cea30af67 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -336,4 +336,32 @@ Debayer::~Debayer()\n * debayer processing.\n */\n \n+/**\n+ * \\fn void Debayer::setParams(DebayerParams ¶ms)\n+ * \\brief Select the bayer params to use for the next frame debayer\n+ * \\param[in] params The parameters to be used in debayering\n+ */\n+void Debayer::setParams(DebayerParams ¶ms)\n+{\n+\tgreen_ = params.green;\n+\tgreenCcm_ = params.greenCcm;\n+\tif (swapRedBlueGains_) {\n+\t\tred_ = params.blue;\n+\t\tblue_ = params.red;\n+\t\tredCcm_ = params.blueCcm;\n+\t\tblueCcm_ = params.redCcm;\n+\t\tfor (unsigned int i = 0; i < 256; i++) {\n+\t\t\tstd::swap(redCcm_[i].r, redCcm_[i].b);\n+\t\t\tstd::swap(greenCcm_[i].r, greenCcm_[i].b);\n+\t\t\tstd::swap(blueCcm_[i].r, blueCcm_[i].b);\n+\t\t}\n+\t} else {\n+\t\tred_ = params.red;\n+\t\tblue_ = params.blue;\n+\t\tredCcm_ = params.redCcm;\n+\t\tblueCcm_ = params.blueCcm;\n+\t}\n+\tgammaLut_ = params.gammaLut;\n+}\n+\n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex f4373ddeb..6903caae8 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -83,6 +83,9 @@ public:\n \n private:\n \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n+\n+protected:\n+\tvoid setParams(DebayerParams ¶ms);\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 8f42d706b..6be5cdbd5 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -758,25 +758,7 @@ void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output\n \tfor (const FrameBuffer::Plane &plane : output->planes())\n \t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write);\n \n-\tgreen_ = params.green;\n-\tgreenCcm_ = params.greenCcm;\n-\tif (swapRedBlueGains_) {\n-\t\tred_ = params.blue;\n-\t\tblue_ = params.red;\n-\t\tredCcm_ = params.blueCcm;\n-\t\tblueCcm_ = params.redCcm;\n-\t\tfor (unsigned int i = 0; i < 256; i++) {\n-\t\t\tstd::swap(redCcm_[i].r, redCcm_[i].b);\n-\t\t\tstd::swap(greenCcm_[i].r, greenCcm_[i].b);\n-\t\t\tstd::swap(blueCcm_[i].r, blueCcm_[i].b);\n-\t\t}\n-\t} else {\n-\t\tred_ = params.red;\n-\t\tblue_ = params.blue;\n-\t\tredCcm_ = params.redCcm;\n-\t\tblueCcm_ = params.blueCcm;\n-\t}\n-\tgammaLut_ = params.gammaLut;\n+\tsetParams(params);\n \n \t/* Copy metadata from the input buffer */\n \tFrameMetadata &metadata = output->_d()->metadata();\n", "prefixes": [ "v3", "11/22" ] }