From patchwork Wed Aug 5 16:13:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 27642 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 C6CC5C3344 for ; Wed, 5 Aug 2026 16:13:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3659F68174; Wed, 5 Aug 2026 18:13:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FU6SYaHm"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C9C2368139 for ; Wed, 5 Aug 2026 18:13:36 +0200 (CEST) Received: from [192.168.125.177] (mob-109-113-25-35.net.vodafone.it [109.113.25.35]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1745739B6; Wed, 5 Aug 2026 18:12:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1785946346; bh=WYRREtMMsGnWekfpemz4LN4fohagCWU8KMsfNpvYOME=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FU6SYaHmFr3as/44flwkg3FtpKa40n7Pz27u3Zrq4pYnPwkSOUzvy6y/roZiErK0T cUKpf0Pv22hBLf6tf5VbQL7pn17I9pfukHWJRx3OoDjgNmkFs1JcG03vPmYfQlnKxe XHeaYAaMEfd9ROTkqBWBIPmUbEerNS/g8C0NXVw4= From: Jacopo Mondi Date: Wed, 05 Aug 2026 18:13:01 +0200 Subject: [PATCH v7 19/32] ipa: libipa: lsc_base: Add sampleForCrop documentation MIME-Version: 1.0 Message-Id: <20260805-libipa-algorithms-v7-19-7425b5b795d4@ideasonboard.com> References: <20260805-libipa-algorithms-v7-0-7425b5b795d4@ideasonboard.com> In-Reply-To: <20260805-libipa-algorithms-v7-0-7425b5b795d4@ideasonboard.com> To: libcamera-devel@lists.libcamera.org, Stefan Klug , Milan Zamazal Cc: Jacopo Mondi X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1459; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=WYRREtMMsGnWekfpemz4LN4fohagCWU8KMsfNpvYOME=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqc2EfLZhGSiAn6+wiG5mnbncHJ6C/L3atCzBYD oQ4CZGdweOJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCanNhHwAKCRByNAaPFqFW PPU5EACjbDOUYZoCWdoLforNCO7BPMDpzJZDXvWTVFj0+8GRDrMsYZ3kphNmsaXoiXmCuM4xwq5 b2V+BhtAkmasSmUPCU1feh1jcH2d6Cby1rl3l9g28xbj3Np0Ea5QpdWejp2VewhSj7BT6puePOr qXKQwYmtLqWY2kDT/6OkhRuJNaKW25uQx6gpS+D6Hn+rqf8sQKamm77OVF3tc0CiMGCR1MFvzzN 3EbNo2JmZ9nXZUjXQhlB8ge/8xzF7rEPoFZov93nNLDtuUyjPsvjc7ahw1tUcgQpXO8LNzoF236 WFKtP+Grj2wGntugQe5bDm2B1fkfql2hQmHsSuDoqkV1DpBEnww+Vg8hmpdKZYv/s+AHGuof1B2 cTn57VkYGTcyWxBEnsIE4OzyEkAna7aZBUPrONEMokwQaP3WIsBMGyQ7vAAUVJWKZGMbvPvG4ci mf2IIFlx5gQt5k0tEDpZJrgv7RQ8PYsWxVxH7C2yr5LFjazAexM2iEtu6RSuoVShhaTsK4SxOkU 3A4CMnh3WCwHJQxkIwX62SBzYQaTyvQPA8brHDgRWLhnuhky5vdR+lJ5rxKuoUlrood0pv953Xo zBvU7uLA6Sl2sUvcBjdgc1oGpP1HkcaQkVOMUTeCJsR8Qxn988rk4CrepuXcUxiSITC0DpxtiR3 +PYjU26P7/7Bxkw== 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 Reviewed-by: Kieran Bingham --- 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 b50460394925..1015cdc7cf4c 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 configurations 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 */