Show a patch.

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

{
    "id": 24677,
    "url": "https://patchwork.libcamera.org/api/patches/24677/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24677/",
    "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": "<20251015012251.17508-33-bryan.odonoghue@linaro.org>",
    "date": "2025-10-15T01:22:44",
    "name": "[v3,32/39] libcamera: shaders: Add support for Auto White Balance gains",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "23e660416b9fa6cb0fd2cecf73a473b4a50bda15",
    "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/24677/mbox/",
    "series": [
        {
            "id": 5503,
            "url": "https://patchwork.libcamera.org/api/series/5503/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5503",
            "date": "2025-10-15T01:22:12",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5503/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24677/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24677/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 A8093C3332\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 01:23:43 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4823560678;\n\tWed, 15 Oct 2025 03:23:43 +0200 (CEST)",
            "from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com\n\t[IPv6:2a00:1450:4864:20::62e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BEA9F60624\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Oct 2025 03:23:27 +0200 (CEST)",
            "by mail-ej1-x62e.google.com with SMTP id\n\ta640c23a62f3a-b456d2dc440so958993966b.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 18:23:27 -0700 (PDT)",
            "from inspiron14p-linux.nxsw.local (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b5ccd7b202dsm98348466b.82.2025.10.14.18.23.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Oct 2025 18:23:26 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"pZzSoDx0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1760491407; x=1761096207;\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=0a0SpIVpVr0hxUQRveXDMZ3Mx6oPKpjRyYRzS2puLKY=;\n\tb=pZzSoDx0so0FL1yCVECyJp5egkJjG/0w6yRtlulRXXq4vbZyE+Bn3RhjHDpi5kgn5b\n\tjH8ANKXPOdBmcg22zp1zrdSmylsV6Y1Yih+QL5MsqLqn2Z4+6XECnnTlwO/ADP+HC1yE\n\tAhci/bM4p0hwRXyZJPrpTXYrjyxHHCdiOXEKxmTCiCwBEsc4ju95TisQPzDizKOoKr+/\n\tvg3NzIhQD6mkyABFeGOANxBD83eTn3LdVGRfLUaZC4nOywunzqkZTLZZgO9Agi+jy5We\n\tuBqlTv0Y4uANeCXuthTy6w7SSXY51CUj/CMLGNKW663rKQgH9ntOfR6bd+pLAUTmBZAB\n\tx0Sg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1760491407; x=1761096207;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=0a0SpIVpVr0hxUQRveXDMZ3Mx6oPKpjRyYRzS2puLKY=;\n\tb=g6GYbzbAEPeElS+1qs0l70JOuJKEfI2RFN9kdnN2Dm/u2DUtA75/MyIGkGuDpZErYF\n\t9AtZM3Ke2y01R0R1Eg1EebX7ybItvl15XGC4AfM483ejRrYmu6n9fEUmd/NOpaZCACic\n\tShPVa2VnBMC6v+cWDsioYbp3Ug5Vpo+oHPekZhaDYH9PUWcDA9u33N3j6ORkzECsJxMe\n\tpeaPR5WAxLij789UpniOhB9te6n3e+QnQCfwDDbBMLV0dF00q6hYbEs0T5ET07iCI9qL\n\tPKwbNaYThoJzDtsFVXLaC0J/Ze2VFASw0qscOU9404BxW/0DGqECv2m+Sf26U3kFpxIx\n\ttzKQ==",
        "X-Gm-Message-State": "AOJu0YxKLJZOBbJgXHItaeh5r1OnGU1qCi9LUKHfE3fXADZVSvGvJlZg\n\tDtxf8CjdywRNfQ2zeIXFt71g2WOS4/4BqkuS51yr4IkkiO4T0U72vBozk3w3MQThCf8S2W6q1Nm\n\tc1tXW",
        "X-Gm-Gg": "ASbGncs1vKT99mo8YjBfqhkFbQnUii6bkGqxa1+GMZ7xbkJ30r4NFDfHOoTGH/H5bz4\n\taijGKFGs5oI2jXUmohrIrPkS0r1C9BaCZopQ/g4SZ2nS175G1o0ezR/hpqbyul1lAbAgNDCeDfG\n\tS9IGsuRNaBsmxpVUqywlC5d3/DevZqxKS6c2tyS/2Q0qzcSHjnpY2a/1BUgACBo/42hvjK/DTt4\n\tuf1Z3QNzrGqnmLTv10iEMEAF6ssxENMNc0JMGXOsiIAhF84vOHsX2wc6LJM69UH5MstRttXbbPs\n\tiVd5499ddrrc7CnevJreIZ056CdKfF7uQo2nDFC1rrlzqd3b0Of9Cfeuuvc0WT84SOEiPjJGZ/F\n\t+RvvfcgmRTXsnPfsrvuR5Ibat8j2Np/aPEAqxXkew4oXZmdeoExuiD87RoHAN4t4KhpN65KqAk1\n\tpCGCJc3WYtZrFjy0QAtiXEHy7k0vcwhw==",
        "X-Google-Smtp-Source": "AGHT+IHdlDXjXzQs5aEAuJWNVhsBqkg1ZbzKVlpdEnbxEExsFRmVqMlLLMs3Xwt24QjGrgqax/ENYg==",
        "X-Received": "by 2002:a17:906:c105:b0:b3e:907c:9e26 with SMTP id\n\ta640c23a62f3a-b50ac5cfaf7mr2798052766b.59.1760491406997; \n\tTue, 14 Oct 2025 18:23:26 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie",
        "Subject": "[PATCH v3 32/39] libcamera: shaders: Add support for Auto White\n\tBalance gains",
        "Date": "Wed, 15 Oct 2025 02:22:44 +0100",
        "Message-ID": "<20251015012251.17508-33-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20251015012251.17508-1-bryan.odonoghue@linaro.org>",
        "References": "<20251015012251.17508-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 vec3 AWB array against the demosaiced data prior\nto application of colour correction data.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/shaders/bayer_1x_packed.frag | 6 ++++++\n include/libcamera/internal/shaders/bayer_unpacked.frag  | 6 ++++++\n 2 files changed, 12 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag\nindex c0632eb1..8b35dd63 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 awb;\n \n void main(void)\n {\n@@ -216,6 +217,11 @@ void main(void)\n \t\t\tvec3(patterns.y, C, patterns.x) :\n \t\t\tvec3(patterns.wz, C));\n \n+\t/* Apply white balance before colour correction matrix */\n+\trgb.r = rgb.r * awb.r;\n+\trgb.g = rgb.g * awb.g;\n+\trgb.b = rgb.b * awb.b;\n+\n #if defined(APPLY_CCM_PARAMETERS)\n \t/*\n \t *   CCM is a 3x3 in the format\ndiff --git a/include/libcamera/internal/shaders/bayer_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag\nindex 74ce1509..37bd4812 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\tawb;\n \n void main(void) {\n     vec3 rgb;\n@@ -111,6 +112,11 @@ void main(void) {\n             vec3(PATTERN.w, C, PATTERN.z) :\n             vec3(PATTERN.yx, C));\n \n+\t/* Apply white balance before colour correction matrix */\n+\trgb.r = rgb.r * awb.r;\n+\trgb.g = rgb.g * awb.g;\n+\trgb.b = rgb.b * awb.b;\n+\n #if defined(APPLY_CCM_PARAMETERS)\n \t/*\n \t *   CCM is a 3x3 in the format\n",
    "prefixes": [
        "v3",
        "32/39"
    ]
}