From patchwork Mon Jul 20 14:59:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 27410 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 5D44BC3334 for ; Mon, 20 Jul 2026 15:00:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D572067E9E; Mon, 20 Jul 2026 17:00:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EY0IdF4C"; 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 DFC8567E6A for ; Mon, 20 Jul 2026 16:59:51 +0200 (CEST) Received: from [192.168.1.106] (mob-5-90-63-152.net.vodafone.it [5.90.63.152]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 14688258D; Mon, 20 Jul 2026 16:58:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1784559533; bh=WYRREtMMsGnWekfpemz4LN4fohagCWU8KMsfNpvYOME=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EY0IdF4CathMbXPKFTRI7MCV6KmDKYN8ZbX0DW9XrwHpBP4xG94/ax7z5ozwgvnKe 38sDJMjU5OJbV2bOoIN/lXEtaFCg2Odsz1HG+bT8VMS5nGPKYeFXyHwQUIbSMADKvq gfLOuVobEG8j33IscU2t1nOaZcjQhCxgSp4vTx7U= From: Jacopo Mondi Date: Mon, 20 Jul 2026 16:59:37 +0200 Subject: [PATCH v6 19/31] ipa: libipa: lsc_base: Add sampleForCrop documentation MIME-Version: 1.0 Message-Id: <20260720-libipa-algorithms-v6-19-ececb73f97cb@ideasonboard.com> References: <20260720-libipa-algorithms-v6-0-ececb73f97cb@ideasonboard.com> In-Reply-To: <20260720-libipa-algorithms-v6-0-ececb73f97cb@ideasonboard.com> To: libcamera-devel@lists.libcamera.org, Stefan Klug , Milan Zamazal Cc: Jacopo Mondi X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1459; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=WYRREtMMsGnWekfpemz4LN4fohagCWU8KMsfNpvYOME=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqXjfY/Sfb4nPV6mPVmSsANnJEBHtj50MKPuN2a SQZiBpxx0iJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCal432AAKCRByNAaPFqFW PPETD/9H0mJiFKwvWD3105IXCK1Gx0f2DcPVmz26e0wW/5o+PlHCBDaNoelIfh5YnI5Bn4sU6Hl OuhRJ2D8Q/Cw4Nf7tYZztWYPltlATxLsMvhLtSCpE1HRK+hriOIdH1L2/ZlRL9+nRsFHSBmWjEQ TQItwQgL8sh8dCaOpBuVMRe6lfqrWOs+oP9EtrYUMyaIG8IMNOLDkaLMW1UoL4duGJ3M4T3BBKC lTWMm6Qt8+bIH7FRTq1n1nti9ys3srv96hWRvmu0nGNK3MeD/0Luhi5sJc5lJbeY1vm7IPksY0g QXquHDKr80K46M1vd4Li8jbu+6JnslXaENB8E/8kGUoULSogBlwGQq4Hne/grO2nqLKY0sSs6Iy Z7ckEBzXtIuLgcS/AXiQ257bvLWF90ueo1O9y46FLbw+5H+aHGLB6pqTD1awBH8Ac7zhUGnQ5/Q fGqJNsMhxPQEgH+lELke1v5ryk7WOddlCGcNPb+NSdV3qjpYQ81XtNj5aS9KFJZTj4/mE7dI55b c/YsuMxlJ798dITHJ05/akDlcnwPazcSeZPBWk9/avUZD/U8Ij9Aslmt3czUuJocsMHcE3B2DfZ hg4IBhugsATpmpeFCHlYEfUm1l/PTsJyZes1i5semjBQo2ywL0mQszf8Cgrt6djkpjR+0l9vE47 oGgxeJgCIQ0XrbQ== 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 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 */