Show a patch.

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

{
    "id": 25300,
    "url": "https://patchwork.libcamera.org/api/patches/25300/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25300/",
    "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": "<20251202133157.661407-15-bryan.odonoghue@linaro.org>",
    "date": "2025-12-02T13:31:45",
    "name": "[v3,14/22] 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/25300/mbox/",
    "series": [
        {
            "id": 5630,
            "url": "https://patchwork.libcamera.org/api/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/25300/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25300/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 53680C32F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Dec 2025 13:32:29 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B3ECE60D26;\n\tTue,  2 Dec 2025 14:32:28 +0100 (CET)",
            "from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n\t[IPv6:2a00:1450:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C1EC060D13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Dec 2025 14:32:17 +0100 (CET)",
            "by mail-wr1-x42f.google.com with SMTP id\n\tffacd0b85a97d-42e2b90ad22so1250284f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 02 Dec 2025 05:32:17 -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.16\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 02 Dec 2025 05:32:16 -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=\"uO7bcIgp\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764682337; x=1765287137;\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=uO7bcIgp6LhHezZ50HU7cC/WByA2ebaS/BsH3uSBcbjeGV0t+IM9S8KenyTfNj9cbK\n\tVq0rqVKiR7D6cUhZ00PcKrlKvWHtHv0YMOXmEPMURtUtrnfjtXiR07HPEG44mo08O3kV\n\tj9cRA2Zwc6/XuH73YKBnvnCkINLPHzkKi4vuuIPFPf5N1inhl/KqwP53zAE7AUsZi3LE\n\t4Bus27nENlkqeOhjixVE6872Ac1lc/PqvcWPPWwFk3vqLkKkqK6ZhYVfxjHWIw+FG3Cm\n\t78t0MHjSibwTEc8PU23Dqfz+yr+FlifwBusjz3Gull/5jlP5kqWT8K1H6WrANRwWFl7y\n\tb5IQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764682337; x=1765287137;\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=jdKH19PDWRPfF/z5iy6Sj25KToioecU1g55peIRZQNSw1eaVisywIIfbhGAjyYdDzJ\n\tlohMQBZYw9vA1fK4yYBEcX0/kdgcOsGrJKkCid/sJZIee7JivXQVW6WykAdCIThmJK+n\n\taMVlOmaEzq8E7eBe3xReR1N1Cf3aGsFfOl/mo2uRAkjBuD5pqr+HfK6R53t/0z8tRy/N\n\tgFKjdkjCgwiMNWwRlBGM33hUh/HL9bgMJthKGYBQ5QzxZtF6B1DGguyQMlsDndXCzigH\n\tqVrVM0nhobUjIidHZRmYmTRj5jrQREWwWsAepVCJUbOy3HUh2/cvY2RjPupWu6qodzhv\n\tRPHQ==",
        "X-Gm-Message-State": "AOJu0YzBQ/a7scRx1g60na2xwLzkFwYcqWTlJ/RxRAgNDKRm67U3Zm4f\n\t3o91N43UBlJSCPIdE6waB2NkgaTblgVmQZVlUTgY37UOZc61iC0kSRNMFj3myvjxIYWlupWUahd\n\t/oAtQ",
        "X-Gm-Gg": "ASbGncudw0SAm7BIiUEsn1OeoShd18KejfTc/tZuX4LwOXDgt1GVusoefiezaB2WS5/\n\tIE241MWT6VikJ+D9gwWZ8ERi4kCtbt1BV1tmSoObEH2W1Ta1hpZ8oPQ7u3EKMEnHxGcYTEc7S82\n\twPXQ3Sgd6Rlk+I+3Wf23baevgBl+vItIbXSEox4jCBaycMFAZHC6r8Jtcuq1X+mRF0NALeq1CPp\n\tqU+N8R6HNFXi348PGue+hpeF4D8HDymUrHL3P9uaYPdOq/7LMopwT8i6+42C3RW1nNtC+9GeUum\n\tSjmnF5hOBG7AF9DZzhLY+3bZG7mO9DcLvavmnI1lt6uvuga2XFlmqQCGtWkOE/CFHsaSh++5Krw\n\tFWTXYK1XZHPRScZQMNayXRA6DZwUVep4Y4ax5Rc/V3+L2/cgVu+dF5c70mOf1gOH30/oSgGxFHe\n\tR/ZyIR4/VaKgRJ1WIzK6yOHzuG3xPp61pv5yv0yCUqIoE4T/PMEjeBPdXmjT89y1lXtCo=",
        "X-Google-Smtp-Source": "AGHT+IFd1FJe3hoF32cpqoAnMjWpyF0gAjbul2WCqwrm38qMiRA+TWs0k7e/0ZpbrY9sUhrqijelPA==",
        "X-Received": "by 2002:a5d:5d12:0:b0:42b:3062:c647 with SMTP id\n\tffacd0b85a97d-42cc1ceff02mr46248902f8f.21.1764682337038; \n\tTue, 02 Dec 2025 05:32:17 -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 14/22] libcamera: software_isp: Move isStandardBayerOrder\n\tto base class",
        "Date": "Tue,  2 Dec 2025 13:31:45 +0000",
        "Message-ID": "<20251202133157.661407-15-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": "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": [
        "v3",
        "14/22"
    ]
}