Patch Detail
Show a patch.
GET /api/1.1/patches/25245/?format=api
{ "id": 25245, "url": "https://patchwork.libcamera.org/api/1.1/patches/25245/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25245/", "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": "<20251127023739.179652-9-bryan.odonoghue@linaro.org>", "date": "2025-11-27T02:37:23", "name": "[v5,08/24] libcamera: shaders: Add support for black level compenstation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "000afaf5b49b692a0106e953b9b634fb1ada8fb0", "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/25245/mbox/", "series": [ { "id": 5617, "url": "https://patchwork.libcamera.org/api/1.1/series/5617/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5617", "date": "2025-11-27T02:37:15", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 5, "mbox": "https://patchwork.libcamera.org/series/5617/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25245/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25245/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 B093DC0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:38:07 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 371E460ABD;\n\tThu, 27 Nov 2025 03:38:07 +0100 (CET)", "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 52C8C609DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:38:04 +0100 (CET)", "by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-4777771ed1aso1615485e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:38:04 -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-4790552c3c9sm58186345e9.0.2025.11.26.18.38.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:38:03 -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=\"UuqsVFEs\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764211084; x=1764815884;\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=a4Z5xi4jidv2phyy2JrFxGl8iOtQb7kkkaWyXWfEsJk=;\n\tb=UuqsVFEsAqeu3wY4y6uWmPcAywTZhWZToBQJhgjR7JDl2I9ROwkmZqqcf98mYdod8o\n\tM3q1DNnkTz+sgTSWYo0xxxDNB4sVDIUQcKKnYJC1MgVJyqJ0P0EGuGqGVUNt3CgA/z5S\n\tqtV2FkREM4KzVPfsm0rdwxWKCy41fia71zPML/kBT71CQiYN/z1po512APl53YBiX2NI\n\tH7aYMzBHwz9bqbJicBE4KamKsKzK30qCyL1CGpO9tSEPr+Ao7nCwWNDnzAssY/Wq2ooQ\n\toHjYv/zqwsS5dRv/X7nicK86IwMcrulnKIjFUFzMkYEzQj2qYMz5A8P2nJA9bh810qwU\n\th0hg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764211084; x=1764815884;\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=a4Z5xi4jidv2phyy2JrFxGl8iOtQb7kkkaWyXWfEsJk=;\n\tb=OWqJ3qcLKmgxdGDS0OvHGnAi/0OXEb9AxWWsgKPCFVL+f5TtjKgNkIb0MLr2Zes/cD\n\tGAhnQJGTD6yNrAnpPf4YZm+bsq163Sjy21p81aLsJkLnJTXpHIvHY0J8O9LGvrbCWyYJ\n\tGDDX2OrNNJaZBWH56Y9HTIzzHicAZyB6wQQLLONJzbNOQLKYMIpXQHuCYXXmRWzBjhbs\n\tFH1B/F5ak9Pd5/hs3ky5lKFkOX16LPsX61zhTqv/ukANT59FbXBc1chlMcccs/TcKJlR\n\tXHaDWLAs9aI82j1X51ZEUWC9gAoB0+VFWb/Jx8LLvsFnmjl7ZJYlNNjiLOUwimbHZxt0\n\t6qyA==", "X-Gm-Message-State": "AOJu0YwCJFrzszDyLZGw33yu6W58QuRtZpLG7yg2iuPjCMS7hhEq1TUt\n\tlCBudiqHBsjZ8L0Frw9jAi+ofzVDsaGa4l2Crju79U7zIYJBmKNx+uUrFDmUhlyYLw1ZYEwjACE\n\tiPXp1QaM=", "X-Gm-Gg": "ASbGncvPSvyMwsxdksiOr6Bx8Ov2ZMuGQIwSI6xgH2R3EOvJl7fU5VPzllLws/SKDh4\n\tKTMQEWAx+qo/75JSsQTbt0sN93nUnN5ltzYmdB7xWyCM+3WGEFT6TGIIDed2JW+ioNPZfQ+1ZrE\n\tSOVaYPWm/B/sshvfV53kI/zpoitBrqFv69qb2H1yOB+lTIcu+2f+C21bM+z2xv6lK/di5UwEI4l\n\t4Em22/K8SGSZG3+HGgc7gAYazF783j8U3pQ8VyU4/PQ0mBBjUisMUIpXCaXomucAegFtVWZ0rzT\n\tPZZ2GqJoJ7GHTtCbFw+lRYHKG5ctuOqQm59CcHixBlfYHD1vovn2wCj7Z/XUWthEXy1wQWul9Dz\n\tqyvPuY/iiCtOGCHy3VkzyXP90fbZzylEy6El+2x70/jI+yWrVbm5OzuiJ31X1VRDOmj8sLrr6eh\n\tbGj5ZSl2BB2kL4dYce2lc60MUDyepySSU2KEPyFLMq94W9qhW02r9FSTY7Cdsa4yxlos4=", "X-Google-Smtp-Source": "AGHT+IH92azTQU6T9RAid0GlJZFMQN6FvmT+wF5sn3rj90loHi7C9BAmy6nviH5Lzg0qe/HbCe1OAA==", "X-Received": "by 2002:a05:600c:3146:b0:477:df7:b020 with SMTP id\n\t5b1f17b1804b1-477c01b2211mr216760505e9.18.1764211083726; \n\tWed, 26 Nov 2025 18:38:03 -0800 (PST)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>", "Subject": "[PATCH v5 08/24] libcamera: shaders: Add support for black level\n\tcompenstation", "Date": "Thu, 27 Nov 2025 02:37:23 +0000", "Message-ID": "<20251127023739.179652-9-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20251127023739.179652-1-bryan.odonoghue@linaro.org>", "References": "<20251127023739.179652-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": "Add the ability to apply a int blacklevel gain against the demosaiced data\nprior to application of colour correction data.\n\nWe calculate the index into the RGB black-level table so that we can apply\nthe black level when we sample the input prior to the demosiac operation.\n\nDon't do this when using the lookup tables as the black level is\nalready calculated in those.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/shaders/bayer_1x_packed.frag | 4 ++++\n src/libcamera/shaders/bayer_unpacked.frag | 4 ++++\n 2 files changed, 8 insertions(+)", "diff": "diff --git a/src/libcamera/shaders/bayer_1x_packed.frag b/src/libcamera/shaders/bayer_1x_packed.frag\nindex c0632eb1f..6bca07b6e 100644\n--- a/src/libcamera/shaders/bayer_1x_packed.frag\n+++ b/src/libcamera/shaders/bayer_1x_packed.frag\n@@ -69,6 +69,7 @@ uniform sampler2D red_param;\n uniform sampler2D green_param;\n uniform sampler2D blue_param;\n uniform mat3 ccm;\n+uniform vec3 blacklevel;\n \n void main(void)\n {\n@@ -217,6 +218,9 @@ void main(void)\n \t\t\tvec3(patterns.wz, C));\n \n #if defined(APPLY_CCM_PARAMETERS)\n+\n+\trgb = rgb - blacklevel;\n+\n \t/*\n \t * CCM is a 3x3 in the format\n \t *\ndiff --git a/src/libcamera/shaders/bayer_unpacked.frag b/src/libcamera/shaders/bayer_unpacked.frag\nindex a9996b94e..66cece56b 100644\n--- a/src/libcamera/shaders/bayer_unpacked.frag\n+++ b/src/libcamera/shaders/bayer_unpacked.frag\n@@ -28,6 +28,7 @@ varying vec4 center;\n varying vec4 yCoord;\n varying vec4 xCoord;\n uniform mat3 ccm;\n+uniform vec3 blacklevel;\n \n void main(void) {\n vec3 rgb;\n@@ -112,6 +113,9 @@ void main(void) {\n vec3(PATTERN.yx, C));\n \n #if defined(APPLY_CCM_PARAMETERS)\n+\n+ rgb = rgb - blacklevel;\n+\n /*\n * CCM is a 3x3 in the format\n *\n", "prefixes": [ "v5", "08/24" ] }