Patch Detail
Show a patch.
GET /api/1.1/patches/25139/?format=api
{ "id": 25139, "url": "https://patchwork.libcamera.org/api/1.1/patches/25139/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25139/", "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": "<20251120233347.5046-16-bryan.odonoghue@linaro.org>", "date": "2025-11-20T23:33:39", "name": "[v4,15/23] 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/1.1/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25139/mbox/", "series": [ { "id": 5600, "url": "https://patchwork.libcamera.org/api/1.1/series/5600/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5600", "date": "2025-11-20T23:33:24", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5600/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25139/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25139/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 F2171BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 23:34:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9BA9C60AD2;\n\tFri, 21 Nov 2025 00:34:23 +0100 (CET)", "from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8331760A9E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:34:21 +0100 (CET)", "by mail-wr1-x436.google.com with SMTP id\n\tffacd0b85a97d-429c48e05aeso968675f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 15:34:21 -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-42cb7fa3a81sm7984139f8f.26.2025.11.20.15.34.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Nov 2025 15:34:19 -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=\"YF3aef3H\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763681661; x=1764286461;\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=EbZ/Wuv7VrFPMAILTWJXMItIZK7H6ypYImRnfvuiCeU=;\n\tb=YF3aef3HMWLV4PkvzYWMu1zRA74QFsEV0H9fhRJRF9hKWNKWZzUnYmUt73D1FXH2Bu\n\teFrjbSFd4Ve3Kqw3fkaHh7SQtnXdFxly6ts+h2eo49uEh6bzq4BX+S8O6e6y4ic+nl/b\n\tt5mB/2gkJsmWjaHVCn8erzL3uNcy8uzzflYJ1vrV/FZXsL4Jn2BjlZEabsHgtkjT25YN\n\tqJ74AtLNKroUbpchtHDBlJKKCCXBjq33rleMWQKkOhn4zswYiJHDw7hWM9Mzb5BJTdju\n\tzkwSDtFCsp9/0qisKgvrURg8xHyAul+lbsXJMRHQ7e+7jw+6rKHG9cwzHkzJdr8yXBHU\n\tU+GA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763681661; x=1764286461;\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=EbZ/Wuv7VrFPMAILTWJXMItIZK7H6ypYImRnfvuiCeU=;\n\tb=iR403bpQ4++rvMOODmHa2y2l5RLxJP1A2sZkCmfWBCwYZrVMk7fOcv+ZIvZkIUxLqH\n\tJhJAaZUXRNw2yyN1JXjfR26wQFHWRSU/kIGYWe1JS55Bl04IPicioeQKis1WCyRTp8yp\n\tfL5XM2LFceEwt9bWrCtfwHVIAq4oWqHiM88RDPCJJdflIRhOoe0lth/jZzBPsVEs+3F1\n\tkjZcnFhSfHhm8bFz+bLamMbE/xqFqnDORH4rZ5Jr0K4YUUUW9Y8O774AM9azoXOf1D8l\n\tFaxmwFXPNsM9qQInahz6B37WglMRsX0KLE5J9SFh2jjfc54tDYJqbVHZqnJ7qWTn1xD5\n\t/maA==", "X-Gm-Message-State": "AOJu0YyIAA7/EV1WthKov1lsncB+up6hM6K+6TQyBP+lbbzb6+W2Poo4\n\tAgfQeJv9QIsFmNHqmdFFYo3iuESqD7rd/dNlneZp/pGQws+DIE65QNjuWQscVDBNx+Q4zcBN3BC\n\t7O/aDB+M=", "X-Gm-Gg": "ASbGnctLKJ/pkUZARuWzErHlYKFWCwC+hmxm9YNObq96N0w8hDfdVcegqBUvvulfJkv\n\ttHDjMnqT7FX4RWic1NBDtMIX3s9nqgQ8JEBejO4GCcoBYkrfCvnx5H7EeRfnac32c1bMRTxPZI3\n\tVPNqU24tQPYnkzgnyP2kjroitOZZhcMWZ9Jv436UNZxHBiWY11LaYM29eG2LAUlBGzyMQRAnd0I\n\tbMAJORSvfVuAR7MzNZIYh4HrlR6Z1yscTquAIQMuMEMNIu9RcsdDtZISjAmG/D5/phQoKKetVHd\n\t8L1CZAZAiqYCbgm0LZGk71XkpnrvsJ9TlCWuqVjs4I/LDzbbtFnuIF+uDrFlh87gqNbtbfDGIFX\n\tQTSstmBD92d1DML2SEXOkVJ5BcyFCKm/txHsYJTuxzkgtU11qyDDTxPGG893nZaaS99IOTAEdw0\n\tohbawOFWez9huKgXXjZ6OMB49tttk2AYjmEZuUjz4hkMwtLjBTHCdAIeoX/fGWnzdJ2Wg=", "X-Google-Smtp-Source": "AGHT+IGXGbawGYEbrqSXCDOpenbBj8HkBy7Cxa9Tmi7n+jBH75BL295qfKiP4oDXfoCiMfud6kH8NQ==", "X-Received": "by 2002:a05:6000:228a:b0:428:3d14:7378 with SMTP id\n\tffacd0b85a97d-42cba7b465bmr5092916f8f.24.1763681660908; \n\tThu, 20 Nov 2025 15:34:20 -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 v4 15/23] libcamera: software_isp: GPU support for unpacked\n\t10/12-bit formats", "Date": "Thu, 20 Nov 2025 23:33:39 +0000", "Message-ID": "<20251120233347.5046-16-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20251120233347.5046-1-bryan.odonoghue@linaro.org>", "References": "<20251120233347.5046-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 16262feb2..c519fad1f 100644\n--- a/include/libcamera/internal/shaders/bayer_unpacked.frag\n+++ b/include/libcamera/internal/shaders/bayer_unpacked.frag\n@@ -47,9 +47,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": [ "v4", "15/23" ] }