Show a patch.

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

{
    "id": 25960,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25960/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25960/",
    "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": "<20260126104256.119697-3-rick.w.ten.wolde@gmail.com>",
    "date": "2026-01-26T10:42:50",
    "name": "[2/7] libcamera: software_isp: Add LSC data to DebayerParams",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0eff447caa10b0e4bb110362f1ebefabf57dc7f8",
    "submitter": {
        "id": 257,
        "url": "https://patchwork.libcamera.org/api/1.1/people/257/?format=api",
        "name": "Rick ten Wolde",
        "email": "rick.w.ten.wolde@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25960/mbox/",
    "series": [
        {
            "id": 5739,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5739/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5739",
            "date": "2026-01-26T10:42:48",
            "name": "LSC for SoftISP simple pipeline",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5739/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25960/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25960/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 8E25CC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Jan 2026 10:48:13 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2B85B61FD7;\n\tMon, 26 Jan 2026 11:48:10 +0100 (CET)",
            "from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com\n\t[IPv6:2a00:1450:4864:20::62b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E24C61FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Jan 2026 11:43:04 +0100 (CET)",
            "by mail-ej1-x62b.google.com with SMTP id\n\ta640c23a62f3a-b8842e5a2a1so564059666b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Jan 2026 02:43:04 -0800 (PST)",
            "from castortop.wolde.loc (195-240-110-192.fixed.kpn.net.\n\t[195.240.110.192]) by smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b885b7661f7sm599220366b.54.2026.01.26.02.43.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Jan 2026 02:43:03 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Nya3gXE0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20230601; t=1769424184; x=1770028984;\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=wWSSzFiNiBf6L+Vthr8dkX7/VQuxHw04abSGipA7PkA=;\n\tb=Nya3gXE0EhFhxquIa9y/4qMAAE5sV3Zfgt1D4wv8MV5iIUcfYdsx767BCGjyWfk+lF\n\t9Lfvrx+Wu3H+OxvAt7R8EBAtMGxe/t0b0bj7V5GYj6mKlJxo7ywRrpck2GL4EwX8xM/K\n\tGEVFYfTBGKkRn+vgaXdg2gT1S3DXFLXsQiZxjLLHBOpFh5aIUxThogpMe90HHJQiYg8g\n\tH38kWRJeZgGyjAvEt2T1KFyAgYJoWqVk04hevKxKZIs9OdWStNsrAhHTWL6W11/4EeO+\n\t6iPOTh/8lphCsQbdoYey6z8SWrhUrY3bllAeObOxhmy5D9gte/L/mB/OeKf8qMcG4hE3\n\tOGOg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769424184; x=1770028984;\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=wWSSzFiNiBf6L+Vthr8dkX7/VQuxHw04abSGipA7PkA=;\n\tb=NHKC2xXh9MnZgjWG9O4FIqD8gRdiXGEPoZbuoSGYSaQfRKNlTdsmPusKfVeidfFLyU\n\taI7WFkkt9kT1PT9lJNYir3isyYc19Wr7x1A3stPubQRsWrlJ1u4dPseQ/DoPiUFXaEe7\n\tO9jGUMMdQOD8U98kqdinLYBkkEtVtErOo5qGrgZpXGu/uP0lmZUm+TpiZgPv/6/cMxZx\n\t1AvETqNvU1XjyFOHsujKIEShcnefhNW/xX2Y9/d2Z2mAFoFXAwSOCeWKFe5i4t6TSJ+x\n\tfmZIT4nCz24ue7F5Y5wLrmicSf6mNlC4w+JNb3JIehlBOOlcAwsMw8LKN8/s1wZTvP0D\n\tsJBw==",
        "X-Gm-Message-State": "AOJu0Yy2TOZtOpNJXCUJnUzuhb9DQs7I1whOxGALKmfanCXtIuHN7Bcr\n\t64ccF+detilPbxismwsM1JMxL02qb6FYWdHmxxMhNa6JY6ej1qyK6uMaJ6ynvg==",
        "X-Gm-Gg": "AZuq6aKfP3PPF1+dKod+zSWJLuoYxggbNutCRu/uRExVZStojvz/4cz7wDLrdIh7DXA\n\tmb+iUsX7MYnWj9MqRDI5dToF2xH7K7yQVuL1nrS+zuLpr/wwAUrwMQM3zuNN4k0gcdqj+biPjJi\n\tLtZBe04wiYoIpV31rKV+mk0tQMnkUmnrrQEsY3ljEFioapje02SAbo53SBYZalg1zWozoqJHAFx\n\t8s7wb+cmUIwUUKXsYWxbt4cg12EsjO+Tc6lpEexztvcYnyTp1Ruq910A9+wDVJ5v9ePSgEX8iFF\n\t3itMvYer0sKUbHitrguPmhk/5AQgu+QKAZiK7qfGaD6uYsUMG4pdx7Sr9c9ABZmJqlLt7hDGPAX\n\tMOyi+OSOTeyhcQIuD0lcHOjxc+l40kYHObt2+oVQkIaTHKP2eKxeeF7V/BpgStCdPh8nVf57f+S\n\tGV6KJvEmBrkg+H9IyirwUD0UntABT7syqQD2akdt9diZrnKNFrK/JREh8YTM0uHws=",
        "X-Received": "by 2002:a17:907:709:b0:b87:73c9:3217 with SMTP id\n\ta640c23a62f3a-b8d4f75f70bmr232575966b.49.1769424183493; \n\tMon, 26 Jan 2026 02:43:03 -0800 (PST)",
        "From": "Rick ten Wolde <rick.w.ten.wolde@gmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "xander.c.pronk@gmail.com, derekgielen@outlook.com,\n\t22012540@student.hhs.nl, \n\trick.w.ten.wolde@gmail.com, johannes.goede@oss.qualcomm.com,\n\tRick ten Wolde <rick_libcamera@wolde.info>",
        "Subject": "[PATCH 2/7] libcamera: software_isp: Add LSC data to DebayerParams",
        "Date": "Mon, 26 Jan 2026 11:42:50 +0100",
        "Message-ID": "<20260126104256.119697-3-rick.w.ten.wolde@gmail.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20260126104256.119697-1-rick.w.ten.wolde@gmail.com>",
        "References": "<20260126104256.119697-1-rick.w.ten.wolde@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Mon, 26 Jan 2026 11:48:05 +0100",
        "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: Xander Pronk <xander.c.pronk@gmail.com>\n\nAdd separate red, green and blue LSC tables to struct DebayerParams.\n\nCo-authored-by: Rick ten Wolde <rick_libcamera@wolde.info>\nSigned-off-by: Rick ten Wolde <rick_libcamera@wolde.info>\nSigned-off-by: Xander Pronk <xander.c.pronk@gmail.com>\n---\n .../internal/software_isp/debayer_params.h     |  6 ++++++\n src/libcamera/software_isp/debayer.cpp         | 18 ++++++++++++++++++\n 2 files changed, 24 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 256c7d43..4252cd2d 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -30,6 +30,8 @@ struct DebayerParams {\n \tusing LookupTable = std::array<uint8_t, kRGBLookupSize>;\n \tusing CcmLookupTable = std::array<CcmColumn, kRGBLookupSize>;\n \n+\tusing LscLookupTable = uint8_t[16*16];\n+\n \t/*\n \t * Color lookup tables when CCM is not used.\n \t *\n@@ -53,6 +55,10 @@ struct DebayerParams {\n \tCcmLookupTable blueCcm;\n \tLookupTable gammaLut;\n \n+\tLscLookupTable LSC_red;\n+\tLscLookupTable LSC_green;\n+\tLscLookupTable LSC_blue;\n+\n \t/*\n \t * Per frame corrections as calculated by the IPA\n \t */\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 65a1762d..7a8b3462 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -65,6 +65,11 @@ namespace libcamera {\n  * \\brief Type of the CCM lookup tables for red, green, blue values\n  */\n \n+/**\n+ * \\typedef DebayerParams::LscLookupTable\n+ * \\brief Type of the LSC lookup tables\n+ */\n+\n /**\n  * \\var DebayerParams::red\n  * \\brief Lookup table for red color, mapping input values to output values\n@@ -120,6 +125,19 @@ namespace libcamera {\n  * \\brief Contrast value for GPUISP\n  */\n \n+/**\n+ * \\var DebayerParams::LSC_red\n+ * \\brief Per frame Lens shading correction red channel\n+ */\n+/**\n+ * \\var DebayerParams::LSC_green\n+ * \\brief Per frame Lens shading correction red channel\n+ */\n+/**\n+ * \\var DebayerParams::LSC_blue\n+ * \\brief Per frame Lens shading correction red channel\n+ */\n+\n /**\n  * \\class Debayer\n  * \\brief Base debayering class\n",
    "prefixes": [
        "2/7"
    ]
}