Show a patch.

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

{
    "id": 26523,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/26523/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26523/",
    "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": "<20260420183949.110548-3-mzamazal@redhat.com>",
    "date": "2026-04-20T18:39:40",
    "name": "[RFC,v2,2/8] libcamera: software_isp: Add LSC data to DebayerParams",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "958e983362be7c3566ad57856699e8e4572953ff",
    "submitter": {
        "id": 177,
        "url": "https://patchwork.libcamera.org/api/1.1/people/177/?format=api",
        "name": "Milan Zamazal",
        "email": "mzamazal@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26523/mbox/",
    "series": [
        {
            "id": 5883,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5883/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5883",
            "date": "2026-04-20T18:39:38",
            "name": "LSC for SoftISP simple pipeline",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5883/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26523/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26523/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 73A14BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Apr 2026 18:40:10 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3AAD862EE2;\n\tMon, 20 Apr 2026 20:40:10 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CD3662ED7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Apr 2026 20:40:07 +0200 (CEST)",
            "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-687-o7AMKVsEM3ieEPr_bvSkuA-1;\n\tMon, 20 Apr 2026 14:40:03 -0400",
            "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.93])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 471D81956088; Mon, 20 Apr 2026 18:40:02 +0000 (UTC)",
            "from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.44.48.16])\n\tby mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 1D6E8180047F; Mon, 20 Apr 2026 18:39:59 +0000 (UTC)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"AeJGSyI1\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1776710406;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=wyg3vFIG4dJxLaBsUjHBlBfxdNCFBHSGXi+Ae4I9/UI=;\n\tb=AeJGSyI1lI8yawhCbT45SyezeFbUnwnRAxDCXqBJU8J3CECaPVEV7cy3Zev+70iq6uV7jY\n\tAdX+uRb9BlEw/GB0FAqIBjibxeBlGxxzVQwD0M4ki7HUMbw0LpoPqIBeOUoX90ZQWuWDkG\n\tkJ8jRG5hr6a7w7rcdRQ39ufQRDSHe74=",
        "X-MC-Unique": "o7AMKVsEM3ieEPr_bvSkuA-1",
        "X-Mimecast-MFC-AGG-ID": "o7AMKVsEM3ieEPr_bvSkuA_1776710402",
        "From": "Milan Zamazal <mzamazal@redhat.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Xander Pronk <xander.c.pronk@gmail.com>,\n\tHans de Goede <johannes.goede@oss.qualcomm.com>,\n\tRick ten Wolde <rick_libcamera@wolde.info>,\n\tMilan Zamazal <mzamazal@redhat.com>",
        "Subject": "[RFC PATCH v2 2/8] libcamera: software_isp: Add LSC data to\n\tDebayerParams",
        "Date": "Mon, 20 Apr 2026 20:39:40 +0200",
        "Message-ID": "<20260420183949.110548-3-mzamazal@redhat.com>",
        "In-Reply-To": "<20260420183949.110548-1-mzamazal@redhat.com>",
        "References": "<20260420183949.110548-1-mzamazal@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "zjW7VX9jWfzSJ89lE7KYXYo2KQluHYfLuRTVKvSImnE_1776710402",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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 a lookup table for grid-based lens shading correction to debayer\nparams.  The lookup table is in the format of an RGB texture to be\npassed to debayering.\n\nThe parameter is filled in by LSC algorithm implemented in a followup\npatch.  If the algorithm is not enabled, the parameter content is\narbitrary and the parameter may not be used.  The parameter is currently\nunused, its handling is implemented in a followup patch.\n\nThere is no special meaning about the selected grid size, it's\njust one of the smaller common sizes.\n\nCo-developed-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>\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\n---\n .../internal/software_isp/debayer_params.h     |  5 +++++\n src/libcamera/software_isp/debayer.cpp         | 18 ++++++++++++++++++\n 2 files changed, 23 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 6772b43bc..3f25d3219 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -10,6 +10,7 @@\n \n #pragma once\n \n+#include <array>\n #include <stdint.h>\n \n #include \"libcamera/internal/matrix.h\"\n@@ -25,6 +26,10 @@ struct DebayerParams {\n \tfloat gamma = 1.0;\n \tfloat contrastExp = 1.0;\n \tRGB<float> gains = RGB<float>({ 1.0, 1.0, 1.0 });\n+\n+\tstatic constexpr unsigned int kLscGridSize = 16;\n+\tusing LscLookupTable = std::array<uint8_t, 3 * kLscGridSize * kLscGridSize>;\n+\tLscLookupTable lscLut{};\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex a6bceb58b..b60ebcd9b 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -49,6 +49,24 @@ namespace libcamera {\n  * \\brief Contrast value to be used as an exponent\n  */\n \n+/**\n+ * \\var DebayerParams::kLscGridSize\n+ * \\brief Number of lens shading grid areas in one direction\n+ */\n+\n+/**\n+ * \\typedef DebayerParams::LscLookupTable\n+ * \\brief Lookup table for lens shading correction\n+ *\n+ * It's an array of bytes to be later used as a texture.\n+ * The bytes are in row - column - RGB order.\n+ */\n+\n+/**\n+ * \\var DebayerParams::lscLut\n+ * \\brief Lens shading lookup table\n+ */\n+\n /**\n  * \\class Debayer\n  * \\brief Base debayering class\n",
    "prefixes": [
        "RFC",
        "v2",
        "2/8"
    ]
}