Patch Detail
Show a patch.
GET /api/patches/25410/?format=api
{ "id": 25410, "url": "https://patchwork.libcamera.org/api/patches/25410/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25410/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20251210003139.43606-15-bryan.odonoghue@linaro.org>", "date": "2025-12-10T00:31:31", "name": "[v4,14/20] libcamera: software_isp: Move isStandardBayerOrder to base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "31daacea35b85640ddef34b6968fdd056ff0cd4d", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25410/mbox/", "series": [ { "id": 5644, "url": "https://patchwork.libcamera.org/api/series/5644/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5644", "date": "2025-12-10T00:31:17", "name": "GPUISP precursor series", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5644/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25410/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25410/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 311FBBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:32:36 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D7A3D61461;\n\tWed, 10 Dec 2025 01:32:35 +0100 (CET)", "from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com\n\t[IPv6:2607:f8b0:4864:20::102d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7597961450\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:32:34 +0100 (CET)", "by mail-pj1-x102d.google.com with SMTP id\n\t98e67ed59e1d1-34381ec9197so5394920a91.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:32:34 -0800 (PST)", "from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.30\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:32:32 -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=\"A1zVkhnm\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765326753; x=1765931553;\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=PYxXfqRVTKkcbydoq54khVfP7mMuF5TcbppUiqX56+k=;\n\tb=A1zVkhnmQ2Gr4sOBJPvWyhwR+HwP48pCrocImppfIHqbKWwilXdbtW4cVc7mqOua8R\n\tcQw7toevKdyBQisZsrGX2zXevMZJQT9xdC+0Y/wxu3Eh5lYFm6yF4Z2UgyfdNiwhVXgT\n\tKEd+ZNQq3OcWdBEItqpY/HlYZzvVbEB+lZfx6hVaGuSVRwnEjVbKwcecZnNcvgKbxWEl\n\tNcN4M2wmZhiFVtSNOsBjoKAuKLAvq8PycLflrZF0keNvLXqZ1yPcoRG8JfZlJB02KuI5\n\tWXiAL7RBQYZzaMbHIVhfPJK/9QB/kWhhmN10V0fNfStBS15omRUI4CDQNHKsGY6kIunI\n\t1ozg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765326753; x=1765931553;\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=PYxXfqRVTKkcbydoq54khVfP7mMuF5TcbppUiqX56+k=;\n\tb=wRFNllz6Aue0uPcTTo69G57nS6SYDd4M5ayv6/6OfGEyylrIbEWJHEWkXSt/vOyYg+\n\tlJHjzaocpTnuVQ+EUJdTKTB7303Nvw3l1VuF85HTClXPANvhsx3XTU2zBTQN0uYLwF6q\n\t2Xt1tMAGzm30YEG2f4TOcS9Rc111IorVZ5MxnWXBK5rSQ5ZQxStxm65iK96aNX/Kv50U\n\tUPOeUzfhINsnudR9/MAcEEZFE6gUca0v1ufrhgOtJuu3vPPuZ6In8ZliAUirFONL/dQy\n\tLZCs+PYfTEFXsu+4ZMims5eWP0uFE7qQ9mVzmcJ5+ZFIZSk/B7ScNfab4FQsGzgxgsoq\n\tichA==", "X-Gm-Message-State": "AOJu0YxVPRfc44/aZB7Sh3wjE/drcP4kH2zK7Qr8frH3RaPrjMGAmlEN\n\tNaxGYqy8BXnejuuzpSNpoxMSW2Z1iZ7VOnGu45CdOtkKXk7zG/6LJ1ax4fiUam9ihAwf0GM3l7S\n\t+3bxP", "X-Gm-Gg": "AY/fxX7W8PfdO8ZGZ8cVbePt/YvWxJfeVjXMrQh/F48lMuQazpxOINxB3j/zaS26v8m\n\tYerTXWWopj36gA/nBRZwyyPf3pK9OGeDzsMzAkkZORnl+Qze/QibAlxwTYIi/r34Avm4vIdjVMW\n\twQIbrWZlhKR0vtS8hC7hB3mJy7h9n6kmMgAszlD91GHzujaIJOuF7yofEe7PNiFttJJpEpa6nXP\n\ttSIVFd+GWqMeWVFGSxiOCoUPbO6XX2zzAnGlJxWEPdGAfl2cbdg/FAfys0UyW/L/+i/J1DM3WBE\n\t7VqeOMNbj79zqNzmHrMj7kgxACjsRKyFNqkouNL/lAVx9JTuhl+CPlG2+T7UaqeQZ9zZSsnYxVi\n\tz/bdPvpL5s9NrcoxfkOh4muluT0inaVdsC7uGuy0vL1dpz64WdNSdTLJW9n3YMvO92FufMYAIBT\n\tGdAiGzQw/mGXB2aVZr0PQHgIErIKuJ5Z5d0EvrrgC1+mI4tpbtq9T8NCJSmuhZh16NFh5PNCfZ8\n\t2Q=", "X-Google-Smtp-Source": "AGHT+IF1tFzK5Os+YFOI7Vcab+ZiSBCt58wtaoBjC9UBqh4MX63VyBGBudb9ZEOTtORZwRYELj2rjw==", "X-Received": "by 2002:a17:90b:5823:b0:33f:ebc2:643 with SMTP id\n\t98e67ed59e1d1-34a728a7f64mr514786a91.23.1765326752770; \n\tTue, 09 Dec 2025 16:32:32 -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 v4 14/20] libcamera: software_isp: Move isStandardBayerOrder\n\tto base class", "Date": "Wed, 10 Dec 2025 00:31:31 +0000", "Message-ID": "<20251210003139.43606-15-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251210003139.43606-1-bryan.odonoghue@linaro.org>", "References": "<20251210003139.43606-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": "isStandardBayerOrder is useful to both CPU and GPU debayer logic and\nreusable as-is for both.\n\nMove to shared location in base class.\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 | 10 ++++++++++\n src/libcamera/software_isp/debayer.h | 2 ++\n src/libcamera/software_isp/debayer_cpu.cpp | 6 ------\n 3 files changed, 12 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 158128f30..1d135b278 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -379,4 +379,14 @@ void Debayer::dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *inpu\n \t}\n }\n \n+/**\n+ * \\fn void Debayer::isStandardBayerOrder(BayerFormat::Order order)\n+ * \\brief Common method to validate standard 2x2 Bayer pattern of 2 Green, 1 Blue, 1 Red pixels.\n+ */\n+bool Debayer::isStandardBayerOrder(BayerFormat::Order order)\n+{\n+\treturn order == BayerFormat::BGGR || order == BayerFormat::GBRG ||\n+\t order == BayerFormat::GRBG || order == BayerFormat::RGGB;\n+}\n+\n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex d2893d81b..ff4a92c15 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -20,6 +20,7 @@\n #include <libcamera/geometry.h>\n #include <libcamera/stream.h>\n \n+#include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/dma_buf_allocator.h\"\n #include \"libcamera/internal/global_configuration.h\"\n #include \"libcamera/internal/software_isp/benchmark.h\"\n@@ -88,6 +89,7 @@ private:\n protected:\n \tvoid setParams(DebayerParams ¶ms);\n \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n+\tstatic bool isStandardBayerOrder(BayerFormat::Order order);\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 8f1b4e53d..00738c56b 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -288,12 +288,6 @@ void DebayerCpu::debayer10P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[])\n \t}\n }\n \n-static bool isStandardBayerOrder(BayerFormat::Order order)\n-{\n-\treturn order == BayerFormat::BGGR || order == BayerFormat::GBRG ||\n-\t order == BayerFormat::GRBG || order == BayerFormat::RGGB;\n-}\n-\n /*\n * Setup the Debayer object according to the passed in parameters.\n * Return 0 on success, a negative errno value on failure\n", "prefixes": [ "v4", "14/20" ] }