[v7,25/32] ipa: libipa: lsc_polynomial: Remove sensorSize_
diff mbox series

Message ID 20260805-libipa-algorithms-v7-25-7425b5b795d4@ideasonboard.com
State New
Headers show
Series
  • ipa: libipa: Introduce libipa algorithms
Related show

Commit Message

Jacopo Mondi Aug. 5, 2026, 4:13 p.m. UTC
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 <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 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(-)

Patch
diff mbox series

diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp
index 32626049a2e2..2062b795991d 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<LscTable>();
 		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<LscPolynomial>(descriptor.sensorSize);
+		impl_ = std::make_unique<LscPolynomial>();
 		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 289cb3da33f2..cb770f164d53 100644
--- a/src/ipa/libipa/lsc_base.cpp
+++ b/src/ipa/libipa/lsc_base.cpp
@@ -78,6 +78,9 @@  void Interpolator<lsc::Components>::
  * \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 c3871eb3295c..0eb017de6b50 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 4c6af2d4900d..548ed94b2461 100644
--- a/src/ipa/libipa/lsc_polynomial.h
+++ b/src/ipa/libipa/lsc_polynomial.h
@@ -57,11 +57,6 @@  private:
 	using PolynomialComponentsMap = std::map<unsigned int, PolynomialComponents>;
 
 public:
-	LscPolynomial(const Size &sensorSize)
-		: sensorSize_(sensorSize)
-	{
-	}
-
 	int parseLscData(const ValueNode &sets,
 			 const LscDescriptor &descriptor) override;
 
@@ -75,7 +70,6 @@  private:
 					       Span<const double> yPositions,
 					       const Rectangle &cropRectangle);
 	PolynomialComponentsMap lscData_;
-	Size sensorSize_;
 };
 
 } /* namespace ipa */