Show a patch.

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

{
    "id": 24682,
    "url": "https://patchwork.libcamera.org/api/patches/24682/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24682/",
    "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-38-bryan.odonoghue@linaro.org>",
    "date": "2025-10-15T01:22:49",
    "name": "[v3,37/39] libcamera: software_isp: GPU support for unpacked 10/12-bit formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b2714163b9f3c6317c79dc962e850aef6f97864e",
    "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/24682/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/24682/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24682/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 E2DE6C3339\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 01:23:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7480D6061B;\n\tWed, 15 Oct 2025 03:23:47 +0200 (CEST)",
            "from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com\n\t[IPv6:2a00:1450:4864:20::62a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 437F560669\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Oct 2025 03:23:33 +0200 (CEST)",
            "by mail-ej1-x62a.google.com with SMTP id\n\ta640c23a62f3a-b5b823b4f3dso221355466b.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 18:23:33 -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.31\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Oct 2025 18:23: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=\"wi5ldj7U\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1760491412; x=1761096212;\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=NQ8UK1PjcLrLcomgawtJFUp2Hb3suu4LRcvqz99T9V8=;\n\tb=wi5ldj7UEShuXRKXHaxGWPKpaQNCRKrq3UpDTsRo/SxnuvuX85CwGBPbwnkUAN7Gye\n\tlExbm0y6g3H4iSXdKpRuaJj5wG50qJ6Hn1TyLWz9eA/gIKq/JNaMdsMs4WwBByFRp2XL\n\tw/NokGQ1Cjpmnb09l6B1lD1kxmltJzuVwrWMnap23dGcGWI8EfGnsEXIRQO8aP4B3KoM\n\tFYUH3vielwm+FIuv7fvnJZVH8HNJ8r02Er5JkTiuhvP6u7SniUErz59s2gXETShYRKNX\n\tuakfG9fCcPFsPGMLsA78DxiOLi/nbfisaWXg2oNlheT/jeMa7R486hEPGacPaXe0atOc\n\twvEA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1760491412; x=1761096212;\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=NQ8UK1PjcLrLcomgawtJFUp2Hb3suu4LRcvqz99T9V8=;\n\tb=ZgaTDEBHF2K/OU0XhO5Grch8hGEqbuNotB9MVyRxqyR01Pkwm83SrKFj7eWHPxItiS\n\tYuEXwr7RKUdQI2sbjEoknNru/zyDPzyfuJ/ET1MxVziDaMMzvFrkjd0eQLRI2ynaQkpd\n\tJ4E4SkxfZrxAM5scop26CO3Qi3SwkgHdqH9RbfgqO/J/NKh0xftGmbfygI4zUdfis6Bs\n\tv5lDGb+PONnNI4wdnaq1RomDUW22hnxbu/IxDasMnIySgGB95xlSginq+ZN7R21jWFOC\n\tYaTQ/2aSUD+b1prEO+U+4SFBnR8ianaZmbh5nSsdIW4sajgeqpDDFoBdWAN3bBHuhnqp\n\t+OCQ==",
        "X-Gm-Message-State": "AOJu0YzIjSRpoxmsPr/xSnloPmitAVsh2EBrxBlJQ5mVNbS1A+uedQfp\n\tDEf3yCLvrtCxjuWevzr1pg7Bo8H7mztnTh+bkrDvkSTyo4qpVk8z1Pe77MFKovsk9e3z9pKjDAi\n\t68ah0",
        "X-Gm-Gg": "ASbGncszwA8ofw8BZ6ZIBq0T6XJRmf5V+BbUk8WV16T3AhHO9fEtAL92fBJrpzGWo00\n\t/xaeVj3maLX/umkMnFPLM1fY/WeORMknX9Rq7JcqekjiCf2lnVLB2HheHPYEOYJgBmPYrp3NOVV\n\tFN4fVKsoZdKFBmCwIV38t+OH448669jZuzc8054ukBKTPqL2EZR4uQR8QAmBKfBuctkouYC/cyB\n\tsMsN4gVvVGrT30zdC4uZeW11p09K5b2edo0pHrent3JKryUO39f5Kb6UbV8a9OqHx3VbQQVGMTG\n\t2Xeh/1K3+zbaf6ASXypZXtCbaATWYCSig/Nl74G/XmRAPIz7nkPc9iG3A5eyYBJEeepi3Jgk3Jv\n\tc3mNfUBqv9meBRdJc7zqgmvltpjre0/qLsb9mwlu+8BIomz1I8FZX5ckF3K4gjlmyYsTp4kXNyC\n\tX6Tt3mS/Gs3HHKBjrj645pHWqwogyLFmYe1sbmF1Vk",
        "X-Google-Smtp-Source": "AGHT+IFrpSsZ0pU24nYtdv3hSFExslCTaQRNZ5yqdg/9R2QOQ8kbMRql7mgUiHEgG8qbKiYcPjiuUQ==",
        "X-Received": "by 2002:a17:906:6a1d:b0:b30:2f6b:448f with SMTP id\n\ta640c23a62f3a-b50aa8a8f8fmr3060657966b.25.1760491412481; \n\tTue, 14 Oct 2025 18:23:32 -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 37/39] libcamera: software_isp: GPU support for unpacked\n\t10/12-bit formats",
        "Date": "Wed, 15 Oct 2025 02:22:49 +0100",
        "Message-ID": "<20251015012251.17508-38-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": "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 include/libcamera/internal/shaders/bayer_unpacked.frag | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/libcamera/internal/shaders/bayer_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag\nindex 37bd4812..96a6d554 100644\n--- a/include/libcamera/internal/shaders/bayer_unpacked.frag\n+++ b/include/libcamera/internal/shaders/bayer_unpacked.frag\n@@ -33,9 +33,17 @@ uniform vec3\t\tawb;\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": [
        "v3",
        "37/39"
    ]
}