From patchwork Wed Jul 8 15:51: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: 27326 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 0F328C3318 for ; Wed, 8 Jul 2026 15:51:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5F486660EE; Wed, 8 Jul 2026 17:51:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c6yXRBU1"; 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 213BC660BE for ; Wed, 8 Jul 2026 17:51:18 +0200 (CEST) Received: from [192.168.1.182] (93-46-82-201.ip106.fastwebnet.it [93.46.82.201]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 53B013FB7; Wed, 8 Jul 2026 17:50:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1783525828; bh=ZQB2/8/lfwl0b3X1amVOEn3MSG9P/pJyN8UbLOUxTSE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=c6yXRBU12MRAQal9cJREuD8K7cfaxLslgQ40NW4mg1oPIVbhm36Brnm8tI0xc6TMu r2Ui6MShe5/oMdnh57lt+VDCFx4dVywTh5snRgOjl+XtKxeDLv8+pZGi4iHyy+aSQh jFUU2Te/wZDA9bFMdnRcDv2+M29eb7OC7Zz9KPIc= From: Jacopo Mondi Date: Wed, 08 Jul 2026 17:51:01 +0200 Subject: [PATCH v5 19/36] ipa: libipa: lsc_base: Add sampleForCrop documentation MIME-Version: 1.0 Message-Id: <20260708-libipa-algorithms-v5-19-0759d0359f52@ideasonboard.com> References: <20260708-libipa-algorithms-v5-0-0759d0359f52@ideasonboard.com> In-Reply-To: <20260708-libipa-algorithms-v5-0-0759d0359f52@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=1459; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=ZQB2/8/lfwl0b3X1amVOEn3MSG9P/pJyN8UbLOUxTSE=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqTnHnMiLNSER5oAgaxDfZZp6izihxUAE6ik4su 88W7ogQBL6JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCak5x5wAKCRByNAaPFqFW PF0xD/9mZ8rnC7bCPXpHWGrsN4krpDftJqgx3Oz/AaISJB7bJUtbqXO1W761OnqgpG8gLGJawtR Woc4K6xmxcxj5MTUir9xIBG+ELITkzkW87k2uzRPHFU4f+nb1DJmW6UPVnvXK8iCkErGWjCqSeP TJzn9x7/75PvfMziVi3jZZamr89Q+GAHg4hlC08VRBQ926ip76PYXOrIHbB9F41DXhMWAw2h71f zWyksXBxccuAIzfFWCSMBCojYJx1AwgATUp+Wt/08rWkm4jFMBuVQJ+BXwka9w+ltAbTDolF5vy FmaqRQsu186QtOX/cUwbFuoZRy6tceVwYEy1URtaxOJG7+Q1d6dwBhBJguJk8KkxAHz7hxLqLDG RTTIx8yRl4yhtK60ZMeLZpxe4RDPIcdlQCXKGfMjrEqsuyl5HuzTTsP8x4kooXKV0egnTTMe+9E 9v30Ex8zAG80y1Cug6l8RF0WgrPBKA+mDrjd8JPgyOp5Fiz5bjo3lPKHtnEEyH71kUs6gDy+/aW HSYgBhmAO5mtmLowa1LXQq6NAmfSyPgT8ZlInJMmC3LRvDEdB0mUk9f47l1JPZ00lPl2kF9gc4I 5jqi/cK+X4TbcQKqId7vuqDYxj3mvgfKHH2PdQmFYf0pKoPoMF/24RuaSHCzJDvBvFSoTzFfInF AjAe203yQmffTaw== 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 945020794b57..678ba8a9a808 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 */