Patch Detail
Show a patch.
GET /api/patches/24659/?format=api
{ "id": 24659, "url": "https://patchwork.libcamera.org/api/patches/24659/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24659/", "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": "<20251015012251.17508-15-bryan.odonoghue@linaro.org>", "date": "2025-10-15T01:22:26", "name": "[v3,14/39] libcamera: software_isp: Move isStandardBayerOrder to base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0094dda74511475d5cf28efcf4ef636c82c9bfcd", "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/24659/mbox/", "series": [ { "id": 5503, "url": "https://patchwork.libcamera.org/api/series/5503/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5503", "date": "2025-10-15T01:22:12", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5503/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24659/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24659/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 8BBD9C3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 01:23:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 348D56063A;\n\tWed, 15 Oct 2025 03:23:19 +0200 (CEST)", "from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com\n\t[IPv6:2a00:1450:4864:20::62e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 25422605FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Oct 2025 03:23:10 +0200 (CEST)", "by mail-ej1-x62e.google.com with SMTP id\n\ta640c23a62f3a-b3d5088259eso883467566b.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 18:23:10 -0700 (PDT)", "from inspiron14p-linux.nxsw.local (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b5ccd7b202dsm98348466b.82.2025.10.14.18.23.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Oct 2025 18:23:08 -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=\"t6g+Z1Mw\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1760491389; x=1761096189;\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=v0b7JxJB6O3gPrxcbAeOh02oDu6uU929TeOiKkmwuWo=;\n\tb=t6g+Z1MwISnFX/SwiWOghL2LkVpu7B5WHwQoF63rzRngSOT88fgZazSwMexoX8Xe6s\n\tl/dMFy8nRCAubSl5i3nGpycVgPi/T+Mn89ZQZ6Y1ePYr7XRQE2Ltr+Gz+xqoLyI5uq3K\n\tNcYOxIEJfZKd+yPxNay7r4T0HkEFy1sTe/Y4+ocvFKPvMi91M1JQbKD4s5ibsEgD8b7/\n\tFe6/MM/TdqJUFFe172bM2LsTmXcXNYIeLfj8x9obNv1SGX6wwz77VkwzkKK2Yzm1a/an\n\thYhGh/RrfI8QBFS2CrGeWqiFRW5fZN1xyLiWD5mkIlz4QnC+aBbVmIbgzjXwFMTMu3bP\n\tYPig==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1760491389; x=1761096189;\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=v0b7JxJB6O3gPrxcbAeOh02oDu6uU929TeOiKkmwuWo=;\n\tb=C6H72zwultTv0Hazps6OwOBcrdwmEjRUfU4k0GAx/p5kr/IkHJFPiEnEKGNAa3+YxR\n\tI4uwQ743ZQ5xMaRRzAdNs6dstKwNTIfxzXwCpN+cosMh5Xyo+UAOQHTl46txtHC4ttm1\n\tuuV7VRaQ6y/ns4EecBFHOV4rXCSGtldMJreMEoLj5Jrzuq3kfoh3I3V3FSLBYRkBteZT\n\t7Dke2E0mV7J0buYOFznAfDLNOYj9u84FFUov+BRWjxmy0RfJUqmgXMyGrGRLD6Xlh2uR\n\t1aON8Mql0VTv0QfyCQWF9vk+Kn8jsOZoiB+zSjfxzloAYJKByKpO7SpHWHrmwDZoQBDc\n\t7mjA==", "X-Gm-Message-State": "AOJu0YwksJn7NC7Fh0Py6ikN9xWtmyWZdL5wX0JfSKADzlwQh94Q3ZIq\n\tAcRsC92xh8p/JUUAAIiqIMMdyyWAKlqfj/IQgU1m0YivGHdj+qir6L0b2zZ9vgEfj5PKyO1bs4w\n\t1/YI5", "X-Gm-Gg": "ASbGncuf2i/8jQAgrMTBFZHzs8SwsBrS8vg8L+PPfTZPcr+nsAiFvOfztowpn7+UhqJ\n\tGz+Jy7qtyI1NI0UUKE7NQ2TDFSW0Zq9wgGRKeFCf8qNG1JvO7KWENMHY3ROZ7mbWcJPFZL1OiPv\n\t2Iele5f18lCHL6FLg5tXabyd9YDktEjMpQwZcR+BgfHTt68JKAhXvbiFwiC6YkqsL+1sStwDjFd\n\tY5WA4jrPKIWt259VEWOKsPznZtgQHAO8kOrhkprPcsgabdqEb/7CZ5O5muoZu3/1kSmQtAKh6fP\n\t808B3pcxICrb4Tg/FhZJYcmHk8MpDyr8Uxk+k5vsiyH4qGzGQJ6YwozrjQ2K6k2OUjg9yIh23zi\n\tJbuO+6dDCxScABK3GI0HbA2aqVWluLcxCeOnLiJ+5fuSlZ4JIVkZO7MXOenyFMSDCG9APkPsVXD\n\tLCsfqg9j38tdxLsc5ve/BHwxwgbkp8FOV/iq302/yK", "X-Google-Smtp-Source": "AGHT+IEtRU/iWYLtTdyCFbjTNZ0VDQupR+yAGpOi3k5WUtUlqiabZz6RBSIXnJ5KZdMnPFRLT1bf3w==", "X-Received": "by 2002:a17:907:3d89:b0:b3e:f89e:9840 with SMTP id\n\ta640c23a62f3a-b50aa9a1e57mr2836400366b.20.1760491388895; \n\tTue, 14 Oct 2025 18:23:08 -0700 (PDT)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie", "Subject": "[PATCH v3 14/39] libcamera: software_isp: Move isStandardBayerOrder\n\tto base class", "Date": "Wed, 15 Oct 2025 02:22:26 +0100", "Message-ID": "<20251015012251.17508-15-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251015012251.17508-1-bryan.odonoghue@linaro.org>", "References": "<20251015012251.17508-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 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 96737c45..db225ed6 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -229,4 +229,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 98d88fb3..c5eb0d38 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@@ -98,6 +99,7 @@ private:\n protected:\n \tvoid setParams(DebayerParams ¶ms);\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 8f1b4e53..00738c56 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/39" ] }