From patchwork Mon Jul 6 08:01:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 27218 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 EC0E2C3308 for ; Mon, 6 Jul 2026 08:02:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6BB8866050; Mon, 6 Jul 2026 10:02:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WC6IXRhI"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 49A3866020 for ; Mon, 6 Jul 2026 10:02:09 +0200 (CEST) Received: from [192.168.125.177] (mob-109-113-60-81.net.vodafone.it [109.113.60.81]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 04E4E3FB2; Mon, 6 Jul 2026 10:01:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1783324881; bh=Xw4RkjyI4aHlrd1nRNO7E5mB7e/vwariTzp8M0iWH74=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WC6IXRhIxStTzidNWmARvet7bYiDa7ZGP+lCoIuTfhQWXLjk4IVbGb6uObke7hUeI rQC70ILkPQxmuLsD0xdgbFZSKTZqr/iIi8DstVgjDZISdu8GEv5YEo8tqz1H0EGO1i sSAuf+5fRjxAkvXVyxN1oDaUJIv4YAdHoacn97jE= From: Jacopo Mondi Date: Mon, 06 Jul 2026 10:01:38 +0200 Subject: [PATCH v3 18/35] ipa: libipa: lsc_base: Add sampleForCrop documentation MIME-Version: 1.0 Message-Id: <20260706-libipa-algorithms-v3-18-968757b038bb@ideasonboard.com> References: <20260706-libipa-algorithms-v3-0-968757b038bb@ideasonboard.com> In-Reply-To: <20260706-libipa-algorithms-v3-0-968757b038bb@ideasonboard.com> To: libcamera-devel@lists.libcamera.org, Stefan Klug Cc: Jacopo Mondi X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1444; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=Xw4RkjyI4aHlrd1nRNO7E5mB7e/vwariTzp8M0iWH74=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqS2DxKro/8/JRvI4o0UshwHU/rSjaES0TMev6X PJ+6amKxM6JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaktg8QAKCRByNAaPFqFW PGzcEACZZhY8Wq07MAAzpMQ3Iv0E9rJIlBa1rIBPf0130Ob7EAvPaSR52ZyW21TOef9wQMDFTH4 cqAVpTeSwZQfGLAY9xv5MXpB/BXKpWXOSyLGZeonEX1Coodd74vzNc5qaGcZFD2m8IEss0t0Hgz 2lgAL8h51FvuUQx82XsQOo4wPubFwc4YglGnfTqihYufoYGx/c0jksambfBSA2Ci8+rGMZoDZPc KqGgA0XzCTtfNdgD0qxhHTiin2vNUaOcbW3DzNfWIPjpwU2aTzAmA4TJsFAGoZLu8j3MxhOV9cW 4PDakIGGy5qe/dtyBACAZIxANxaGKQqGcliKag6ZrQtcnCs8kqAbHGiG9UjqvodAB+062ZYXind wXNfUGDBrzLae3MkOdmG0UbDgK5nvjHRqwQYVgF+r5751/xp5yakD3beKnk20WjuyxsfPkD/3sH jNZb+0pEQqIqYaAsWzWt0vDvzcbq1lQVlAK+vATIxy63NSUhYY+focX/prLeM7tHISKywThV5lC yaW8njyd/+6MsGwIhRpNJJkPG61jCM5GJ/tANEIBt3GFbFRGv3DJ6KpLD1dofar76ZDq32Pe33G fua5NiL+0kAOWb4k/dysG6bBa2vAdHfUn1zWul77o9XQJn9v3F48mFuhz0mFlbtpUu0GWIbl+FM jXvOxkr4T3ikwsQ== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B 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" Now that we have two in-tree implementations of LscImplementation detail how the two perform lsc gain re-sampling. Signed-off-by: Jacopo Mondi --- src/ipa/libipa/lsc_base.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ipa/libipa/lsc_base.cpp b/src/ipa/libipa/lsc_base.cpp index bddf131b85e2..b055249c066a 100644 --- a/src/ipa/libipa/lsc_base.cpp +++ b/src/ipa/libipa/lsc_base.cpp @@ -103,6 +103,21 @@ void Interpolator:: * each segment of size 0.0625 and the list of nodes position will be * [0, 0.0625, 0.125, 0.1875, ... , 1]. It is expected that the first position * is 0 and the last position is 1. + * + * Lsc tables are expressed in two formats: + * - A list of gain values (LscTable) + * - A radial polynomial (LscPolynomial) + * + * Table-based lsc tables are generated using an image at a fixed resolution and + * can't at the moment be re-sampled when a different resolution is used for a + * streaming session. Re-sampling a grid lsc table will return the same table + * as loaded from the tuning file. + * + * \todo: Implement grid based re-sampling + * + * Polynomial are more flexible and can be re-sampled for a given sensor frame + * resolution using a list of horizontal and vertical nodes that define the lsc + * grid on which the polynomial is re-sampled on. */ } /* namespace ipa */