Show a patch.

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

{
    "id": 25132,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25132/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25132/",
    "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-9-bryan.odonoghue@linaro.org>",
    "date": "2025-11-20T23:33:32",
    "name": "[v4,08/23] libcamera: shaders: Add support for black level compenstation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6d754f850c31be369128337ecad0a379b2ef58b2",
    "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/25132/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/25132/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25132/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 D2543BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 23:34:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 95BD160AB4;\n\tFri, 21 Nov 2025 00:34:11 +0100 (CET)",
            "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F3B22609DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:34:07 +0100 (CET)",
            "by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-477a2ab455fso15608335e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 15:34:07 -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.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Nov 2025 15:34:06 -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=\"n56n8PlF\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763681647; x=1764286447;\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=nlJ5B/c2yaAnhmfTCvr9ddm6I4kgAbJyB0Cat+eLPzM=;\n\tb=n56n8PlFm7oGfWGILC6Ey00juVfoBRQIMmohaOsLAAu9T1H//B9TDiYZ8VfWk6RB+U\n\tUn9C2ma0as1YPrOWANVrRg9qQVukHnDckSx8kTiygYM4yFhozscXM+MirT77com+VHAU\n\t8lGg/xGmZMZqEKLNHXo3l2JhzJoNqHEH0lev9g/9NoMNQMfoF2uBZ204d2JP+NxmRABE\n\tJxVxdXSn9SxkMZqXMHRW8Rg0roJMuied3fku5RY6QMNUcjgm52PNCE+bFTuiQZOpClJG\n\tdhLXtNwYXuy5ImI9BgCQM51kDV13RYmtFYOEszYMzDoblPdEn1sagoaCESlxPNWogoKt\n\tUHvQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763681647; x=1764286447;\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=nlJ5B/c2yaAnhmfTCvr9ddm6I4kgAbJyB0Cat+eLPzM=;\n\tb=p6ddXF3Uj77pO5ZGTqk2fPFt3wcSVpYxrAMTyKbk4Pzh9+uhgzzXtP6D2EKU8KWuLn\n\t/00TQAKlT3QD+Icd8XzKC4E7O/N6LmsPX/QLUXA32TjFb5ta4sYojh//RxZC+PEYqCCV\n\tlR/Jm3lBhJ5pP932zFG/UNpPf4XbGmjkS4XwGrfPgop+AsGyOlQWNl8SAkqsQNnGiTcA\n\t2M8s1tqpyNSHV2G/5Mv4nWOFDdznlBkA0jMaL4Pyt2XnFjdztcBFfTm5ApRLqnq+LCX1\n\tkMTa56cjwprZyGexqPnBhhomm059OIwgzp/qh9LwjwKQEJexu24VTkcDSeP+IXHgzUjX\n\t++bA==",
        "X-Gm-Message-State": "AOJu0Yx0v0vf/pAU96569sv7HxIb2pCuW8x1gwfX8t7AFkKmPkCbZG9t\n\tFkEzWbaN7kq4STnRwI9pQtS5qJLRi7PLC4YOYGxC3w2qF4CTegoSLL5Bx8TrpQ/LkqdvNa5lQ4E\n\tH7S3GpQo=",
        "X-Gm-Gg": "ASbGnctIAALcmOtiDD4QDlwmNdLHtZ1UU+MibEjXXxDT+WuItYhdqFcvh5a5XCcRJ8n\n\tvbEecNzN2RQtbwQbANL56B85iPUNMl/ZupZYojAbE1HgpRgzJ280QWtT/lEohCk3lPJivKJomTG\n\tHOK/1bpm21iVN7b6BbFUKfxwwqF4dDVOO9cvuow3piTPN5xyuraG3TPJ03W24TIaKx8CYkqPfOK\n\tG1deVmS/JXTDcaapdFNHotjwjCzYFHIRTLhueGZd8NndhoaljjEX+2Ux8s8dB8em95B8ynfTj+F\n\tlnd/Yn+gZ2QQxpgxz5wokZ+1C+DuM8cRlbD7QLHvJdT39seE2RoLjj5XTwFxHhPmWEIHueoIfrN\n\tLLSPfkXXuD8woh8vF3+sZZ3MCPTBRGlwgudUcB+UF6ClMGP0cVzH4QC35x5450N886Q9o7FfmRy\n\tL28Xp5bJBfGwA1VNN8vMGwvFTkDx/3qyR+XRaCxH0UHxy/MuyJ+KhVENsFZKOkxDBB4jc=",
        "X-Google-Smtp-Source": "AGHT+IHCkvf4/vf7Hfey7psADN1avGaq5Mt2xaOjJdqEWi9ohy/cGgPb35FzuKN1F/dgtXvWUP8QhA==",
        "X-Received": "by 2002:a05:6000:2893:b0:42b:31a5:f032 with SMTP id\n\tffacd0b85a97d-42cc1d2d586mr113212f8f.28.1763681647249; \n\tThu, 20 Nov 2025 15:34:07 -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 v4 08/23] libcamera: shaders: Add support for black level\n\tcompenstation",
        "Date": "Thu, 20 Nov 2025 23:33:32 +0000",
        "Message-ID": "<20251120233347.5046-9-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": "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 include/libcamera/internal/shaders/bayer_1x_packed.frag | 4 ++++\n include/libcamera/internal/shaders/bayer_unpacked.frag  | 4 ++++\n 2 files changed, 8 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag\nindex c0632eb1f..6bca07b6e 100644\n--- a/include/libcamera/internal/shaders/bayer_1x_packed.frag\n+++ b/include/libcamera/internal/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/include/libcamera/internal/shaders/bayer_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag\nindex b545fbbdc..ae214a9ae 100644\n--- a/include/libcamera/internal/shaders/bayer_unpacked.frag\n+++ b/include/libcamera/internal/shaders/bayer_unpacked.frag\n@@ -28,6 +28,7 @@ varying vec4            center;\n varying vec4            yCoord;\n varying vec4            xCoord;\n uniform mat3\t\tccm;\n+uniform vec3\t\tblacklevel;\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+\trgb = rgb - blacklevel;\n+\n \t/*\n \t *   CCM is a 3x3 in the format\n \t *\n",
    "prefixes": [
        "v4",
        "08/23"
    ]
}