Show a patch.

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

{
    "id": 25323,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25323/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25323/",
    "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": "<20251202134544.662446-15-bryan.odonoghue@linaro.org>",
    "date": "2025-12-02T13:45:34",
    "name": "[v6,14/24] libcamera: software_isp: GPU support for unpacked 10/12-bit formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/25323/mbox/",
    "series": [
        {
            "id": 5631,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5631/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5631",
            "date": "2025-12-02T13:45:20",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/5631/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25323/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25323/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 B08F7C32F3\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Dec 2025 13:46:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0D3A060D35;\n\tTue,  2 Dec 2025 14:46:20 +0100 (CET)",
            "from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com\n\t[IPv6:2a00:1450:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4796260D38\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Dec 2025 14:46:13 +0100 (CET)",
            "by mail-wm1-x32c.google.com with SMTP id\n\t5b1f17b1804b1-4779cb0a33fso57909525e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 02 Dec 2025 05:46:13 -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\t5b1f17b1804b1-47926f0ec69sm19383375e9.1.2025.12.02.05.46.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 02 Dec 2025 05:46:11 -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=\"ycVigsk7\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764683172; x=1765287972;\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=hEJlz6jAIwEy8yb7eChaXjiRWpNQ8XNoPDVpvPMJ0/8=;\n\tb=ycVigsk7CHOO/Nh2YXqcxvRWOaXNpF1ZOTJdJphOTP+6nuTkWUc36QBTiW5flJFqoP\n\t5QlXes11GYmvhd5thdmJtuS2OaoHjyyz39r8DLSjNg30MyYYKBrZAwhd8SpLtiZ3Cs11\n\tqbLG40SbmCMQV1XS/VDmgoNR/LEwL6dkHVT3iQWw+xullItCE7HtQHdCogKesw0xAzrI\n\tUssPlQe9UPWmbLsn8pxMP0rK3FZL6XXQ7a75FI/kKiAY5W1vWCxEhN8sYdvNKdxMi0dY\n\tR5AkOjlLXQmpHNYiVRkFhvr3QFBrnBWlJqZM0iWWNqiVRZ2Y1CaEUDUbsHsb9Rs+r4qL\n\tdsWQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764683172; x=1765287972;\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=hEJlz6jAIwEy8yb7eChaXjiRWpNQ8XNoPDVpvPMJ0/8=;\n\tb=fhA8Cvw04bis/6xb9/0CfYpMR679Q1DO1a7Wyc43eXF8GRZYDoVxNfidVmbevg1TwY\n\trVIErbG3D9TwqqpInelQ8asQd5BE7ClaD0v+hDJgzfOBairhZHk9P0pXDHgpaBgDqM/w\n\t3X2CucRFObtFTMJBYrqtnOzWgRsBQhmWgXOaSiKKFMeuUqvTfX7A3oCfs5Wol9JrwrgI\n\tH4JKtsZ6l9OkNsUwL7AMiRlLLe32umforu6gZndvM3jWIdVaDxob4B/Dd0xd9M75DR+F\n\twsTIgIUabsTEikexvQYfC5E9lr/dnlTnZC+8YmKVI5ZGVbfQvVgtgvu76BRwi/L7+fxm\n\tKVVw==",
        "X-Gm-Message-State": "AOJu0YyPXBnucIUo0trGr9cRKj2sr6/XnMLR/j68A+V8CApYGE5kPB5I\n\t57G1+fK/jXxOstiEP8sYQ7zHLt19LyIdXew/mGhYU6rgLTzXcKrOH/US9dGJMFq4EWK8CSdUDGs\n\tb9Ekn",
        "X-Gm-Gg": "ASbGnctBYrYDi3V92WA9HIUsWeRXEdmybYw9+6MpJJa5u29HHQvpyFgVfqH5n9htgbx\n\t0PcEHR3Lo5PPbFVGExhz76dUra+FX+mZIzsvY0Kbu2/IWcSjQiyUWinJfvgcjYSs5VBx6xu3dY2\n\t0r7y2AOdLh0Tc2kYko5n2Jkk0JQFuMmB2ZzNPPbHGnwS2Ky34gePYbqidtWi9H0xqcXgmKZ486C\n\t1yi8qeK+C+bRu3kPQ7SmguZAUA+J7irRxeHRFq3qYmbYn6q7U9PqU2+c9RJ5wXTUtuqVnoZX/ZD\n\tFOAG/nlapVZ/6iOBIzdSKqmG0APclWraqpl1zEt/gyywBSzHPS4xn6D0inSlov3KzNA1IIbBTKM\n\tDANhYHtHDsqmsdIytAyRzgkd7YnGdn/OqrjsKdvJSA6YynzgERMHanMTZPKHA+nDzAK4LE/xcl/\n\tlhJBBQe/1HoyRMZ13JwX1LGOlZUYrnov9Qh93IikzVFB7/wnCeLjGjrcU2ULiaP9gWSrU=",
        "X-Google-Smtp-Source": "AGHT+IHIEM7qLl4oiqmaNDVHGpzfVdpiJ0N5+OeBbsZdNgAunKMbEVMXjQI8UJQTjZEkkBFT6+kETg==",
        "X-Received": "by 2002:a05:600c:314d:b0:477:b0b9:3129 with SMTP id\n\t5b1f17b1804b1-477c0175164mr422962795e9.3.1764683172603; \n\tTue, 02 Dec 2025 05:46:12 -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\tBryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH v6 14/24] libcamera: software_isp: GPU support for unpacked\n\t10/12-bit formats",
        "Date": "Tue,  2 Dec 2025 13:45:34 +0000",
        "Message-ID": "<20251202134544.662446-15-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20251202134544.662446-1-bryan.odonoghue@linaro.org>",
        "References": "<20251202134544.662446-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>\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 caa0ba15d..af5af38e4 100644\n--- a/src/libcamera/shaders/bayer_unpacked.frag\n+++ b/src/libcamera/shaders/bayer_unpacked.frag\n@@ -44,9 +44,17 @@ float apply_contrast(float normalise, float contrast_in)\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": [
        "v6",
        "14/24"
    ]
}