Show a patch.

GET /api/1.1/patches/25508/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 25508,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25508/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25508/",
    "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": "<20251211232246.31330-15-bryan.odonoghue@linaro.org>",
    "date": "2025-12-11T23:22:39",
    "name": "[v5,14/20] libcamera: software_isp: Move isStandardBayerOrder to base class",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "31daacea35b85640ddef34b6968fdd056ff0cd4d",
    "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/25508/mbox/",
    "series": [
        {
            "id": 5656,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5656/?format=api",
            "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/25508/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25508/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 EF009C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Dec 2025 23:24:01 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A641661657;\n\tFri, 12 Dec 2025 00:24:01 +0100 (CET)",
            "from mail-pf1-x434.google.com (mail-pf1-x434.google.com\n\t[IPv6:2607:f8b0:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E31BE61657\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 00:23:59 +0100 (CET)",
            "by mail-pf1-x434.google.com with SMTP id\n\td2e1a72fcca58-7bc248dc16aso566414b3a.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Dec 2025 15:23:59 -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.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Dec 2025 15:23:57 -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=\"jlNbcsFC\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765495438; x=1766100238;\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=jlNbcsFCDaUxN3a/LhFrFPrbVCE3hRmDXeORWhSNBX4oUOUL27Xp+cHcnRBZ28nMN/\n\tc61pTBLNJxY+EpjyLLVWQ4ZdA+jH9JBMfDJ8BfkgCT04zfEcqCt5JtkPm5dK2UPUrFof\n\tuYWyy7dZP4dZZKdtg2G8UcXFnLrbexh/Pg3zGv/CxU07NcTLNfChdqnLmipX9359vrAQ\n\t1yi8NeBO09GXVSspaWl/DR+coiHIfA9nPQnujeo0RdFKqmWRFiHh2pBmUtEU9lgatB5r\n\tHnglrIAlKcuF456A2szpWKHhx4008s05mFZfX2vQNt4vaa/i5nlgqwqINOX59AkPBx/U\n\t/RVg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765495438; x=1766100238;\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=NiVOflKxS6L2qlUWle0yQoaODfemQ4jNXmQgRHiU6IYnw6Fa1glzOEAYf9zZL4gcke\n\tkWFyddKvFPpjSbDXpTtEuuMYxD/XsVd3RoF6y2M+UNfs3eKtai1rsyY+InNYkNSJG+Ue\n\tTEMRh3rbYDAc7uxmlmvlUb/q675026vMfqOW6Bca8+grX1vDKCYmQwF+m8u5zOpZx0/D\n\t5oF6jy2kFzxcOhSlKEj7xBoMenaKyH3sFjXR9Qk02rie3eJnxACakO2kshX7TLly7rvM\n\taOSXkwNgp3z1Qt5/IZlunwgXhb0MBRlO5UgNzgeUNqYr5ZKIUCHC9OpYBUbxgSNk7Tat\n\t7fJw==",
        "X-Gm-Message-State": "AOJu0Yy5VRHFXkiwwdL2Z/fkjtcr6CCVVmFSvveaeFN/KxCgkdsGVI35\n\tpWIQUtR+I6YoHiPa461aJDj8zA7preNDfBOMyb4xAaV9aHSDCxO5ZOtar8g/za7CX8bUIlwJ9tv\n\t0WaNd",
        "X-Gm-Gg": "AY/fxX6kvHjvIocnfpJg2Mm8KtmtRVVTDxBlTu9cN9Zi2w+DXyBp3ba7jJ5sbQDaNa+\n\taqGZMNxbVYLeTQHWmCi9EAXy7m+05/E6FEMYsGh/52OuYpOp2RiFjAenXbxrxsaeJGk9wc817vi\n\tOL8z0YZ659+VREhdEAPCAhCa7tI8DOKXWi8bzk6EUXdwkXaWBPrEfCX2Zqf8UJRxkoHI0RCcSLZ\n\tDRBic3vbbNKAth1UCnImPJd2WbKn1Ly0Z4JC9MxaUToOp5u7H+Qm8bnG7PvpOqE4Fawl6xfRYTk\n\twI6kLLzl6zg3rW/vH62gvoN8HHLkWe3LAGJJBk3XCCc/O5UbF6lSqjfP9qlaCJHq/fhy2AyHq52\n\tLZhNWj+sWLLdYbNGeL9ZHDp0ylOZ944+GdBzLOaLtmxZ2qkdgyJJ9cM6nxHl9YxjbtLvsKkphbd\n\tONEhSiLJfwbxE/MfAylGNPK4DI6wxsLLZX8YY779rDy2ig+R5oZofK3Cu7Tb8eyg==",
        "X-Google-Smtp-Source": "AGHT+IHHsg32XA/0J0TloJh3W9EZdtYKmawcrzFppeNyaiJ+XomULhKAyAecM5PHRPsiwBgR5uhwsA==",
        "X-Received": "by 2002:a05:6a00:1d9e:b0:7ba:153f:5a40 with SMTP id\n\td2e1a72fcca58-7f667546c25mr174953b3a.9.1765495438287; \n\tThu, 11 Dec 2025 15:23:58 -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 14/20] libcamera: software_isp: Move isStandardBayerOrder\n\tto base class",
        "Date": "Thu, 11 Dec 2025 23:22:39 +0000",
        "Message-ID": "<20251211232246.31330-15-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": "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 &params);\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": [
        "v5",
        "14/20"
    ]
}