From patchwork Tue Oct 14 07:52:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24616 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 42151BF415 for ; Tue, 14 Oct 2025 07:53:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 80CF06052F; Tue, 14 Oct 2025 09:52:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="HnMAtWVg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0ACC160316 for ; Tue, 14 Oct 2025 09:52:58 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:61fb:8e55:ff1e:be62]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 77591741; Tue, 14 Oct 2025 09:51:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760428279; bh=yPZh8JMdADJLjhM3ciXxlXLrLg5LLcVLIGt4nfHqyVk=; h=From:To:Cc:Subject:Date:From; b=HnMAtWVgTbw++rr2bwwt9fUl55xD+OmoTlEgA6WT15ogDaNBj7j122uUup279BIOx yG1klWIei1bq/JteGwGRgEbZzDqOurMxOmJ+5DHrYlnoW+jmOFI34tb83NPOsbaDLb S7AsiJPx5NjhO/R1/F4AXjHzvGCdd6RFgQvEM9+o= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v1 00/12] Add resampling support for polynomial LSC data Date: Tue, 14 Oct 2025 09:52:22 +0200 Message-ID: <20251014075252.2876485-1-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In [1] support polynomial lens shading tables was implement up to the same feature level of grid based lens shading tables. However resampling the LSC table for a given analog crop rectangle was never implemented. This series partially fixes that by implementing resampling for polynomial LSC data. Resampling for tabular LSC data is left open for implementation if need arises. Patches 1-7 apply some code cleanup that got mentioned on the last series after it was merged. Patches 8-10 implement the actual resampling. Patches 11-12 implement a LensShadingEnable control that is necessary to assess the effect of LSC in practice. Patch 11 resurrects an old patch from Jacopo [2]. These last two patches could be stripped off the series if needed. Best regards, Stefan [1] https://patchwork.libcamera.org/project/libcamera/list/?series=4609&archive=both&state=* [2] https://patchwork.libcamera.org/project/libcamera/list/?series=3795&archive=both&state=* Stefan Klug (12): ipa: rkisp1: lsc: Drop unused member variable ipa: rkisp1: lsc: Drop unused function declaration ipa: rkisp1: lsc: Replace assert with ASSERT ipa: rkisp1: lsc: Rename res to positions ipa: rkisp1: lsc: Rename res to ret ipa: rkisp1: lsc: Rename res to samples ipa: rksip1: lsc: Move function definitions out of class ipa: rkisp1: lsc: Pass sampling positions into samplePolynomial ipa: rkisp1: lsc: Pass crop rectangle as parameter ipa: rkisp1: lsc: Resample polynomial lens shading tables at configure time libcamera: control_ids: Introduce LensShadingEnable ipa: rkisp1: Add LensShadingEnable control src/android/camera_capabilities.cpp | 4 +- src/ipa/rkisp1/algorithms/dpf.cpp | 2 +- src/ipa/rkisp1/algorithms/lsc.cpp | 454 ++++++++++++++++----------- src/ipa/rkisp1/algorithms/lsc.h | 21 +- src/ipa/rkisp1/ipa_context.h | 12 +- src/libcamera/control_ids_core.yaml | 9 + src/libcamera/control_ids_draft.yaml | 14 - 7 files changed, 315 insertions(+), 201 deletions(-)