Show a patch.

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

{
    "id": 23517,
    "url": "https://patchwork.libcamera.org/api/patches/23517/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23517/",
    "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": "<20250611013245.133785-12-bryan.odonoghue@linaro.org>",
    "date": "2025-06-11T01:32:21",
    "name": "[11/35] libcamera: software_isp: Move isStandardBayerOrder to base class",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5b8a0e395021cb9159808fce2b546aa4b99bf0ea",
    "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/23517/mbox/",
    "series": [
        {
            "id": 5212,
            "url": "https://patchwork.libcamera.org/api/series/5212/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5212",
            "date": "2025-06-11T01:32:10",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5212/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23517/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23517/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 40849BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 11 Jun 2025 01:33:36 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C5A9568DD4;\n\tWed, 11 Jun 2025 03:33:35 +0200 (CEST)",
            "from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F08E68DB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 11 Jun 2025 03:33:33 +0200 (CEST)",
            "by mail-wr1-x429.google.com with SMTP id\n\tffacd0b85a97d-3a522224582so3747717f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Jun 2025 18:33:33 -0700 (PDT)",
            "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\t5b1f17b1804b1-4532514138asm5680625e9.3.2025.06.10.18.33.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 10 Jun 2025 18:33:32 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"a2vbkabs\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1749605612; x=1750210412;\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=JjePieBz4pX5XcPOXe5ZT860B9wWo/28zhPisqyyZdY=;\n\tb=a2vbkabs2PZVH9kjsGXB3Zy5KqSHDLHMVlYiXGv117ygxQ+RX5FcdJhR/2usRRakAt\n\t8sJ0/7I02tvtOeyFUrxoIgZy8O+8lbr0bv0VE0/tLvPUC5I7Bu05jWkRFOhZZvaHmEG5\n\tYPr6b8A2jj4wgrxrCDTeiqI0nT34KQ4RgQV792rEjTrPYKyngX7Hm0n45wHeoh6VNEwQ\n\tNFoVxyswDgxLVAp591ehGbo0r+dhRNPVyJb+3Q7G66NFRnhE4+frFVJLfmJ34+mB/hPB\n\tY52O+0rCm2L1f6hVQ5dmjDfWYzGYQo6Dldhw5TQwW6VN6CXNHmVITWkWIXtgAU6IYS+v\n\tU+vQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1749605612; x=1750210412;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=JjePieBz4pX5XcPOXe5ZT860B9wWo/28zhPisqyyZdY=;\n\tb=gNIsQsyH/T27M4fUDzZwv0QNJeRDgSw/y9X6MvcyDaXIs+OSdwlPob6nZrJZfNxZVG\n\tQ5p5tn9rqqwrBnVCWiNhJWp5XPWxcieHEn952OXhB+HmJjVKyN+pnxd93+Mx3phuT/1N\n\tFd1kolpTvur5KDkDq+1LaWcf5ucNpo2CtZLSqfqCDLmVt7HRmEAJ9C6fFl2Wuqh0GaAC\n\tEIu6tNFJBLiyubsAN34sNseGjRdZPec6Yf7rGBmgWXhjcYl/gfsk3CmRpaBwRbrv4Uvj\n\t3QhWQPcOXnmhhkvVDaERALISrdkM6s1c6tPZXQrrm7Mr0rj4ndWVZw+a4iscRVPa+nZU\n\tMj1w==",
        "X-Gm-Message-State": "AOJu0YxKL7IUyXr6GZTCuWIiWRWZaEvWXhjs/1eYcIV1HLhGH8sBSgR1\n\tgZFT9Nr453XL0UV2+SUWKxEfd4bokpEAKAuyNuAYoC78BmvjM6CZwn54iOW5m30vH6sICBdUpaC\n\tHF0GtTFw=",
        "X-Gm-Gg": "ASbGncuVSUYK/EMqLVQ/DKssBj1s3uSTYre/uPdNhC+NvYjwpJ4Jiazti4sL3rBAH1v\n\tdwmMenwAv2oTIcILDQHy3OGRPJjd9KSeN+uH31Ido/eZKUhTQdSFcaYxJcqIsHfYi+VkXYxzjHq\n\t9w7yCWh19doI9mqNJyopFXz30D2+FWJu5HsmnhwXvykczfMjk9hkOnGq8fXfPDbQ4Ip3vItrzZ3\n\tp1NipXSTDfd4ZFBZdATkghq+/sfZbcGfl951fCjIs8dMdtfOmyljtJBPz6Li1PHVemixvye4Ld8\n\thz9DxmOY9K16jeNEGH5uoIgvaJMQHfplqiFZ9xwFjQMy8C2hmKjNajOB84nrpx14qpAwY+tFxY0\n\tOj5gBs0AssOcURF1oTsrpN7i+HnYXmCnbXApvwMTU6g==",
        "X-Google-Smtp-Source": "AGHT+IHCga1USqrL90WhvME1stAfaKs8vsA1Lh9cd7Emy1+37z8kfvzdg8QqGVlX5lNe8yeJl5J80Q==",
        "X-Received": "by 2002:a5d:64e4:0:b0:3a5:39a0:2309 with SMTP id\n\tffacd0b85a97d-3a5587ffd85mr812425f8f.55.1749605612500; \n\tTue, 10 Jun 2025 18:33:32 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH 11/35] libcamera: software_isp: Move isStandardBayerOrder to\n\tbase class",
        "Date": "Wed, 11 Jun 2025 02:32:21 +0100",
        "Message-ID": "<20250611013245.133785-12-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250611013245.133785-1-bryan.odonoghue@linaro.org>",
        "References": "<20250611013245.133785-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\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 src/libcamera/software_isp/debayer_cpu.h   |  1 -\n 4 files changed, 12 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 75e4bffa..d0e17d20 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -227,4 +227,14 @@ void Debayer::dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *inpu\n \t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write);\n }\n \n+/**\n+ * \\fn void Debayer::isStandardBayerOrder(BayerFormat::Order order)\n+ * \\brief Common method to validate standard Bayer order\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 0af66b55..214bcdd3 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/software_isp/benchmark.h\"\n #include \"libcamera/internal/software_isp/debayer_params.h\"\n@@ -87,6 +88,7 @@ private:\n protected:\n \tvoid setParams(DebayerParams &params);\n \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n+\tbool 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 4ef573a3..e5649284 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -282,12 +282,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\ndiff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\nindex 0b4b16e1..a043a954 100644\n--- a/src/libcamera/software_isp/debayer_cpu.h\n+++ b/src/libcamera/software_isp/debayer_cpu.h\n@@ -17,7 +17,6 @@\n \n #include <libcamera/base/object.h>\n \n-#include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/software_isp/swstats_cpu.h\"\n \n #include \"debayer.h\"\n",
    "prefixes": [
        "11/35"
    ]
}