Patch Detail
Show a patch.
GET /api/patches/25433/?format=api
{ "id": 25433, "url": "https://patchwork.libcamera.org/api/patches/25433/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25433/", "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": "<20251210005354.44726-17-bryan.odonoghue@linaro.org>", "date": "2025-12-10T00:53:44", "name": "[v7,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/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25433/mbox/", "series": [ { "id": 5645, "url": "https://patchwork.libcamera.org/api/series/5645/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5645", "date": "2025-12-10T00:53:28", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 7, "mbox": "https://patchwork.libcamera.org/series/5645/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25433/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25433/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 5CC94C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:54:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 11D0F6148B;\n\tWed, 10 Dec 2025 01:54:58 +0100 (CET)", "from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com\n\t[IPv6:2607:f8b0:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C2C416148B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:54:56 +0100 (CET)", "by mail-pf1-x42d.google.com with SMTP id\n\td2e1a72fcca58-7f1243792f2so863985b3a.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:54:56 -0800 (PST)", "from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-bf6875cc8eesm16057762a12.16.2025.12.09.16.54.52\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:54:54 -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=\"QDDPXWIX\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765328095; x=1765932895;\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=AhQQpiz7epWKGIAzXJxlXAcg4BbDHdrjadDzBhidlYw=;\n\tb=QDDPXWIXlEG+3Pdqtz37CRpd/fdR8/x0HIWNnrK9t++S4N++u6IKOeLVAJ3uO/UWIp\n\taoHDm3x+nU1aO1zjzggIWkiSS01NqZ46oKLBtD0y7QpPC/12LSWXYzWj0uJw3FXt5EKg\n\tTsXxbrZ7ekSF3i7tlxai9GdJvjScvWzVgVrlcaxqEBsBnwm81pv59ZoPmHAOG6bGfTUv\n\t06bQYFWDBz4Ewg28uJDrSaaA3+Ecqcg5vwz6b2ltAebYY2vXbdeBntA0TD0nuCrpDG66\n\tesIt3lrmAi4BSlIPVN4RoT40SMvHGmEDK6Rl3tl08VcHPry2Iy+v06tWXCTzW2FPhIKE\n\t3bOg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765328095; x=1765932895;\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=AhQQpiz7epWKGIAzXJxlXAcg4BbDHdrjadDzBhidlYw=;\n\tb=TTeZ3j5TW4hu+X2M3kHAGvkg9mwwS6xsaswwQkfMCtbJiFCk5zwY5TvzbBdNBNREnm\n\tCzfezcq2rQfeIWosSkBDZyjnH6GId3Vf4dvUPXjiePJLziquylFWEoYM+k/udJg83/pf\n\t07EaCUAfM9QrAXFeSHWiJaQQK9Th1SX+3OxGUH8tLl/toyledF6u85L5sssIT4In7Cq5\n\tGnPlExwODaFCt80RSQ+QzxBPEHesCl+Q75x38bk06MeHghA+AqCxzC3hyqm2ummuUlxj\n\tm+4RQRZgaP3BeiYQLZBwDTnx50ISpVysBxuy/+4qsrZuUMyfIXTt/Iy1RzgzVE64djrt\n\ts6IA==", "X-Gm-Message-State": "AOJu0YzRETXGLNfCgYILUoxstQ8uSuJr5TX18JjnbpgbAlEnP0TVdP23\n\t6T7PRFvSpST9H1xeRVBM76ObBWcKS0p+vzOcCtXoMlHl7WqpVOKSi+QokzP9Da5beClLuyAC/bm\n\the2uF", "X-Gm-Gg": "ASbGncsIGfvHyMmB5pQH4mWFp1dDhEchAqqrpZCxbTjZUnlMpRUWhVnXu+eo8vqMBXB\n\tBVBMDacWQWelkOm7cYcm0QNn1uAKSmz++YA93vCzkVk3QDuorudRhUTi+4uoCfIWurZLMfTIgQK\n\tY3egGRSSs7a8SIESVwEQEWRBexWqfCQuVODDLQ4gLFVR9qFf7k6dDP62LY3vt94aTQLfpwKTRok\n\taErpmw415YGUlh9mLRhq58+aIMC8qIh43TRyE3ZdpAk572JdBJ43Dy1zoSrQqMOVX+8ynjD+fsS\n\tyiqmiu50DY3VAR69KaVOxwYUVexbhjTHosjzOXZfse3iJtQ4WxAqQLNjbPK6oYGOgzW1k5bXtsY\n\trhm9Qc5tCiB/W8KcfhmSSO6JdN7CQyV/xlQhSH84/jUJvEMjxXV6xgvnURAl+dOWUI38dumxTQp\n\tAQjEyupVZr4mKMsR2OAJQGw+q/fKXZoiwh24CQ5BzzjOJaoDYUGOzrLirB18ljSGtR", "X-Google-Smtp-Source": "AGHT+IFtAzD6l82rifWFUw0i9S9dciEHo0EzjMWopSnlb4+SPG/kmFv0ShPSjoOo3wNGaezkliPckQ==", "X-Received": "by 2002:a05:6a20:729d:b0:35f:fafa:a198 with SMTP id\n\tadf61e73a8af0-366e01c0f82mr491789637.10.1765328095115; \n\tTue, 09 Dec 2025 16:54:55 -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 v7 16/26] libcamera: software_isp: GPU support for unpacked\n\t10/12-bit formats", "Date": "Wed, 10 Dec 2025 00:53:44 +0000", "Message-ID": "<20251210005354.44726-17-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251210005354.44726-1-bryan.odonoghue@linaro.org>", "References": "<20251210005354.44726-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 1226fe075..ec9f1921a 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 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": [ "v7", "16/26" ] }