[{"id":39752,"web_url":"https://patchwork.libcamera.org/comment/39752/","msgid":"<74ddd0a4-1fd7-4452-a952-da0806a153a9@collabora.com>","date":"2026-07-17T16:26:45","subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi Milan, thanks for working on this!\n\nI just tried to apply the patches in order to play around with them - \nhowever it looks like they haven't yet rebased on top of 0.7.2 / doesn't \napply to master. When you have time would you mind sending a rebased \nversion?\n\nBest regards,\n\nRobert\n\nOn 17.07.26 00:25, Milan Zamazal wrote:\n> Lens shading correction for software GPU ISP.  Based on the initial work\n> by Hans’s students, taken over and significantly modified and eventually\n> reworked to use LSC from libipa (the ongoing work by Jacopo and others).\n>\n> The LSC is not implemented for CPU ISP within this series; it may be\n> added later if needed.\n>\n> It’s RFC because:\n>\n> - It’s not yet completely tested although it seems to be working in my\n>    environment.\n> - It’s based on the libipa patches not yet merged.\n> - Further changes will be needed once GPU ISP multipass is merged.\n>\n> Example YAML for grid based LSC, no-op values, place it after Awb:\n>\n>    - Lsc:\n>        sets:\n>          - ct: 6500\n>            r: [\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>            ]\n>            g: [\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>            ]\n>            b: [\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>            ]\n>\n> Example YAML for polynomial based LSC, no-op values, place it after Awb:\n>\n>   - Lsc:\n>       type: \"polynomial\"\n>       sets:\n>         - ct: 6500\n>           r:\n>             cx: 0.0\n>             cy: 0.0\n>             k0: 0.0\n>             k1: 0.0\n>             k2: 0.0\n>             k3: 0.0\n>             k4: 0.0\n>           g:\n>             cx: 0.0\n>             cy: 0.0\n>             k0: 0.0\n>             k1: 0.0\n>             k2: 0.0\n>             k3: 0.0\n>             k4: 0.0\n>           b:\n>             cx: 0.0\n>             cy: 0.0\n>             k0: 0.0\n>             k1: 0.0\n>             k2: 0.0\n>             k3: 0.0\n>             k4: 0.0\n>\n> Changes in v8:\n> - LscValueType removed.\n> - A named constant introduced for minimum temperature change.\n> - A clarification comment added to the LUT value computation.\n> - lsc-enabled shader flag and the related variables removed.\n> - Wording corrections suggested by Bryan.\n>\n> Changes in v7:\n> - Updated for libipa patches v5 (temperature access).\n>\n> Changes in v6:\n> - Rebased on Jacopo’s libipa patches (v3).\n> - Not updating LSC tables on small or no temperature changes.\n> - Using libipa LSC algorithms; the implementation in ‘simple’ IPA\n>    algorithm reduced to the minimum needed.\n> - Grid tables are defined using integers rather than floats, because\n>    libipa LSC supports only quantised values and not floats.\n> - New boolean uniform to enable or disable LSC dynamically, rather than\n>    only in shaders compile time; to be able to honour the LSC control.\n> - Specific handling of polynomial LSC removed.  Polynomial LSC is\n>    already handled by libipa, by making a grid-based LSC from it.  While\n>    a direct polynomial computation may be a bit faster with a minimum\n>    number of the polynomial coefficients, the simplicity wins.  If we\n>    liked to have direct polynomial LSC computation, it should be\n>    implemented with help of libipa.\n>\n> Changes in v5:\n> - ‘grids’ tuning file item renamed to ‘sets’ for consistency with rkisp1.\n> - Underscores appended to Lsc::lsc* names.\n> - Other minor stylistic changes.\n> - Proof-of-concept polynomial LSC implemented.\n>\n> Changes in v4:\n> - glFilterParam -> param\n> - Indentation changes in the shaders.\n> - A commit message part about temperature reworded.\n> - Updated for YamlObject -> ValueNode.\n> - New constant kLscValuesPerCell to distinguish between the constants\n>    for the params array size (values) and for the stride (bytes).\n> - The lookup array switched to floats and the texture to half-floats.\n>\n> Changes in v3:\n> - LSC scripts patch dropped due to missing licences.\n> - DO_LSC -> APPLY_LSC\n> - textureUniformLsc_ is assigned unconditionally now.\n> - New constant DebayerParams::kLscBytesPerCell.\n> - LSC values in the tuning file are floats now and converted to bytes internally.\n> - Source code comments added to clarify the usage of the byte LUTs.\n>\n> Changes in v2:\n> - Remaining issues from the reviews (hopefully) addressed.\n> - Especially there is only a single texture now and LSC is fully\n>    conditional.\n> - Major cleanup, hacks removed or replaced, typo fixes, cosmetic\n>    changes, making linters happy, etc.\n> - See\n>    https://lists.libcamera.org/pipermail/libcamera-devel/2026-January/056883.html\n>    for an example how to add the grid data.\n>\n> Milan Zamazal (1):\n>    libcamera: software_isp: Pass LSC availability to debayering\n>\n> Xander Pronk (5):\n>    libcamera: software_isp: egl: Add filter parameter to\n>      createTexture2D()\n>    libcamera: software_isp: Add LSC data to DebayerParams\n>    ipa: simple: Add LSC algorithm\n>    libcamera: shaders: Add LSC support\n>    libcamera: software_isp: debayer_egl: Add LSC support\n>\n>   include/libcamera/internal/egl.h              |   6 +-\n>   .../internal/software_isp/debayer_params.h    |   9 ++\n>   .../internal/software_isp/software_isp.h      |   1 +\n>   include/libcamera/ipa/soft.mojom              |   4 +-\n>   src/ipa/simple/algorithms/lsc.cpp             | 100 ++++++++++++++++++\n>   src/ipa/simple/algorithms/lsc.h               |  50 +++++++++\n>   src/ipa/simple/algorithms/meson.build         |   1 +\n>   src/ipa/simple/ipa_context.h                  |   6 ++\n>   src/ipa/simple/soft_simple.cpp                |   7 +-\n>   src/libcamera/egl.cpp                         |  17 ++-\n>   src/libcamera/shaders/bayer_1x_packed.frag    |   8 ++\n>   src/libcamera/shaders/bayer_unpacked.frag     |   8 ++\n>   src/libcamera/software_isp/debayer.cpp        |  29 +++++\n>   src/libcamera/software_isp/debayer.h          |   3 +-\n>   src/libcamera/software_isp/debayer_cpu.cpp    |   3 +-\n>   src/libcamera/software_isp/debayer_cpu.h      |   3 +-\n>   src/libcamera/software_isp/debayer_egl.cpp    |  34 +++++-\n>   src/libcamera/software_isp/debayer_egl.h      |  10 +-\n>   src/libcamera/software_isp/software_isp.cpp   |   5 +-\n>   19 files changed, 286 insertions(+), 18 deletions(-)\n>   create mode 100644 src/ipa/simple/algorithms/lsc.cpp\n>   create mode 100644 src/ipa/simple/algorithms/lsc.h\n>","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 24838C3303\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 17 Jul 2026 16:26:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C87F67E48;\n\tFri, 17 Jul 2026 18:26:56 +0200 (CEST)","from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com\n\t[136.143.188.11])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5277567E3E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 17 Jul 2026 18:26:54 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1784305608527307.8836397756643;\n\tFri, 17 Jul 2026 09:26:48 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"XhYHVumm\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1784305611; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=mE1EV+dDgQXnDoqMogNMWECvRaUzeSOmngp0K83f8fg1CnzJHkranhdew5A1DZiC+wHrBqCsgisE6DNnVr1rtMZ5KzKzPxhaVRP88/atrKmtvj9/GPax2eKXQBlicJ9K7E9bOreew6vz4b6dbQKujFJWZMDhJqzMyCmw3Bor02s=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1784305611;\n\th=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=yXFSDH00c+c04jtEpyqP1h6drqUBCWN5uLL0RLBKIAI=; \n\tb=U+N4bTk3kUaTmj2NQBKcta92WSd2/i+hz7iIph04KYMafX+UCoYIO2yRTQnZYbhqEud4kjqXWz+MbCpvPkzH8E75wbMbLpGxH2L/VT+UZ2HnjbdnuZkhJkSWhMfiWfoxDabSVC0IKHugboYkBCxMfxBXc3ehQpTb/R0MU30Cd74=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1784305611;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=yXFSDH00c+c04jtEpyqP1h6drqUBCWN5uLL0RLBKIAI=;\n\tb=XhYHVummVwDtIHceETNJQL7l8466XGJP1uGmZYDb31JIbKiCMQItW5hqD4BDOcng\n\tvumGbVJrll/SBCQ3f+8apbk/UB4hiuy7oGEd6sZDfQ2ShPe6vt7COTPN06OubMemTLH\n\tgulJSusw3xqtZck9qHhxQtWOwjDE2gOwYFt2CJ6Q=","Message-ID":"<74ddd0a4-1fd7-4452-a952-da0806a153a9@collabora.com>","Date":"Fri, 17 Jul 2026 18:26:45 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Bryan O'Donoghue <bod.linux@nxsw.ie>,\n\tHans de Goede <johannes.goede@oss.qualcomm.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20260716222515.251464-1-mzamazal@redhat.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260716222515.251464-1-mzamazal@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":39755,"web_url":"https://patchwork.libcamera.org/comment/39755/","msgid":"<85qzkyjbzj.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-07-20T08:34:24","subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> Hi Milan, thanks for working on this!\n>\n> I just tried to apply the patches in order to play around with them - however it looks like they haven't\n> yet rebased on top of 0.7.2 / doesn't apply to master. When you have time would you mind sending a rebased\n> version?\n\nHi Robert,\n\nthe patches are on top of Jacopo's libipa patches (v5 currently), so I\ncan rebase only there.\n\n> Best regards,\n>\n> Robert\n>\n> On 17.07.26 00:25, Milan Zamazal wrote:\n>> Lens shading correction for software GPU ISP.  Based on the initial work\n>> by Hans’s students, taken over and significantly modified and eventually\n>> reworked to use LSC from libipa (the ongoing work by Jacopo and others).\n>>\n>> The LSC is not implemented for CPU ISP within this series; it may be\n>> added later if needed.\n>>\n>> It’s RFC because:\n>>\n>> - It’s not yet completely tested although it seems to be working in my\n>>    environment.\n>> - It’s based on the libipa patches not yet merged.\n>> - Further changes will be needed once GPU ISP multipass is merged.\n>>\n>> Example YAML for grid based LSC, no-op values, place it after Awb:\n>>\n>>    - Lsc:\n>>        sets:\n>>          - ct: 6500\n>>            r: [\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>            ]\n>>            g: [\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>            ]\n>>            b: [\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>              64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>            ]\n>>\n>> Example YAML for polynomial based LSC, no-op values, place it after Awb:\n>>\n>>   - Lsc:\n>>       type: \"polynomial\"\n>>       sets:\n>>         - ct: 6500\n>>           r:\n>>             cx: 0.0\n>>             cy: 0.0\n>>             k0: 0.0\n>>             k1: 0.0\n>>             k2: 0.0\n>>             k3: 0.0\n>>             k4: 0.0\n>>           g:\n>>             cx: 0.0\n>>             cy: 0.0\n>>             k0: 0.0\n>>             k1: 0.0\n>>             k2: 0.0\n>>             k3: 0.0\n>>             k4: 0.0\n>>           b:\n>>             cx: 0.0\n>>             cy: 0.0\n>>             k0: 0.0\n>>             k1: 0.0\n>>             k2: 0.0\n>>             k3: 0.0\n>>             k4: 0.0\n>>\n>> Changes in v8:\n>> - LscValueType removed.\n>> - A named constant introduced for minimum temperature change.\n>> - A clarification comment added to the LUT value computation.\n>> - lsc-enabled shader flag and the related variables removed.\n>> - Wording corrections suggested by Bryan.\n>>\n>> Changes in v7:\n>> - Updated for libipa patches v5 (temperature access).\n>>\n>> Changes in v6:\n>> - Rebased on Jacopo’s libipa patches (v3).\n>> - Not updating LSC tables on small or no temperature changes.\n>> - Using libipa LSC algorithms; the implementation in ‘simple’ IPA\n>>    algorithm reduced to the minimum needed.\n>> - Grid tables are defined using integers rather than floats, because\n>>    libipa LSC supports only quantised values and not floats.\n>> - New boolean uniform to enable or disable LSC dynamically, rather than\n>>    only in shaders compile time; to be able to honour the LSC control.\n>> - Specific handling of polynomial LSC removed.  Polynomial LSC is\n>>    already handled by libipa, by making a grid-based LSC from it.  While\n>>    a direct polynomial computation may be a bit faster with a minimum\n>>    number of the polynomial coefficients, the simplicity wins.  If we\n>>    liked to have direct polynomial LSC computation, it should be\n>>    implemented with help of libipa.\n>>\n>> Changes in v5:\n>> - ‘grids’ tuning file item renamed to ‘sets’ for consistency with rkisp1.\n>> - Underscores appended to Lsc::lsc* names.\n>> - Other minor stylistic changes.\n>> - Proof-of-concept polynomial LSC implemented.\n>>\n>> Changes in v4:\n>> - glFilterParam -> param\n>> - Indentation changes in the shaders.\n>> - A commit message part about temperature reworded.\n>> - Updated for YamlObject -> ValueNode.\n>> - New constant kLscValuesPerCell to distinguish between the constants\n>>    for the params array size (values) and for the stride (bytes).\n>> - The lookup array switched to floats and the texture to half-floats.\n>>\n>> Changes in v3:\n>> - LSC scripts patch dropped due to missing licences.\n>> - DO_LSC -> APPLY_LSC\n>> - textureUniformLsc_ is assigned unconditionally now.\n>> - New constant DebayerParams::kLscBytesPerCell.\n>> - LSC values in the tuning file are floats now and converted to bytes internally.\n>> - Source code comments added to clarify the usage of the byte LUTs.\n>>\n>> Changes in v2:\n>> - Remaining issues from the reviews (hopefully) addressed.\n>> - Especially there is only a single texture now and LSC is fully\n>>    conditional.\n>> - Major cleanup, hacks removed or replaced, typo fixes, cosmetic\n>>    changes, making linters happy, etc.\n>> - See\n>>    https://lists.libcamera.org/pipermail/libcamera-devel/2026-January/056883.html\n>>    for an example how to add the grid data.\n>>\n>> Milan Zamazal (1):\n>>    libcamera: software_isp: Pass LSC availability to debayering\n>>\n>> Xander Pronk (5):\n>>    libcamera: software_isp: egl: Add filter parameter to\n>>      createTexture2D()\n>>    libcamera: software_isp: Add LSC data to DebayerParams\n>>    ipa: simple: Add LSC algorithm\n>>    libcamera: shaders: Add LSC support\n>>    libcamera: software_isp: debayer_egl: Add LSC support\n>>\n>>   include/libcamera/internal/egl.h              |   6 +-\n>>   .../internal/software_isp/debayer_params.h    |   9 ++\n>>   .../internal/software_isp/software_isp.h      |   1 +\n>>   include/libcamera/ipa/soft.mojom              |   4 +-\n>>   src/ipa/simple/algorithms/lsc.cpp             | 100 ++++++++++++++++++\n>>   src/ipa/simple/algorithms/lsc.h               |  50 +++++++++\n>>   src/ipa/simple/algorithms/meson.build         |   1 +\n>>   src/ipa/simple/ipa_context.h                  |   6 ++\n>>   src/ipa/simple/soft_simple.cpp                |   7 +-\n>>   src/libcamera/egl.cpp                         |  17 ++-\n>>   src/libcamera/shaders/bayer_1x_packed.frag    |   8 ++\n>>   src/libcamera/shaders/bayer_unpacked.frag     |   8 ++\n>>   src/libcamera/software_isp/debayer.cpp        |  29 +++++\n>>   src/libcamera/software_isp/debayer.h          |   3 +-\n>>   src/libcamera/software_isp/debayer_cpu.cpp    |   3 +-\n>>   src/libcamera/software_isp/debayer_cpu.h      |   3 +-\n>>   src/libcamera/software_isp/debayer_egl.cpp    |  34 +++++-\n>>   src/libcamera/software_isp/debayer_egl.h      |  10 +-\n>>   src/libcamera/software_isp/software_isp.cpp   |   5 +-\n>>   19 files changed, 286 insertions(+), 18 deletions(-)\n>>   create mode 100644 src/ipa/simple/algorithms/lsc.cpp\n>>   create mode 100644 src/ipa/simple/algorithms/lsc.h\n>>","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 C15FCBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Jul 2026 08:34:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 977ED66135;\n\tMon, 20 Jul 2026 10:34:32 +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 9CCB6660AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 10:34:30 +0200 (CEST)","from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n\t[209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-551-WB4puBDQM6-nZ-wv6oYntQ-1; Mon, 20 Jul 2026 04:34:27 -0400","by mail-wr1-f70.google.com with SMTP id\n\tffacd0b85a97d-47eaa4006a1so1830509f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 01:34:27 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-47f63ed2313sm27316434f8f.23.2026.07.20.01.34.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 20 Jul 2026 01:34:25 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"SX4xkQ2t\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1784536469;\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=EYOrJS0zFDEzvUZSTkf4LTRp3frRKv3bF5iCmQyuHCk=;\n\tb=SX4xkQ2t5OGhhWLbhbAeMjvXw16zFT9i36hmz5CVitVHiq9WJyvTHYp8/D/pkL8eyCPkuC\n\tLMOKfkgHzZ1UQbbJvPXcnfiS81b8GUNVf5mA/I80VFxc/rr7TJEs+xb9BPQcv1JVuiHu0V\n\tpG4o7N8ghRZ91KvIX+J+pVa9VpBVjak=","X-MC-Unique":"WB4puBDQM6-nZ-wv6oYntQ-1","X-Mimecast-MFC-AGG-ID":"WB4puBDQM6-nZ-wv6oYntQ_1784536466","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1784536466; x=1785141266;\n\th=content-transfer-encoding:content-type:mime-version:user-agent\n\t:message-id:date:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to\n\t:content-type;\n\tbh=EYOrJS0zFDEzvUZSTkf4LTRp3frRKv3bF5iCmQyuHCk=;\n\tb=soWZjeYQppO/Xy5tgF5PPxXHTnD6yGM44TcDkAVNQigmc6LbcPGZmK9XJryDDhv0TZ\n\tTOlBlqYI49Thxq6i2mtoJHuVWNTjejelm/26GVvt2WrTLPvrMlTH/9N10AIesF5vPa07\n\tprbiesuwtj4ZRcVjXHxMnMwDR4JtX5RZ0M/899L6JLAAQQkaRZgdmcseMi3icafqpfJS\n\tyjb9WbdMN528hvPBGanrJVKY3clU0jkgwPGYgPfyU3CS2+wrKDpMRIcnrwJ+r5RKHRjm\n\thPWM/rkYq3ZOWv3RnXz+9m22Eg1MVrAKE2f3uQCxqW8hZvNY7sPS9kkz/7DlQw0/lG1G\n\tU9Zw==","X-Gm-Message-State":"AOJu0Ywk/sCXp3hk35yFhthA6MvlwEulI327KguswkBpsBrP+8P6CYVS\n\tZ6YGSOu9LMykbyH/ZYb1aq1uFrGG56W4ZARTikeMcI4dUVrWarb/jkEd2UGxqb92YuDrkQF40lV\n\tove8LZ0msINy/TIId+rpEKDV9QnG+Gn3l0LwEOyiSU8kLKlINh2alpVOQhkJJhOAR1whmz6NaTU\n\tc=","X-Gm-Gg":"AfdE7clQv9jnIz/bE1EgqxL1E3MNL4WT8W5nEoTaGd7lcowqwGo+CDjexUztn9l8fLa\n\t+5kQW7PB0+zHS8xE6l8jkGOrP3Ph1m1W0DOG2vYab/14dGHh/+s1quiPWBNK7dKWNaaPXVqG3R6\n\t3iJyvvTWV89HL/6+Sd+b4h/aqgMggBHZT3sky+jGjcHIZ4sdhuXmGzCJHpSUd/VYDyHZ+nlkTv/\n\tZ1Lngusn6LcLPjCE1IMAtqyUiIMaOYX/slERPZ455+FUO2kQA5FtAQo6PIMr0gVg7GLIF686Ibb\n\tJjmhVtfQ1iA4P43/ETCBegq4Pt52gnm3TKZtQNc/EQr56QZIY1kQwB8M4teCdxRFnf8qonLjJT9\n\tvJUAgthxZEq1V4EjhXKVCViTKTcg+Q0gaTibF2UQ6ZfGQQ+9jLn7nOg==","X-Received":["by 2002:a05:6000:250e:b0:47f:4834:99cd with SMTP id\n\tffacd0b85a97d-47f5a66292bmr22266678f8f.26.1784536466253; \n\tMon, 20 Jul 2026 01:34:26 -0700 (PDT)","by 2002:a05:6000:250e:b0:47f:4834:99cd with SMTP id\n\tffacd0b85a97d-47f5a66292bmr22266626f8f.26.1784536465786; \n\tMon, 20 Jul 2026 01:34:25 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org,  Bryan O'Donoghue\n\t<bod.linux@nxsw.ie>, Hans de Goede <johannes.goede@oss.qualcomm.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","In-Reply-To":"<74ddd0a4-1fd7-4452-a952-da0806a153a9@collabora.com> (Robert\n\tMader's message of \"Fri, 17 Jul 2026 18:26:45 +0200\")","References":"<20260716222515.251464-1-mzamazal@redhat.com>\n\t<74ddd0a4-1fd7-4452-a952-da0806a153a9@collabora.com>","Date":"Mon, 20 Jul 2026 10:34:24 +0200","Message-ID":"<85qzkyjbzj.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"S_hy5YiRZF3hdWlV_LbYKHIqhmLP9KalQ7AqMCC8_2I_1784536466","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>"}},{"id":39756,"web_url":"https://patchwork.libcamera.org/comment/39756/","msgid":"<0ca6717a-297d-45bc-b3f6-91983233e2d0@collabora.com>","date":"2026-07-20T08:46:36","subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi Milan,\n\nOn 20.07.26 10:34, Milan Zamazal wrote:\n> Robert Mader <robert.mader@collabora.com> writes:\n>\n>> Hi Milan, thanks for working on this!\n>>\n>> I just tried to apply the patches in order to play around with them - however it looks like they haven't\n>> yet rebased on top of 0.7.2 / doesn't apply to master. When you have time would you mind sending a rebased\n>> version?\n> Hi Robert,\n>\n> the patches are on top of Jacopo's libipa patches (v5 currently), so I\n> can rebase only there.\n\nah, you mean when using his git branch instead of patchwork? Because \napplying the patch file (git am) of that series \n(https://patchwork.libcamera.org/series/6048/mbox/) against master works \nfine - suggestion a simle git rebase on master should also work. Either \nway, we can wait for a v6 and ask to rebase the branch.\n\nThanks and best regards,\n\nRobert\n\nP.S.: would be pretty cool if b4 shazam would work with patchwork :P\n\n>> Best regards,\n>>\n>> Robert\n>>\n>> On 17.07.26 00:25, Milan Zamazal wrote:\n>>> Lens shading correction for software GPU ISP.  Based on the initial work\n>>> by Hans’s students, taken over and significantly modified and eventually\n>>> reworked to use LSC from libipa (the ongoing work by Jacopo and others).\n>>>\n>>> The LSC is not implemented for CPU ISP within this series; it may be\n>>> added later if needed.\n>>>\n>>> It’s RFC because:\n>>>\n>>> - It’s not yet completely tested although it seems to be working in my\n>>>     environment.\n>>> - It’s based on the libipa patches not yet merged.\n>>> - Further changes will be needed once GPU ISP multipass is merged.\n>>>\n>>> Example YAML for grid based LSC, no-op values, place it after Awb:\n>>>\n>>>     - Lsc:\n>>>         sets:\n>>>           - ct: 6500\n>>>             r: [\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>>             ]\n>>>             g: [\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>>             ]\n>>>             b: [\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>>             ]\n>>>\n>>> Example YAML for polynomial based LSC, no-op values, place it after Awb:\n>>>\n>>>    - Lsc:\n>>>        type: \"polynomial\"\n>>>        sets:\n>>>          - ct: 6500\n>>>            r:\n>>>              cx: 0.0\n>>>              cy: 0.0\n>>>              k0: 0.0\n>>>              k1: 0.0\n>>>              k2: 0.0\n>>>              k3: 0.0\n>>>              k4: 0.0\n>>>            g:\n>>>              cx: 0.0\n>>>              cy: 0.0\n>>>              k0: 0.0\n>>>              k1: 0.0\n>>>              k2: 0.0\n>>>              k3: 0.0\n>>>              k4: 0.0\n>>>            b:\n>>>              cx: 0.0\n>>>              cy: 0.0\n>>>              k0: 0.0\n>>>              k1: 0.0\n>>>              k2: 0.0\n>>>              k3: 0.0\n>>>              k4: 0.0\n>>>\n>>> Changes in v8:\n>>> - LscValueType removed.\n>>> - A named constant introduced for minimum temperature change.\n>>> - A clarification comment added to the LUT value computation.\n>>> - lsc-enabled shader flag and the related variables removed.\n>>> - Wording corrections suggested by Bryan.\n>>>\n>>> Changes in v7:\n>>> - Updated for libipa patches v5 (temperature access).\n>>>\n>>> Changes in v6:\n>>> - Rebased on Jacopo’s libipa patches (v3).\n>>> - Not updating LSC tables on small or no temperature changes.\n>>> - Using libipa LSC algorithms; the implementation in ‘simple’ IPA\n>>>     algorithm reduced to the minimum needed.\n>>> - Grid tables are defined using integers rather than floats, because\n>>>     libipa LSC supports only quantised values and not floats.\n>>> - New boolean uniform to enable or disable LSC dynamically, rather than\n>>>     only in shaders compile time; to be able to honour the LSC control.\n>>> - Specific handling of polynomial LSC removed.  Polynomial LSC is\n>>>     already handled by libipa, by making a grid-based LSC from it.  While\n>>>     a direct polynomial computation may be a bit faster with a minimum\n>>>     number of the polynomial coefficients, the simplicity wins.  If we\n>>>     liked to have direct polynomial LSC computation, it should be\n>>>     implemented with help of libipa.\n>>>\n>>> Changes in v5:\n>>> - ‘grids’ tuning file item renamed to ‘sets’ for consistency with rkisp1.\n>>> - Underscores appended to Lsc::lsc* names.\n>>> - Other minor stylistic changes.\n>>> - Proof-of-concept polynomial LSC implemented.\n>>>\n>>> Changes in v4:\n>>> - glFilterParam -> param\n>>> - Indentation changes in the shaders.\n>>> - A commit message part about temperature reworded.\n>>> - Updated for YamlObject -> ValueNode.\n>>> - New constant kLscValuesPerCell to distinguish between the constants\n>>>     for the params array size (values) and for the stride (bytes).\n>>> - The lookup array switched to floats and the texture to half-floats.\n>>>\n>>> Changes in v3:\n>>> - LSC scripts patch dropped due to missing licences.\n>>> - DO_LSC -> APPLY_LSC\n>>> - textureUniformLsc_ is assigned unconditionally now.\n>>> - New constant DebayerParams::kLscBytesPerCell.\n>>> - LSC values in the tuning file are floats now and converted to bytes internally.\n>>> - Source code comments added to clarify the usage of the byte LUTs.\n>>>\n>>> Changes in v2:\n>>> - Remaining issues from the reviews (hopefully) addressed.\n>>> - Especially there is only a single texture now and LSC is fully\n>>>     conditional.\n>>> - Major cleanup, hacks removed or replaced, typo fixes, cosmetic\n>>>     changes, making linters happy, etc.\n>>> - See\n>>>     https://lists.libcamera.org/pipermail/libcamera-devel/2026-January/056883.html\n>>>     for an example how to add the grid data.\n>>>\n>>> Milan Zamazal (1):\n>>>     libcamera: software_isp: Pass LSC availability to debayering\n>>>\n>>> Xander Pronk (5):\n>>>     libcamera: software_isp: egl: Add filter parameter to\n>>>       createTexture2D()\n>>>     libcamera: software_isp: Add LSC data to DebayerParams\n>>>     ipa: simple: Add LSC algorithm\n>>>     libcamera: shaders: Add LSC support\n>>>     libcamera: software_isp: debayer_egl: Add LSC support\n>>>\n>>>    include/libcamera/internal/egl.h              |   6 +-\n>>>    .../internal/software_isp/debayer_params.h    |   9 ++\n>>>    .../internal/software_isp/software_isp.h      |   1 +\n>>>    include/libcamera/ipa/soft.mojom              |   4 +-\n>>>    src/ipa/simple/algorithms/lsc.cpp             | 100 ++++++++++++++++++\n>>>    src/ipa/simple/algorithms/lsc.h               |  50 +++++++++\n>>>    src/ipa/simple/algorithms/meson.build         |   1 +\n>>>    src/ipa/simple/ipa_context.h                  |   6 ++\n>>>    src/ipa/simple/soft_simple.cpp                |   7 +-\n>>>    src/libcamera/egl.cpp                         |  17 ++-\n>>>    src/libcamera/shaders/bayer_1x_packed.frag    |   8 ++\n>>>    src/libcamera/shaders/bayer_unpacked.frag     |   8 ++\n>>>    src/libcamera/software_isp/debayer.cpp        |  29 +++++\n>>>    src/libcamera/software_isp/debayer.h          |   3 +-\n>>>    src/libcamera/software_isp/debayer_cpu.cpp    |   3 +-\n>>>    src/libcamera/software_isp/debayer_cpu.h      |   3 +-\n>>>    src/libcamera/software_isp/debayer_egl.cpp    |  34 +++++-\n>>>    src/libcamera/software_isp/debayer_egl.h      |  10 +-\n>>>    src/libcamera/software_isp/software_isp.cpp   |   5 +-\n>>>    19 files changed, 286 insertions(+), 18 deletions(-)\n>>>    create mode 100644 src/ipa/simple/algorithms/lsc.cpp\n>>>    create mode 100644 src/ipa/simple/algorithms/lsc.h\n>>>","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 84513BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Jul 2026 08:46:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B00E666151;\n\tMon, 20 Jul 2026 10:46:48 +0200 (CEST)","from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com\n\t[136.143.188.11])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 679B8660AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 10:46:46 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1784537199609802.0745209447052;\n\tMon, 20 Jul 2026 01:46:39 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"LjF8nQcx\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1784537200; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=gg4OKB9hL/3fp6Nvx1/PzAA8pujqBQuVPX2x8RytoeLmsMn0cgPt+BtAONfeBce9wRF6UMHa6q54d71gxlrFapkody8qNfA1jYDV4X/il7suk6rInSGkWxmDf9FXMT1zpcfag7N6shFS4FyDBoI7VaFAqeLQtbBdgANrFt+T/3Q=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1784537200;\n\th=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=hIUIobrvj8jpa5A9++CCmcK+i/2RnwU1XPgfzml7fE4=; \n\tb=ZA56Iz/BMkDh08rqQCz+VcieiG13PSuobcdoC1QB6YgcyniuQ3cHyhQBvnD+F+SV6OD9eXXqGLmKX6YjRD/JIKf1cP5/RzGWcWcdnteL4RuMErmCZuE3NSCYlPZ0sDJ5Y9RXwvETarDoq3I9BIZHg7Y18zJs2IQRNP4xO+zEEKM=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1784537200;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=hIUIobrvj8jpa5A9++CCmcK+i/2RnwU1XPgfzml7fE4=;\n\tb=LjF8nQcx4VDMMFMRLvZjIEFlznlfWaninlv1eptxKYRh/VPErT6UWK/0J8ENBvYO\n\tkL1TQ8sCU+BA8/TjnNsSMJcQWFMPI7xgGeWNv6MV+l8pAyvPEfh/Q9HYmF6p1VYf/IO\n\tJhjfE25s6jWvP7dkB5z9NktcH2visJrtBsjmBwlc=","Message-ID":"<0ca6717a-297d-45bc-b3f6-91983233e2d0@collabora.com>","Date":"Mon, 20 Jul 2026 10:46:36 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Bryan O'Donoghue\n\t<bod.linux@nxsw.ie>, Hans de Goede <johannes.goede@oss.qualcomm.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20260716222515.251464-1-mzamazal@redhat.com>\n\t<74ddd0a4-1fd7-4452-a952-da0806a153a9@collabora.com>\n\t<85qzkyjbzj.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<85qzkyjbzj.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":39757,"web_url":"https://patchwork.libcamera.org/comment/39757/","msgid":"<85ldb6j7z2.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-07-20T10:01:05","subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> Hi Milan,\n>\n> On 20.07.26 10:34, Milan Zamazal wrote:\n>> Robert Mader <robert.mader@collabora.com> writes:\n>>\n>>> Hi Milan, thanks for working on this!\n>>>\n>>> I just tried to apply the patches in order to play around with them - however it looks like they\n>>> haven't\n>>> yet rebased on top of 0.7.2 / doesn't apply to master. When you have time would you mind sending a\n>>> rebased\n>>> version?\n>> Hi Robert,\n>>\n>> the patches are on top of Jacopo's libipa patches (v5 currently), so I\n>> can rebase only there.\n>\n> ah, you mean when using his git branch instead of patchwork? Because applying the patch file (git am) of\n> that series (https://patchwork.libcamera.org/series/6048/mbox/) against master works fine - suggestion a\n> simle git rebase on master should also work. \n\nOK, they apply fine so I have no excuse not to update my part :-), done.\n\n> Either way, we can wait for a v6 and ask to rebase the branch.\n>\n> Thanks and best regards,\n>\n> Robert\n>\n> P.S.: would be pretty cool if b4 shazam would work with patchwork :P\n>\n>>> Best regards,\n>>>\n>>> Robert\n>>>\n>>> On 17.07.26 00:25, Milan Zamazal wrote:\n>>>> Lens shading correction for software GPU ISP.  Based on the initial work\n>>>> by Hans’s students, taken over and significantly modified and eventually\n>>>> reworked to use LSC from libipa (the ongoing work by Jacopo and others).\n>>>>\n>>>> The LSC is not implemented for CPU ISP within this series; it may be\n>>>> added later if needed.\n>>>>\n>>>> It’s RFC because:\n>>>>\n>>>> - It’s not yet completely tested although it seems to be working in my\n>>>>     environment.\n>>>> - It’s based on the libipa patches not yet merged.\n>>>> - Further changes will be needed once GPU ISP multipass is merged.\n>>>>\n>>>> Example YAML for grid based LSC, no-op values, place it after Awb:\n>>>>\n>>>>     - Lsc:\n>>>>         sets:\n>>>>           - ct: 6500\n>>>>             r: [\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>>>             ]\n>>>>             g: [\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>>>             ]\n>>>>             b: [\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n>>>>               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64\n>>>>             ]\n>>>>\n>>>> Example YAML for polynomial based LSC, no-op values, place it after Awb:\n>>>>\n>>>>    - Lsc:\n>>>>        type: \"polynomial\"\n>>>>        sets:\n>>>>          - ct: 6500\n>>>>            r:\n>>>>              cx: 0.0\n>>>>              cy: 0.0\n>>>>              k0: 0.0\n>>>>              k1: 0.0\n>>>>              k2: 0.0\n>>>>              k3: 0.0\n>>>>              k4: 0.0\n>>>>            g:\n>>>>              cx: 0.0\n>>>>              cy: 0.0\n>>>>              k0: 0.0\n>>>>              k1: 0.0\n>>>>              k2: 0.0\n>>>>              k3: 0.0\n>>>>              k4: 0.0\n>>>>            b:\n>>>>              cx: 0.0\n>>>>              cy: 0.0\n>>>>              k0: 0.0\n>>>>              k1: 0.0\n>>>>              k2: 0.0\n>>>>              k3: 0.0\n>>>>              k4: 0.0\n>>>>\n>>>> Changes in v8:\n>>>> - LscValueType removed.\n>>>> - A named constant introduced for minimum temperature change.\n>>>> - A clarification comment added to the LUT value computation.\n>>>> - lsc-enabled shader flag and the related variables removed.\n>>>> - Wording corrections suggested by Bryan.\n>>>>\n>>>> Changes in v7:\n>>>> - Updated for libipa patches v5 (temperature access).\n>>>>\n>>>> Changes in v6:\n>>>> - Rebased on Jacopo’s libipa patches (v3).\n>>>> - Not updating LSC tables on small or no temperature changes.\n>>>> - Using libipa LSC algorithms; the implementation in ‘simple’ IPA\n>>>>     algorithm reduced to the minimum needed.\n>>>> - Grid tables are defined using integers rather than floats, because\n>>>>     libipa LSC supports only quantised values and not floats.\n>>>> - New boolean uniform to enable or disable LSC dynamically, rather than\n>>>>     only in shaders compile time; to be able to honour the LSC control.\n>>>> - Specific handling of polynomial LSC removed.  Polynomial LSC is\n>>>>     already handled by libipa, by making a grid-based LSC from it.  While\n>>>>     a direct polynomial computation may be a bit faster with a minimum\n>>>>     number of the polynomial coefficients, the simplicity wins.  If we\n>>>>     liked to have direct polynomial LSC computation, it should be\n>>>>     implemented with help of libipa.\n>>>>\n>>>> Changes in v5:\n>>>> - ‘grids’ tuning file item renamed to ‘sets’ for consistency with rkisp1.\n>>>> - Underscores appended to Lsc::lsc* names.\n>>>> - Other minor stylistic changes.\n>>>> - Proof-of-concept polynomial LSC implemented.\n>>>>\n>>>> Changes in v4:\n>>>> - glFilterParam -> param\n>>>> - Indentation changes in the shaders.\n>>>> - A commit message part about temperature reworded.\n>>>> - Updated for YamlObject -> ValueNode.\n>>>> - New constant kLscValuesPerCell to distinguish between the constants\n>>>>     for the params array size (values) and for the stride (bytes).\n>>>> - The lookup array switched to floats and the texture to half-floats.\n>>>>\n>>>> Changes in v3:\n>>>> - LSC scripts patch dropped due to missing licences.\n>>>> - DO_LSC -> APPLY_LSC\n>>>> - textureUniformLsc_ is assigned unconditionally now.\n>>>> - New constant DebayerParams::kLscBytesPerCell.\n>>>> - LSC values in the tuning file are floats now and converted to bytes internally.\n>>>> - Source code comments added to clarify the usage of the byte LUTs.\n>>>>\n>>>> Changes in v2:\n>>>> - Remaining issues from the reviews (hopefully) addressed.\n>>>> - Especially there is only a single texture now and LSC is fully\n>>>>     conditional.\n>>>> - Major cleanup, hacks removed or replaced, typo fixes, cosmetic\n>>>>     changes, making linters happy, etc.\n>>>> - See\n>>>>     https://lists.libcamera.org/pipermail/libcamera-devel/2026-January/056883.html\n>>>>     for an example how to add the grid data.\n>>>>\n>>>> Milan Zamazal (1):\n>>>>     libcamera: software_isp: Pass LSC availability to debayering\n>>>>\n>>>> Xander Pronk (5):\n>>>>     libcamera: software_isp: egl: Add filter parameter to\n>>>>       createTexture2D()\n>>>>     libcamera: software_isp: Add LSC data to DebayerParams\n>>>>     ipa: simple: Add LSC algorithm\n>>>>     libcamera: shaders: Add LSC support\n>>>>     libcamera: software_isp: debayer_egl: Add LSC support\n>>>>\n>>>>    include/libcamera/internal/egl.h              |   6 +-\n>>>>    .../internal/software_isp/debayer_params.h    |   9 ++\n>>>>    .../internal/software_isp/software_isp.h      |   1 +\n>>>>    include/libcamera/ipa/soft.mojom              |   4 +-\n>>>>    src/ipa/simple/algorithms/lsc.cpp             | 100 ++++++++++++++++++\n>>>>    src/ipa/simple/algorithms/lsc.h               |  50 +++++++++\n>>>>    src/ipa/simple/algorithms/meson.build         |   1 +\n>>>>    src/ipa/simple/ipa_context.h                  |   6 ++\n>>>>    src/ipa/simple/soft_simple.cpp                |   7 +-\n>>>>    src/libcamera/egl.cpp                         |  17 ++-\n>>>>    src/libcamera/shaders/bayer_1x_packed.frag    |   8 ++\n>>>>    src/libcamera/shaders/bayer_unpacked.frag     |   8 ++\n>>>>    src/libcamera/software_isp/debayer.cpp        |  29 +++++\n>>>>    src/libcamera/software_isp/debayer.h          |   3 +-\n>>>>    src/libcamera/software_isp/debayer_cpu.cpp    |   3 +-\n>>>>    src/libcamera/software_isp/debayer_cpu.h      |   3 +-\n>>>>    src/libcamera/software_isp/debayer_egl.cpp    |  34 +++++-\n>>>>    src/libcamera/software_isp/debayer_egl.h      |  10 +-\n>>>>    src/libcamera/software_isp/software_isp.cpp   |   5 +-\n>>>>    19 files changed, 286 insertions(+), 18 deletions(-)\n>>>>    create mode 100644 src/ipa/simple/algorithms/lsc.cpp\n>>>>    create mode 100644 src/ipa/simple/algorithms/lsc.h\n>>>>","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 C1708BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Jul 2026 10:01:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 804AC6614D;\n\tMon, 20 Jul 2026 12:01:23 +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 0553B66122\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 12:01:21 +0200 (CEST)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-213-6g4Zz2M1NBeEor5xh1Zhfg-1; Mon, 20 Jul 2026 06:01:09 -0400","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-495495ad5ddso18334095e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 03:01:09 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4955fee64dasm51115005e9.10.2026.07.20.03.01.06\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 20 Jul 2026 03:01:06 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"YOjNup7t\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1784541681;\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=/1AZfSD5ilNGg3Rl1+CmGzqZ/ryFjTZIcSjqDt5dVrc=;\n\tb=YOjNup7tQKwFGza1tSonyY2C3Wkw7L8Z0WsNDEL+ng6L7sQcBraARsxryxEQl/KHDxK+W7\n\twl4WZejSV8fb/3dajuYxfDzPZZcOOonvqCDJwhfAP5HaHy+zgWsBmJE4+GtyNpOKF/qjgJ\n\tYnO0TvuwXOt5PX0ynC7Gh4c0f97w6D8=","X-MC-Unique":"6g4Zz2M1NBeEor5xh1Zhfg-1","X-Mimecast-MFC-AGG-ID":"6g4Zz2M1NBeEor5xh1Zhfg_1784541668","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1784541668; x=1785146468;\n\th=content-transfer-encoding:content-type:mime-version:user-agent\n\t:message-id:date:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to\n\t:content-type;\n\tbh=uL5jPGwbelZnV0+TYUeRNt5pJNE0hHyhc8ngo6rFiq0=;\n\tb=qb3PT7p2z3wvxitXEKWak+C7gDaHU4U9EoFQaKzDjXgGPPcfBbv2caPiwUTQutSsGH\n\tEMusXt5XaObwvMZOfpju/HwCHYx6DzwsQrdPQCD8htzl0gD7mKAJluhMvGl3Cw6oXLVY\n\tYpC15rQ6QG6uioopnB/mHeZickDvXTEFsbOiBRMhHnIEs0lqnU0q8QQRy+u0GGLGSYAC\n\tZFgGrUKdsUUBZ0ARac/6MnqI7T88iW8dcCYYaE1I1fYFB4PXYr5U9cFq0D0npVcelQur\n\tR2085f/OEAgZBzNVYlmulQssC/zU22omY1LToxGowOmHHdIfwxCXAkR+TtVhOnFcJAiZ\n\tSHhQ==","X-Gm-Message-State":"AOJu0YwAP+pUwWHFO4onKMsSWhITSYMraJ+Uuo6fResYG7BbfWniTpcc\n\trBLtIK8j+Avsm0ZAxNWz5HnXfhJjwItG2hkV+mtEL58Ya7i1UDwJoNoef6Nf4h+Ekhnscc/A1X8\n\t+3zpbxmotmwAhwGqZrxZ5wMvxg54mm5SfCwggG8hsTozd2XeqT8Nbz/DtyTVFg29805tjGVBXDn\n\tc=","X-Gm-Gg":"AfdE7ckz+NRPemthJzVT5j+Z+4bgm9sSC4cjeFFNy3Ojw+8IuJI3zJa84VBcSbODdYE\n\tYxnLFenSKxyUicQMJ6IkQCVJT5RJC4viNi2ZzeBvvLwN8q/695HzSHCKIa6aVJV2ReMxhcHHaVE\n\tvIRQF6PLLEzEVE+dzSPHiomB3WTRgeWJCsIW9Xs/wLEAdbMOHmo7X/Gjqblzg/+2T+BjL+3omtq\n\twcwTrw8leeZq01XY9Xh1uAjXB2VkbHOkDj9YepwjI3B+phtDkrOWm5Yf9ui7VnydlUNqswnXxLO\n\tk8VaWxp95G3DFBeUbDvDa+5Nk8hpOybqyO2LyrMPD6UgOGQ9dm4Be4duoOPS0ryMFXsovP4Ufda\n\txm1i+Xpq6BqGIx8Xmc3cuWc8N69XNDMRo1LMJjpHnqS4QOV4Icfe7gw==","X-Received":["by 2002:a05:600c:3553:b0:495:3a21:4e5d with SMTP id\n\t5b1f17b1804b1-4954a395fb3mr148310115e9.0.1784541668094; \n\tMon, 20 Jul 2026 03:01:08 -0700 (PDT)","by 2002:a05:600c:3553:b0:495:3a21:4e5d with SMTP id\n\t5b1f17b1804b1-4954a395fb3mr148309505e9.0.1784541667430; \n\tMon, 20 Jul 2026 03:01:07 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org,  Bryan O'Donoghue\n\t<bod.linux@nxsw.ie>, Hans de Goede <johannes.goede@oss.qualcomm.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [RFC PATCH v8 0/6] LSC for SoftISP simple pipeline","In-Reply-To":"<0ca6717a-297d-45bc-b3f6-91983233e2d0@collabora.com> (Robert\n\tMader's message of \"Mon, 20 Jul 2026 10:46:36 +0200\")","References":"<20260716222515.251464-1-mzamazal@redhat.com>\n\t<74ddd0a4-1fd7-4452-a952-da0806a153a9@collabora.com>\n\t<85qzkyjbzj.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<0ca6717a-297d-45bc-b3f6-91983233e2d0@collabora.com>","Date":"Mon, 20 Jul 2026 12:01:05 +0200","Message-ID":"<85ldb6j7z2.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"EybVETsyb8fCPogeQdp7jhdzGK471jP6pWwp0EmOJ-g_1784541668","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>"}}]