From patchwork Wed Jul 8 09:25:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 27292 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 3AAE4C333A for ; Wed, 8 Jul 2026 09:25:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C9AAB66098; Wed, 8 Jul 2026 11:25:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JxUAW8A+"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F3D96609B for ; Wed, 8 Jul 2026 11:25:13 +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 B79C31CFD; Wed, 8 Jul 2026 11:24:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1783502663; bh=MRTK0aOxYFXDosRsnpj0oYQp6lv1gMPMd910d2p1od0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JxUAW8A+zKxlDZoNsxoBfjhYiyGi7D3Zrfb300hCgxChiihukwVpLq1NPJIa9rsXe gWE7GfBetDLslihohoWQFEpsZIrxrzBAS4MumGHI5Ot7y+X3pFSIlsMRKU9nlH6dDW goMlgReBOktl1q7aErgFIaZQb6By+Ta++MbP8DsQ= From: Jacopo Mondi Date: Wed, 08 Jul 2026 11:25:14 +0200 Subject: [PATCH v4 27/35] ipa: libipa: lsc_polynomial: Remove sensorSize_ MIME-Version: 1.0 Message-Id: <20260708-libipa-algorithms-v4-27-f0e99f035294@ideasonboard.com> References: <20260708-libipa-algorithms-v4-0-f0e99f035294@ideasonboard.com> In-Reply-To: <20260708-libipa-algorithms-v4-0-f0e99f035294@ideasonboard.com> To: libcamera-devel@lists.libcamera.org, Stefan Klug Cc: Jacopo Mondi , Kieran Bingham X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3254; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=MRTK0aOxYFXDosRsnpj0oYQp6lv1gMPMd910d2p1od0=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqThdvmfQw/9/RzQZJL5NQHcdi1jaKu1mlk2y28 LJlfjU9rW2JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCak4XbwAKCRByNAaPFqFW PFCND/sESeWf1aZTT9lpH/rrhOXpitjPXagGW//CFN4B/BwZr/OdKhZ4Evc3edb5XMln/PJ8S40 6r11wApQO7tPrGx1IAPnYoox0i4rUp/ZpjCBaBWqnzfXhKfkEGoyw68lt8OZlXcAgWnAQstaAzR jwTse3jocELUZ+3SsWLbFzNx7t8mWpUB9Y13kfHdVhY7bO4K4/IMJT1xqJjqScRv+tJgIBBBaR3 V3s8QpMmhwDMmdDz9LsJVh8PldOGG22yxFf0rc6ke5qvZQ6fNJomxFbrU6WRFvLukvlkd7oXcfA tgkeQJoM673JOIHwGMPmEO1iB5VcYB8hNDZcqpafMq22LXJExt/S0K2PGT3tV3KjbGw4/DK2RFT LNP6sfK8On5b66GQSzS183ZuJfpVZqwpzKbIZS9URQZ4cycL6a9KIlQQ1yy40RF+82Fbc6r90im uXQHk43Eqcs7vBt9GI3O3Hb1X9niZKWuq2Pibhd6NAkr70AjYuGyv0Xh1n/7uiy0deNiXRB++uL YjlPnTdzL5bP7jN0NeQzLURV8pimJse9wCUrdNj6vJ9V14bg3lHl1jPhCVpXNq+S3HOC2uQCEvW 1rcsqDrvA+evdwSun8q7Pz/dS0a5DT0ESufvLky2nb0GqVBhu7zi+o2I/k4S3ToY/uSm8SYbxRK 1pn0lEpLPt9rB6Q== 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" The sensorSize_ field is only used during the init() function and is provided to LscPolynomial using the LscDescriptor type. There is no need to store it as a class member and to pass it in at class construction time. Remove it and move the \todo comment in the LscDescriptor type documentation. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/ipa/libipa/lsc.cpp | 6 +----- src/ipa/libipa/lsc_base.cpp | 3 +++ src/ipa/libipa/lsc_polynomial.cpp | 7 ------- src/ipa/libipa/lsc_polynomial.h | 6 ------ 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp index 26c3e9968072..1d2f8eb1b41b 100644 --- a/src/ipa/libipa/lsc.cpp +++ b/src/ipa/libipa/lsc.cpp @@ -215,11 +215,7 @@ int LscAlgorithm::init(const ValueNode &tuningData, ControlInfoMap::Map &control impl_ = std::make_unique(); LOG(Lsc, Debug) << "Using table-based Lsc"; } else if (type == "polynomial") { - /* - * \todo: Most likely the reference frame should be native_size. - * Let's wait how the internal discussions progress. - */ - impl_ = std::make_unique(descriptor.sensorSize); + impl_ = std::make_unique(); polynomial_ = true; LOG(Lsc, Debug) << "Using polynomial Lsc"; } else { diff --git a/src/ipa/libipa/lsc_base.cpp b/src/ipa/libipa/lsc_base.cpp index 919622c6b951..adc09c15752a 100644 --- a/src/ipa/libipa/lsc_base.cpp +++ b/src/ipa/libipa/lsc_base.cpp @@ -78,6 +78,9 @@ void Interpolator:: * \var LscDescriptor::sensorSize * \brief The physical sensor size. This is the largest frame size used to * generate the LSC table. Only used by the polynomial LSC algorithm + * + * \todo: Most likely the reference frame should be native_size. + * Let's wait how the internal discussions progress. */ /** diff --git a/src/ipa/libipa/lsc_polynomial.cpp b/src/ipa/libipa/lsc_polynomial.cpp index 83594bb52696..110b43157ff3 100644 --- a/src/ipa/libipa/lsc_polynomial.cpp +++ b/src/ipa/libipa/lsc_polynomial.cpp @@ -123,13 +123,6 @@ void Polynomial::setReferenceImageSize(const Size &size) * \sa LscImplementation */ -/** - * \fn LscPolynomial::LscPolynomial - * \param[in] sensorSize The physical sensor size - * - * Construct an LscPolynomial - */ - /** * \brief Parse polynomial LSC data * \param[in] sets The tuning file content diff --git a/src/ipa/libipa/lsc_polynomial.h b/src/ipa/libipa/lsc_polynomial.h index 2a26db499d68..6d19e46a50b7 100644 --- a/src/ipa/libipa/lsc_polynomial.h +++ b/src/ipa/libipa/lsc_polynomial.h @@ -57,11 +57,6 @@ private: using PolynomialComponentsMap = std::map; public: - LscPolynomial(const Size &sensorSize) - : sensorSize_(sensorSize) - { - } - int parseLscData(const ValueNode &sets, const LscDescriptor &descriptor) override; @@ -75,7 +70,6 @@ private: Span yPositions, const Rectangle &cropRectangle); PolynomialComponentsMap lscData_; - Size sensorSize_; }; } /* namespace ipa */