Patch Detail
Show a patch.
GET /api/1.1/patches/25531/?format=api
{ "id": 25531, "url": "https://patchwork.libcamera.org/api/1.1/patches/25531/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25531/", "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": "<20251212002937.3118-17-bryan.odonoghue@linaro.org>", "date": "2025-12-12T00:29:27", "name": "[v8,16/26] 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/25531/mbox/", "series": [ { "id": 5657, "url": "https://patchwork.libcamera.org/api/1.1/series/5657/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5657", "date": "2025-12-12T00:29:11", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 8, "mbox": "https://patchwork.libcamera.org/series/5657/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25531/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25531/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 07A2EBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 00:34:16 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B1ADC618B5;\n\tFri, 12 Dec 2025 01:34:15 +0100 (CET)", "from mail-pf1-x433.google.com (mail-pf1-x433.google.com\n\t[IPv6:2607:f8b0:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C13D6162E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 01:34:14 +0100 (CET)", "by mail-pf1-x433.google.com with SMTP id\n\td2e1a72fcca58-7b22ffa2a88so698122b3a.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Dec 2025 16:34:14 -0800 (PST)", "from inspiron14p-linux (p99250-ipoefx.ipoe.ocn.ne.jp.\n\t[153.246.134.249]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-c0c26eb0f6bsm3317282a12.14.2025.12.11.16.34.10\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Dec 2025 16:34:12 -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=\"keuJcyXh\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765499653; x=1766104453;\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=HhtFnWRlGMhahKWMF7YUw5HWUh4rGouum/Sd9bsme4c=;\n\tb=keuJcyXhwe0WVbsbG1E0b/XhQEN/5b3aTap4TBhZVyueSp+KX9Z6RxfmHIrAJ/kxiQ\n\t9l6JaNmPGT/s7Rio+RrPGDA4czAxPGVOI4Nmr9iewrOSB8otG89vny27gn66049KHIXH\n\tSWMGCL+o+5KrPbzGEeXKBzCR4bkWJNdvBa01HlJuVlzGo1qaaDcc+nqUBVQLUG64Azrq\n\tVorMGvt0L3pDoRWxEgk/vY93bvUOepYXIsPuGiz8aMXZruespToPolF63xZIXM2Ylz48\n\tXzUzCFzqi/xQwGdPqPDpw4Wy8cZFATy4KH9jdxaQKgtTmXPB6Au7f1VGyOSZLvZ6U1Rr\n\tDg8Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765499653; x=1766104453;\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=HhtFnWRlGMhahKWMF7YUw5HWUh4rGouum/Sd9bsme4c=;\n\tb=erZ+d7H4DfK6KJkWVh5SY9WztPLIMIM2ZRG9DFjml2+cyy+fp4ZZGV1EA6n1GmF9pV\n\tgnmetV1KdgVQhkm0jNL/TfzDhv2P4UP4YKSf15Yma9Ko66iB3F0MV5nn5G6vs3SUWoAV\n\tQvjGLbf2s3nmIjNSVHEcq2TFf+7edDUVTU1YGchAHIkH9a0cmtBzPpX+R8v1erTgSqxl\n\tnU85ntaQDtysTZrF5lRTvDra0L0GBlga0t8iX5C9NFpoaZuJFpbALnP7Us79aBz3C3bo\n\tKLBQClllAIDiahWxTJdFQfpWalI66mbJgXvBfiGqFpnHrtVtfF1J+GsGAUmvN6V7wmvx\n\tqm4g==", "X-Gm-Message-State": "AOJu0YztvATsx+kUR7jsRt8MSbG0gaeHbN8He/M1E+9svq67kLgD1inu\n\tkepEMW79NgAecOguRFYu2Jf8SKqeBwvofB7Rl8noPM9Td9aFaTBKabGkgJsy2a6+e54FCIzg3Nt\n\tmHzOT", "X-Gm-Gg": "AY/fxX7G3TLm9bcau3ksEjQ439AuyVW2vyqFFimFB3JGqh7jbYjW5mqmdDahRwH0F/H\n\tEe3V2TQWe64qRU7XZ4mF+7AhnuxXMa38h2tNz/UUsjgVn0zjYtO2N/mJW2aVxSUXuURAVyPWUAq\n\tIOHgCycJ7kgHvORJpnfQZfNd2wyXSrSYY6IC2SsxfIx3UmkVwa4Q4hExNb1g7ZP1B3xosTG4NsW\n\tXVsN3tMJnQWGCy9KykDPNXve+ec/ORrTJNzQvtySAtZIkFdBJeGC3bQomlv5Cm+JwTX9vv+fpvN\n\tUuhBGT/e3h3X025BzozyIUTFPpSoNb5vHFExSnlx8K/UT/9GKCWHGdCF7NEvkdYJGL3IejfTVH0\n\tQpe1sRs+dGjz/HYOe5vOMF+htzKeW0cj7Ld7aCNqQLFBmlhwcRgepuAvhBZ5TQkEgEtoFWvZLQg\n\thF4u0AOEuuvk5n0rZYLYaYRPPwwUNPoBZDSzVBOMvhmZdEbmMFFTOkkhtBSag=", "X-Google-Smtp-Source": "AGHT+IHYwr7NAvCQKDR9xkByGviw8lz609WP7GCC94t07QIK7KsFLPIfvBv7OaP/FcuPuepKek7Jxw==", "X-Received": "by 2002:a05:6a21:6d9a:b0:340:cc06:94ee with SMTP id\n\tadf61e73a8af0-369affec34fmr320814637.60.1765499652688; \n\tThu, 11 Dec 2025 16:34: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 v8 16/26] libcamera: software_isp: GPU support for unpacked\n\t10/12-bit formats", "Date": "Fri, 12 Dec 2025 00:29:27 +0000", "Message-ID": "<20251212002937.3118-17-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251212002937.3118-1-bryan.odonoghue@linaro.org>", "References": "<20251212002937.3118-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 114e32058..477e8bbf6 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, float contrastExp)\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": [ "v8", "16/26" ] }