Show a patch.

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

{
    "id": 25670,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25670/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25670/",
    "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": "<20260106170059.56193-18-bryan.odonoghue@linaro.org>",
    "date": "2026-01-06T17:00:52",
    "name": "[v11,17/24] libcamera: software_isp: GPU support for unpacked 10/12-bit formats",
    "commit_ref": "999d446475694f41a692850f47d0798f5429f639",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "342a5d142ff84081d2ab4fdc62997e8de3158641",
    "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/25670/mbox/",
    "series": [
        {
            "id": 5689,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5689/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5689",
            "date": "2026-01-06T17:00:35",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 10,
            "mbox": "https://patchwork.libcamera.org/series/5689/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25670/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25670/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 BE700BDCC0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jan 2026 17:01:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78A9D6200F;\n\tTue,  6 Jan 2026 18:01:27 +0100 (CET)",
            "from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com\n\t[IPv6:2a00:1450:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D3FCF6201B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jan 2026 18:01:24 +0100 (CET)",
            "by mail-wr1-x42d.google.com with SMTP id\n\tffacd0b85a97d-42fbad1fa90so973549f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Jan 2026 09:01:24 -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-432bd0dadcfsm5515322f8f.3.2026.01.06.09.01.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Jan 2026 09:01:23 -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=\"nCa1AS4t\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1767718884; x=1768323684;\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=slR7u71MBKDNK7zqNb3HFSBXdLunmgpP/3QgIZdLnTA=;\n\tb=nCa1AS4thZ0UpoSR8MKAg7Rt5oksluLwgdUkAGfS3tQkkoEe1H43TfwvUOVEmx4p34\n\tCHAgjzvI5tjC09fR5qQDWSXxqydfbYZTK6xYtbzyIe/3ct68ckkrC+0V44JMn942bXD6\n\tpkvKnixRD/T+PD6oVJaVPmu90eIRD9H5Phv5C3lfS72ZjTN+mgSpcy8wPHsJGntrcIeM\n\tCepCro+POvTvNRka5dbm297BVr7daP4cacspUs3np5o4OxiN+SxwTocNGZbo6bNtaY1X\n\t0PQfg7vQX6RqjCaPhSagsGo8/9DgXUKRSbyYy1cgVCjDbDpK1uu0hiAybwDYb6CAksO+\n\ttZkg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1767718884; x=1768323684;\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=slR7u71MBKDNK7zqNb3HFSBXdLunmgpP/3QgIZdLnTA=;\n\tb=stPGog9xOa4FcjtE32pDacD27Q9GTgWVhGMQR0ifi0hY6HfV916g3vKtViDtVyw8fP\n\tLSmSv3Ha3YriSq4MdjoCjuTZVaOoK38jrXWQZIbyGYig4EVHB0uBuVz5oBbC4RjlPqGG\n\tLea2q4FtL2otH8JiUAR0866b19VPOhyxzr21HaL8YMnr33qSzYmrVSQMZ1JgBt0f4SNk\n\tFrgkajNAelgqMfWbf4gWdmmK/lxF1D/usMC3txl/J949EXhBZ3i4QBQUa+9yuJWDYvtv\n\t5LfnziEctEuy0cBa4AglHfX4Yk17fN+Ls4daKktoNTzM0Ul9QEvD7vvfQ7wzR5Xh8q+E\n\t6yDg==",
        "X-Gm-Message-State": "AOJu0YxlIbxqHzx68CU0SfUNkO1VdX+rowVB4iOXahFbIAJiZ4NsKxse\n\t+1ko9Oy/QSmCXCQbt5w5XlPsNtXIts1E6ESt+t4k17QP6WkUDvn+Sip9BRY+NGU2mux0O44iOC5\n\tQ881sOT0=",
        "X-Gm-Gg": "AY/fxX4CDEdYg7OU70KKiWGUeCq2LBZkRTs0oI41yrszxq4UvDkQAiIJUll3joPzmPG\n\t/iRNgfkt5Cw1gA5f9fa57TsiGt73WrUu6vAlnuoTeKdJfhOnbqZQmXUXTtQ/AihE6irHqUlvRqM\n\ti9sY7S//ctQm7g0vJ3rJhThP1TrY69IoAk/AUhd9XWlew/vLayEvsUYKgqk6+/Bs6qUmQlMZbib\n\tMmBVYC4qXBQ4fOL4ITWwma9BoPHShTxtic2IqAAuxU9MvvS9QAVCHIz8PGL6TCGmzwtmJTcysZA\n\tYbQwZPh4AIwxeZRKYqBZ/0jU9oj4TyvXXXkluAq4WaoLrfrs7Yt7eSc+BKiJiGlELVO7/P8/iDi\n\tS9YiHN3R0b3e/Wzxae0hPmzRUqLOMi7YtWdaewf+S1h/ecx1w1yhvD6XGIGw0hXU4K1FUI9b92g\n\tTTCG9Sq1DcIwoxdLYzP5UX8fuqEkMfGQ6/r/unx8cwNbundDDhFpXewqI2pvkorfs8oiA=",
        "X-Google-Smtp-Source": "AGHT+IHmA40Wzv6zC64BVsAxLRt0MQ2ZrZK74G9mazdZPcStGkWEfO1mmZ38Avn7y/Mvz1ew9VKYBg==",
        "X-Received": "by 2002:a05:6000:2082:b0:431:62:d946 with SMTP id\n\tffacd0b85a97d-432bc9d7881mr5089809f8f.23.1767718884039; \n\tTue, 06 Jan 2026 09:01:24 -0800 (PST)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "pavel@ucw.cz, Milan Zamazal <mzamazal@redhat.com>,\n\tHans de Goede <johannes.goede@oss.qualcomm.com>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH v11 17/24] libcamera: software_isp: GPU support for unpacked\n\t10/12-bit formats",
        "Date": "Tue,  6 Jan 2026 17:00:52 +0000",
        "Message-ID": "<20260106170059.56193-18-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260106170059.56193-1-bryan.odonoghue@linaro.org>",
        "References": "<20260106170059.56193-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": "From: Milan Zamazal <mzamazal@redhat.com>\n\nThe GPU processing supports 8-bit sensor formats and 10/12-bit packed\nformats.  Support for 10/12-bit unpacked formats is missing, let's add\nit.\n\n10/12-bit unpacked formats use two adjacent bytes to store the value.\nThis means the 8-bit shaders can be used if we can modify them for\nadditional support of 16-bit addressing.  This requires the following\nmodifications:\n\n- Using GL_RG (two bytes per pixel) instead of GL_LUMINANCE (one byte\n  per pixel) as the texture format for the given input formats.\n\n- Setting the texture width to the number of pixels rather than the\n  number of bytes.\n\n- Making the definition of `fetch' macro variable, according to the\n  pixel format.\n\n- Using only `fetch' for accessing the texture.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/shaders/bayer_unpacked.frag | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/shaders/bayer_unpacked.frag b/src/libcamera/shaders/bayer_unpacked.frag\nindex af4a30c4b..1b85196ae 100644\n--- a/src/libcamera/shaders/bayer_unpacked.frag\n+++ b/src/libcamera/shaders/bayer_unpacked.frag\n@@ -41,9 +41,17 @@ float apply_contrast(float value)\n void main(void) {\n     vec3 rgb;\n \n+    #if defined(RAW10P)\n+    #define pixel(p) p.r / 4.0 + p.g * 64.0\n+    #define fetch(x, y) pixel(texture2D(tex_y, vec2(x, y)))\n+    #elif defined(RAW12P)\n+    #define pixel(p) p.r / 16.0 + p.g * 16.0\n+    #define fetch(x, y) pixel(texture2D(tex_y, vec2(x, y)))\n+    #else\n     #define fetch(x, y) texture2D(tex_y, vec2(x, y)).r\n+    #endif\n \n-    float C = texture2D(tex_y, center.xy).r; // ( 0, 0)\n+    float C = fetch(center.x, center.y); // ( 0, 0)\n     const vec4 kC = vec4( 4.0,  6.0,  5.0,  5.0) / 8.0;\n \n     // Determine which of four types of pixels we are on.\n",
    "prefixes": [
        "v11",
        "17/24"
    ]
}