{"id":25855,"url":"https://patchwork.libcamera.org/api/1.1/covers/25855/?format=json","web_url":"https://patchwork.libcamera.org/cover/25855/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260120-sklug-lsc-resampling-v2-dev-v4-0-2411c4be6d6d@ideasonboard.com>","date":"2026-01-20T08:45:42","name":"[v4,00/14] Add resampling support for polynomial LSC data","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/1.1/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/25855/mbox/","series":[{"id":5720,"url":"https://patchwork.libcamera.org/api/1.1/series/5720/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5720","date":"2026-01-20T08:45:42","name":"Add resampling support for polynomial LSC data","version":4,"mbox":"https://patchwork.libcamera.org/series/5720/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/25855/comments/","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 DE445BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 08:45:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6D7561FC6;\n\tTue, 20 Jan 2026 09:45:56 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D14CE61F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 09:45:54 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:7f76:a386:d798:7544])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D7DD81733; \n\tTue, 20 Jan 2026 09:45:23 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Zc3x4caw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768898723;\n\tbh=lG1kS0cwfex2OydAZkXS8P+2U9Q4QnR+NjyaHKbtY/w=;\n\th=From:Subject:Date:To:Cc:From;\n\tb=Zc3x4cawm/0jGML6Yagrr5SfCshjHGu/vUW2UjJC/Q9PpW1d2jwS1hvCxWI/LwxVB\n\t2tEPVQORvm7WlUhaSaGtTg8AXR/AjwPQ1veSVgZVyIxZbu74MRr6H4l+R2YFX+6hjM\n\tGa2DuM905ncr7eaDt5pA+J27kwcJODLGXuhSJ6RQ=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","Subject":"[PATCH v4 00/14] Add resampling support for polynomial LSC data","Date":"Tue, 20 Jan 2026 09:45:42 +0100","Message-Id":"<20260120-sklug-lsc-resampling-v2-dev-v4-0-2411c4be6d6d@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","X-B4-Tracking":"v=1; b=H4sIALZAb2kC/33NQQ6CMBCF4auQrq0ppbbgynsYF9AZoBFa0mqjI\n\tdzdQmLiwrCa/LP43kwCeoOBnLOZeIwmGGdTiENGdF/bDqmB1IQzLlnOFA334dnRIWjqMdTjNBj\n\tb0cgpYKSg1EmwJlcSkCRh8tia16Zfb6l7Ex7Ov7exyNfv1y133XQYRVly1KKpyqq4GMA6ONu42\n\tsNRu5GsfCx+yFzsk0UiS6aBi1YAyPwPuSzLB/jbij0gAQAA","X-Change-ID":"20260107-sklug-lsc-resampling-v2-dev-d77540b176de","To":"libcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P?=\n\t=?utf-8?b?xZFjemU=?= <barnabas.pocze@ideasonboard.com>,\n\tRui Wang <rui.wang@ideasonboard.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>","X-Mailer":"b4 0.14.2","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":"In [1] support for polynomial lens shading tables was implement up to\nthe same feature level of grid based lens shading tables. However\nresampling the LSC table for a given analog crop rectangle was never\nimplemented.\n\nThis series partially fixes that by implementing resampling for\npolynomial LSC data. Resampling for tabular LSC data is left open for\nimplementation if need arises.\n\nPatches 1-7 apply some code cleanup that got mentioned on the last\nseries after it was merged.\n\nPatches 8-10 apply further cleanup and are new in v2 of the series.\n\nPatches 11-13 implement the actual resampling.\n\nPatche 14 implements a LensShadingCorrectionEnable control that is\nnecessary to assess the effect of LSC in practice.\n\nBest regards,\nStefan\n\n[1] https://patchwork.libcamera.org/project/libcamera/list/?series=4609&archive=both&state=*\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\nChanges in v4:\n- Dropped removal of controls::draft::LensShadingMapMode and squashed\n  patches 14 and 15\n- Minor fixes from review (see local changelogs)\n- Link to v3: https://patchwork.libcamera.org/project/libcamera/list/?series=5707\n\nChanges in v3:\n- Added LensShadingCorrectionEnable to metadata\n- Improved colour temperature quantization code\n- Tiny fixes (see local changelogs)\n- Link to v2: https://patchwork.libcamera.org/project/libcamera/list/?series=5697\n\nChanges in v2:\n- Collected tags\n- Applied small fixes from review\n- Additional cleanup by patches 8-10 to improve the prepare() function\n- A bit more rework on the resampling patches due to preceding changes\n\n---\nStefan Klug (14):\n      ipa: rkisp1: lsc: Drop unused member variable\n      ipa: rkisp1: lsc: Drop unused function declaration\n      ipa: rkisp1: lsc: Replace assert with ASSERT\n      ipa: rkisp1: lsc: Rename res to positions\n      ipa: rkisp1: lsc: Rename res to ret\n      ipa: rkisp1: lsc: Rename res to samples\n      ipa: rksip1: lsc: Move function definitions out of class\n      ipa: rkisp1: lsc: Move local types into anonymous namespace\n      ipa: rkisp1: lsc: Handle quantization locally\n      ipa: libipa: interpolator: Drop key quantization\n      ipa: rkisp1: lsc: Pass sampling positions into samplePolynomial\n      ipa: rkisp1: lsc: Pass crop rectangle as parameter\n      ipa: rkisp1: lsc: Resample polynomial lens shading tables at configure time\n      ipa: rkisp1: Introduce LensShadingCorrectionEnable control\n\n src/ipa/libipa/interpolator.cpp     |  25 +-\n src/ipa/libipa/interpolator.h       |  14 +-\n src/ipa/rkisp1/algorithms/dpf.cpp   |   2 +-\n src/ipa/rkisp1/algorithms/lsc.cpp   | 505 +++++++++++++++++++++++-------------\n src/ipa/rkisp1/algorithms/lsc.h     |  24 +-\n src/ipa/rkisp1/ipa_context.h        |  13 +-\n src/libcamera/control_ids_core.yaml |   9 +\n test/ipa/libipa/interpolator.cpp    |   7 -\n 8 files changed, 360 insertions(+), 239 deletions(-)\n---\nbase-commit: c63f2c72cd7b278584dcc70b8294063e89b01ca1\nchange-id: 20260107-sklug-lsc-resampling-v2-dev-d77540b176de\n\nBest regards,"}