Show a patch.

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

{
    "id": 23228,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23228/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23228/",
    "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": "<20250422215920.4297-16-bryan.odonoghue@linaro.org>",
    "date": "2025-04-22T21:59:08",
    "name": "[15/27] libcamera: software_isp: Move useful items from DebayerCpu to Debayer base class",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": false,
    "hash": "fc35e3f8b5cb3818a93758ea5fd2ba7533020519",
    "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/23228/mbox/",
    "series": [
        {
            "id": 5142,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5142/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5142",
            "date": "2025-04-22T21:58:53",
            "name": "RFC: Add in a eGL based GPUISP in libcamera",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5142/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23228/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23228/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 858E6C3320\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 21:59:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 160B468B47;\n\tTue, 22 Apr 2025 23:59:51 +0200 (CEST)",
            "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C57768B33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 23:59:38 +0200 (CEST)",
            "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-43cfa7e7f54so2379195e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 14:59:38 -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-44092d2eccesm2726615e9.20.2025.04.22.14.59.36\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Apr 2025 14:59:37 -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=\"SCpNfJnB\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1745359177; x=1745963977;\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=wtckwzkmaU4Et0QIN3FBwnzzUA21kmyVM0rQImxpaL0=;\n\tb=SCpNfJnBWtP2mU3tOWim/Vywqy/2lKCpw8M1qDaawLPg7lgxVNMtWL67xhSlG+LjEM\n\tLXSVo9mLfk6EnnSXvX0d+rPCI0PVllicwszBs8Bt1JgO4ZjUPA+A+H+7IEHtObJYDYEU\n\tPFF1spzlMZzi2g6Gyi7jOTVgOEsMoMflQnGBECrV84qem2geK4qnDpj4SqMdQFVXhtxq\n\tclrzTrP2j9lOolWva/WtUkG2QQ44jFMoIR/tzK62QTYQoPgt7Rf4LDJ2HbLweLycEUqq\n\t8iljjNt6zqcuqOv3XfBo7VROPmU1vmJOD5dLuL3xTx+z/aT+868chq/oib36MJLdxLl9\n\tZg2w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1745359177; x=1745963977;\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=wtckwzkmaU4Et0QIN3FBwnzzUA21kmyVM0rQImxpaL0=;\n\tb=jVNIg66yXZ2c+z1D4Qh5kveVaUZApoIeJNNngC8D6G+9okxok3vwaDRZli49CM1mTS\n\taG+d0WC3LgDVcfdLlpBNvOTVWqvlBZud5Lr1HmbBC8iJgzwsX9tIvxKAtOe2YidfrfXT\n\tuCy0+D6O6xnGjEkM9ItsHkRwRMcuGIRmG0GoIyadWzE8MbsqTPAOTrFHeQVEqcnKXuR1\n\tQJbSE8EyvWobpwUopx7w8ieliFqOlYH61wTQU/P9vts7CY03crDALTct0Iicx0YeZtRs\n\t8suaNxTgws1JS4bfgcLFQkE9Ci4UQlkp36O+8WPWMCdJpa4N87ZHdYgQyHb9ZxITqq0v\n\t2+Gg==",
        "X-Gm-Message-State": "AOJu0YwMyBG81DZDwOKhAmndYSGhogRtPiIJEQdjRLU298+WojrscrmZ\n\tWIwX+XXnELtMtyu5UCHhuFHQqMb5ov+s00jR3tKEnjFTsnflW7ZcJk1d5BRYzcEHpv4OpfLtsAv\n\tjo20=",
        "X-Gm-Gg": "ASbGncvxCs3EixTlE2qz4aw7TWzAakeIMchOjqDfjsffkmr0uD3xwImLw+r6zxKxA4J\n\t1rfcnqQu+mf3IVmN1XjYSwLm+cgzGv3UWXzT28MPJTI3I74KoclbA/Wdr83YnN+URoburW2Ifpc\n\tM+/ZJ1H+kSmW6KX1KoPhfFsEfc4huRnnGIvRMZipHLuDCUzPECXalVJvPkO33VPJBnS0uZ10Pve\n\t4Ex7yOoqbC5fzA6U7aRE3vxk5WADE/6ZGwLm4E34nEruO7UkL/goMK1cZ6DEM9S/UKhqv1OPCQc\n\t1cWIjDoeyE7a2196TWANgaJXC9/KPhnC5t5u/OWlgWDmhSntSWKqpZtZenGf7vD2iXiKQYHXw9M\n\tQZaJwzyaiod1rn82MxDay",
        "X-Google-Smtp-Source": "AGHT+IHpQPHt75gmoBCGW5v77VPAJw6TAV63lAOiMPAA+55nk84XlkIFMr03XqR3C63vWF0NXBEXzg==",
        "X-Received": "by 2002:a05:600c:5119:b0:43d:fa5f:7d30 with SMTP id\n\t5b1f17b1804b1-44091fabcd8mr3249645e9.16.1745359177503; \n\tTue, 22 Apr 2025 14:59:37 -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 15/27] libcamera: software_isp: Move useful items from\n\tDebayerCpu to Debayer base class",
        "Date": "Tue, 22 Apr 2025 22:59:08 +0100",
        "Message-ID": "<20250422215920.4297-16-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250422215920.4297-1-bryan.odonoghue@linaro.org>",
        "References": "<20250422215920.4297-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": "The DebayerCpu class has a number of variables, embedded structures and\nmethods which are useful to DebayerGpu implementation.\n\nMove relevant variables and methods to base class.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer.h     | 34 +++++++++++++++++++++++-\n src/libcamera/software_isp/debayer_cpu.h | 34 +-----------------------\n 2 files changed, 34 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex ba033d44..dd26b9d8 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -14,11 +14,13 @@\n #include <stdint.h>\n \n #include <libcamera/base/log.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/signal.h>\n \n #include <libcamera/geometry.h>\n #include <libcamera/stream.h>\n \n+#include \"libcamera/internal/software_isp/benchmark.h\"\n #include \"libcamera/internal/software_isp/debayer_params.h\"\n \n namespace libcamera {\n@@ -27,7 +29,7 @@ class FrameBuffer;\n \n LOG_DECLARE_CATEGORY(Debayer)\n \n-class Debayer\n+class Debayer : public Object\n {\n public:\n \tvirtual ~Debayer() = 0;\n@@ -45,10 +47,40 @@ public:\n \n \tvirtual SizeRange sizes(PixelFormat inputFormat, const Size &inputSize) = 0;\n \n+\tvirtual const SharedFD &getStatsFD() = 0;\n+\n+\tunsigned int frameSize() { return outputConfig_.frameSize; }\n+\n \tSignal<FrameBuffer *> inputBufferReady;\n \tSignal<FrameBuffer *> outputBufferReady;\n \n+\tstruct DebayerInputConfig {\n+\t\tSize patternSize;\n+\t\tunsigned int bpp; /* Memory used per pixel, not precision */\n+\t\tunsigned int stride;\n+\t\tstd::vector<PixelFormat> outputFormats;\n+\t};\n+\n+\tstruct DebayerOutputConfig {\n+\t\tunsigned int bpp; /* Memory used per pixel, not precision */\n+\t\tunsigned int stride;\n+\t\tunsigned int frameSize;\n+\t};\n+\n+\tDebayerInputConfig inputConfig_;\n+\tDebayerOutputConfig outputConfig_;\n+\tDebayerParams::LookupTable red_;\n+\tDebayerParams::LookupTable green_;\n+\tDebayerParams::LookupTable blue_;\n+\tDebayerParams::CcmLookupTable redCcm_;\n+\tDebayerParams::CcmLookupTable greenCcm_;\n+\tDebayerParams::CcmLookupTable blueCcm_;\n+\tDebayerParams::LookupTable gammaLut_;\n+\tbool swapRedBlueGains_;\n+\tBenchmark bench_;\n+\n private:\n+\n \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n };\n \ndiff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\nindex 182607cd..0b4b16e1 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/software_isp/benchmark.h\"\n #include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/software_isp/swstats_cpu.h\"\n \n@@ -25,7 +24,7 @@\n \n namespace libcamera {\n \n-class DebayerCpu : public Debayer, public Object\n+class DebayerCpu : public Debayer\n {\n public:\n \tDebayerCpu(std::unique_ptr<SwStatsCpu> stats);\n@@ -48,13 +47,6 @@ public:\n \t */\n \tconst SharedFD &getStatsFD() { return stats_->getStatsFD(); }\n \n-\t/**\n-\t * \\brief Get the output frame size\n-\t *\n-\t * \\return The output frame size\n-\t */\n-\tunsigned int frameSize() { return outputConfig_.frameSize; }\n-\n private:\n \t/**\n \t * \\brief Called to debayer 1 line of Bayer input data to output format\n@@ -111,19 +103,6 @@ private:\n \ttemplate<bool addAlphaByte, bool ccmEnabled>\n \tvoid debayer10P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[]);\n \n-\tstruct DebayerInputConfig {\n-\t\tSize patternSize;\n-\t\tunsigned int bpp; /* Memory used per pixel, not precision */\n-\t\tunsigned int stride;\n-\t\tstd::vector<PixelFormat> outputFormats;\n-\t};\n-\n-\tstruct DebayerOutputConfig {\n-\t\tunsigned int bpp; /* Memory used per pixel, not precision */\n-\t\tunsigned int stride;\n-\t\tunsigned int frameSize;\n-\t};\n-\n \tint getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n \tint getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n \tint setupStandardBayerOrder(BayerFormat::Order order);\n@@ -139,20 +118,11 @@ private:\n \t/* Max. supported Bayer pattern height is 4, debayering this requires 5 lines */\n \tstatic constexpr unsigned int kMaxLineBuffers = 5;\n \n-\tDebayerParams::LookupTable red_;\n-\tDebayerParams::LookupTable green_;\n-\tDebayerParams::LookupTable blue_;\n-\tDebayerParams::CcmLookupTable redCcm_;\n-\tDebayerParams::CcmLookupTable greenCcm_;\n-\tDebayerParams::CcmLookupTable blueCcm_;\n-\tDebayerParams::LookupTable gammaLut_;\n \tdebayerFn debayer0_;\n \tdebayerFn debayer1_;\n \tdebayerFn debayer2_;\n \tdebayerFn debayer3_;\n \tRectangle window_;\n-\tDebayerInputConfig inputConfig_;\n-\tDebayerOutputConfig outputConfig_;\n \tstd::unique_ptr<SwStatsCpu> stats_;\n \tstd::vector<uint8_t> lineBuffers_[kMaxLineBuffers];\n \tunsigned int lineBufferLength_;\n@@ -160,8 +130,6 @@ private:\n \tunsigned int lineBufferIndex_;\n \tunsigned int xShift_; /* Offset of 0/1 applied to window_.x */\n \tbool enableInputMemcpy_;\n-\tbool swapRedBlueGains_;\n-\tBenchmark bench_;\n };\n \n } /* namespace libcamera */\n",
    "prefixes": [
        "15/27"
    ]
}