Show a patch.

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

{
    "id": 27416,
    "url": "https://patchwork.libcamera.org/api/patches/27416/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/27416/",
    "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": "<20260720-libipa-algorithms-v6-24-ececb73f97cb@ideasonboard.com>",
    "date": "2026-07-20T14:59:42",
    "name": "[v6,24/31] ipa: libipa: lsc: Document Components parsing",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1ba27d76aa745ad74f74bddbded38fd6d8ec2387",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/27416/mbox/",
    "series": [
        {
            "id": 6067,
            "url": "https://patchwork.libcamera.org/api/series/6067/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6067",
            "date": "2026-07-20T14:59:18",
            "name": "ipa: libipa: Introduce libipa algorithms",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/6067/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/27416/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/27416/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 E15CDC32FE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Jul 2026 15:00:17 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5D1C067E95;\n\tMon, 20 Jul 2026 17:00:17 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B89F267E6F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 16:59:54 +0200 (CEST)",
            "from [192.168.1.106] (mob-5-90-63-152.net.vodafone.it\n\t[5.90.63.152])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BF1203398;\n\tMon, 20 Jul 2026 16:58:55 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qDzxEU+k\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1784559536;\n\tbh=EIoRTYcRxBXUh/gCEob8/0V/PQOEtmC11Bd6tGcGu5A=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=qDzxEU+kSM2qcL/qF0ooN2jp7pJKG6fDwkvelTQtPq4GaHKDyvDlim3qNU45OWbNu\n\tL5whSinyeaxtblYHOZCRq3O+blDz+Xx7hxS9HhmUUf07NqK4LlPe/i/56DXsSf52Fg\n\tlFUN+Sb2h1qlNAgyesqYZLkfqeSzEe2cuFsw1994=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Date": "Mon, 20 Jul 2026 16:59:42 +0200",
        "Subject": "[PATCH v6 24/31] ipa: libipa: lsc: Document Components parsing",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260720-libipa-algorithms-v6-24-ececb73f97cb@ideasonboard.com>",
        "References": "<20260720-libipa-algorithms-v6-0-ececb73f97cb@ideasonboard.com>",
        "In-Reply-To": "<20260720-libipa-algorithms-v6-0-ececb73f97cb@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org, \n\tStefan Klug <stefan.klug@ideasonboard.com>, \n\tMilan Zamazal <mzamazal@redhat.com>",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "X-Mailer": "b4 0.14.3",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=4373;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=EIoRTYcRxBXUh/gCEob8/0V/PQOEtmC11Bd6tGcGu5A=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqXjfZ9uc5U5gMfEcl2UzFtdpHVCMyvay6kPJMv\n\tm5U8q31M9SJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCal432QAKCRByNAaPFqFW\n\tPFbXD/9TFbN6MIPtl/7CjzjIfmB6GKbNSZScxpIDenUBv2WVC0YIVc2yugonrxss2uTYsQM6OMZ\n\tEJa5X9BTIdk3b+ce4l5VAIbObQaFU3yr8CkwYcYlKyc5CX9HT4inZNFmXFk6nHJHhyPI2lvdjSz\n\tTUVJNuvE/UlbBKm7Dwfrnp690RTX47vzuHt/pfNwhKAN0g23y4Hx7eBzHNFIWw+Q96XqjIfuWui\n\tGcb66OrR5zHl456+P47BM+JSRd57YAojCnJwXbcxVeGUHBL+UuyGaD6l+PJgMaMipImuZJpXsm3\n\tEjs2m4aXEZCpi9BEprjJGT3jo8C0oTXYHzLhwTbFxrCMqErS5Pr3OCEtChB3x/I36aUz/Tvgujq\n\tDiD2xrbpu/CYmhRDKIc2yaPJVTurSArw7UUbV8IiV1qY4I6klCFSqwNkwcwkpEUZXAfckqGaXJA\n\t/nTbaby/K7LnclApx/GTBTHHtmzWezNEugSKz53uiuAziZh/2V14UNcz6V2AKZrAw5fHImBLLIx\n\tRQtqESU6XjKOFVDI5kGtFwpS/R6U6oDOsMbkcEnglvgX8st68g8QEkrS1TJy8O7J8xYPET9aSp2\n\tX37B95sCFxVslYQg+WfaNj8THuEioTC7Farrzocm/Z+HAg2/JxtnBz2yQiZrr3t2M7iScu+10zK\n\tJwJGZC2SRN+srmQ==",
        "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B",
        "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": "Document with examples how different IPA modules parse the tuning\nfile depending on the number of colour channels they support.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/libipa/lsc.cpp | 111 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 111 insertions(+)",
    "diff": "diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp\nindex 831f6b003df1..32626049a2e2 100644\n--- a/src/ipa/libipa/lsc.cpp\n+++ b/src/ipa/libipa/lsc.cpp\n@@ -68,6 +68,117 @@ namespace lsc {\n  * tables are indexed by colour temperature with per-colour-components vectors\n  * of gain values or polynomial coefficients.\n  *\n+ * The colour components names are IPA-implementation specific and depend on the\n+ * ISP LSC engine design. Some LSC engine support 4 colour components (r, gr,\n+ * gb, b), some only support 3 colour components (r, g, b). The name (and\n+ * number) of the expected colour components shall be provided to\n+ * LscAlgorithm::init() using the LscDescriptor::keys field.\n+ *\n+ * Example of a tabular lens shading tuning file with 'r', 'g' and 'b' colour\n+ * components. The gain table has been omitted here, but the expected number\n+ * of entries has to be equal to\n+ * LscDescriptor::numHSamples * LscDescriptor::numVSamples.\n+ *\n+ * \\code{.yaml}\n+ * - Lsc:\n+ *    sets:\n+ *      - ct: 2500\n+ *        r: [\n+ *        \t.. gains table omitted..\n+ *        ]\n+ *        g: [\n+ *        \t.. gains table omitted..\n+ *        ]\n+ *        b: [\n+ *        \t.. gains table omitted..\n+ *        ]\n+ *      - ct: 6500\n+ *        r: [\n+ *        \t.. gains table omitted..\n+ *        ]\n+ *        g: [\n+ *        \t.. gains table omitted..\n+ *        ]\n+ *        b: [\n+ *        \t.. gains table omitted..\n+ *        ]\n+ * \\endcode\n+ *\n+ * Example of a polynomial lens shading tuning file with 'r', 'gr', 'gb' and 'b'\n+ * colour components:\n+ *\n+ * \\code{.yaml}\n+ * - Lsc:\n+ *    type: \"polynomial\"\n+ *    sets:\n+ *      - ct: 2500\n+ *        r:\n+ *          cx: 0.5006571711950275\n+ *          cy: 0.510093737499277\n+ *          k0: 1.5393282208428813\n+ *          k1: -1.1434559757908016\n+ *          k2: 4.332602305814554\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *        gr:\n+ *          cx: 0.5009320529087338\n+ *          cy: 0.511208038949085\n+ *          k0: 1.5634738574805407\n+ *          k1: -1.5623484259968348\n+ *          k2: 4.846686073656501\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *        gb:\n+ *          cx: 0.5012013290343839\n+ *          cy: 0.5128251541578288\n+ *          k0: 1.526147944919103\n+ *          k1: -1.4316976083689723\n+ *          k2: 4.792604063222728\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *        b:\n+ *          cx: 0.49864139511067784\n+ *          cy: 0.5162095081739346\n+ *          k0: 1.0405245474038738\n+ *          k1: 0.05618339879447103\n+ *          k2: 1.8792813594001752\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *      - ct: 6000\n+ *        r:\n+ *          cx: 0.5006202239353942\n+ *          cy: 0.5099531318307661\n+ *          k0: 1.4702946023945032\n+ *          k1: -0.8893767547927631\n+ *          k2: 3.920547732201387\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *        gr:\n+ *          cx: 0.500907874178317\n+ *          cy: 0.511084916024106\n+ *          k0: 1.5336172760559457\n+ *          k1: -1.39964026514435\n+ *          k2: 4.565487728954618\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *        gb:\n+ *          cx: 0.5011898608900477\n+ *          cy: 0.5126797906745105\n+ *          k0: 1.5013145790354843\n+ *          k1: -1.2747407173754124\n+ *          k2: 4.514682876897286\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ *        b:\n+ *          cx: 0.4987561413116136\n+ *          cy: 0.5159619420778772\n+ *          k0: 1.0102986422191802\n+ *          k1: 0.13263449763985727\n+ *          k2: 1.686556107316064\n+ *          k3: 0.0\n+ *          k4: 0.0\n+ * \\endcode\n+ *\n  * At LscAlgorithm::configure() time the LSC tables are re-sampled on the\n  * sensor's crop rectangle in use to adapt them to the configuration in use for\n  * a streaming session. Polynomial LSC tables support re-sampling and can be\n",
    "prefixes": [
        "v6",
        "24/31"
    ]
}