| Message ID | 20260108-sklug-lsc-resampling-v2-dev-v2-10-e682ec4b9893@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Stefan Klug (2026-01-08 16:05:53) > The quantization of the interpolation key was only used by the LSC > algorithm. There it lead to difficult to read code was removed. As there > is no remaining user of it, drop it from the Interpolator class. > > While at it, cleanup the includes. > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Paul, I think you wrote this. Any objections? -- Kieran > > --- > > Changes in v2: > - Added this patch > --- > src/ipa/libipa/interpolator.cpp | 25 +------------------------ > src/ipa/libipa/interpolator.h | 14 +------------- > test/ipa/libipa/interpolator.cpp | 7 ------- > 3 files changed, 2 insertions(+), 44 deletions(-) > > diff --git a/src/ipa/libipa/interpolator.cpp b/src/ipa/libipa/interpolator.cpp > index f901a86e4c74db6708a61e5491aa68f231e4a318..00bf66b6c2af3ce2cd9a94d5e02290c14fa3ba50 100644 > --- a/src/ipa/libipa/interpolator.cpp > +++ b/src/ipa/libipa/interpolator.cpp > @@ -6,15 +6,8 @@ > */ > #include "interpolator.h" > > -#include <algorithm> > -#include <string> > - > #include <libcamera/base/log.h> > > -#include "libcamera/internal/yaml_parser.h" > - > -#include "interpolator.h" > - > /** > * \file interpolator.h > * \brief Helper class for linear interpolating a set of objects > @@ -104,20 +97,6 @@ namespace ipa { > * \return Zero on success, negative error code otherwise > */ > > -/** > - * \fn void Interpolator<T>::setQuantization(const unsigned int q) > - * \brief Set the quantization value > - * \param[in] q The quantization value > - * > - * Sets the quantization value. When this is set, 'key' gets quantized to this > - * size, before doing the interpolation. This can help in reducing the number of > - * updates pushed to the hardware. > - * > - * Note that normally a threshold needs to be combined with quantization. > - * Otherwise a value that swings around the edge of the quantization step will > - * lead to constant updates. > - */ > - > /** > * \fn void Interpolator<T>::setData(std::map<unsigned int, T> &&data) > * \brief Set the internal map > @@ -136,10 +115,8 @@ namespace ipa { > * \fn const T& Interpolator<T>::getInterpolated() > * \brief Retrieve an interpolated value for the given key > * \param[in] key The unsigned integer key of the object to retrieve > - * \param[out] quantizedKey If provided, the key value after quantization > * \return The object corresponding to the key. The object is cached internally, > - * so on successive calls with the same key (after quantization) interpolation > - * is not recalculated. > + * so on successive calls with the same key interpolation is not recalculated. > */ > > /** > diff --git a/src/ipa/libipa/interpolator.h b/src/ipa/libipa/interpolator.h > index 7880db6976d15aa033678f4aeb4934f5cd785bd9..fb2c611d186ed2bc8a733bdbb4273fca47942565 100644 > --- a/src/ipa/libipa/interpolator.h > +++ b/src/ipa/libipa/interpolator.h > @@ -70,11 +70,6 @@ public: > return 0; > } > > - void setQuantization(const unsigned int q) > - { > - quantization_ = q; > - } > - > void setData(std::map<unsigned int, T> &&data) > { > data_ = std::move(data); > @@ -86,16 +81,10 @@ public: > return data_; > } > > - const T &getInterpolated(unsigned int key, unsigned int *quantizedKey = nullptr) > + const T &getInterpolated(unsigned int key) > { > ASSERT(data_.size() > 0); > > - if (quantization_ > 0) > - key = std::lround(key / static_cast<double>(quantization_)) * quantization_; > - > - if (quantizedKey) > - *quantizedKey = key; > - > if (lastInterpolatedKey_.has_value() && > *lastInterpolatedKey_ == key) > return lastInterpolatedValue_; > @@ -128,7 +117,6 @@ private: > std::map<unsigned int, T> data_; > T lastInterpolatedValue_; > std::optional<unsigned int> lastInterpolatedKey_; > - unsigned int quantization_ = 0; > }; > > } /* namespace ipa */ > diff --git a/test/ipa/libipa/interpolator.cpp b/test/ipa/libipa/interpolator.cpp > index 6abb776060d43b8339cf9b632cac1806a9c5f9b0..03b7089a7a05fb1a2b6ee568ad8e92ad7ac716ee 100644 > --- a/test/ipa/libipa/interpolator.cpp > +++ b/test/ipa/libipa/interpolator.cpp > @@ -40,13 +40,6 @@ protected: > ASSERT_EQ(interpolator.getInterpolated(30), 300); > ASSERT_EQ(interpolator.getInterpolated(40), 300); > > - interpolator.setQuantization(10); > - unsigned int q = 0; > - ASSERT_EQ(interpolator.getInterpolated(25, &q), 300); > - ASSERT_EQ(q, 30); > - ASSERT_EQ(interpolator.getInterpolated(24, &q), 200); > - ASSERT_EQ(q, 20); > - > return TestPass; > } > }; > > -- > 2.51.0 >
Quoting Kieran Bingham (2026-01-08 21:16:09) > Quoting Stefan Klug (2026-01-08 16:05:53) > > The quantization of the interpolation key was only used by the LSC > > algorithm. There it lead to difficult to read code was removed. As there > > is no remaining user of it, drop it from the Interpolator class. > > > > While at it, cleanup the includes. > > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Paul, I think you wrote this. Any objections? I created the Interpolator pased on Pauls MatrixInterpolator. But the quantization was added by me, so I drop my own bad idea :-) Cheers, Stefan > > -- > Kieran > > > > > --- > > > > Changes in v2: > > - Added this patch > > --- > > src/ipa/libipa/interpolator.cpp | 25 +------------------------ > > src/ipa/libipa/interpolator.h | 14 +------------- > > test/ipa/libipa/interpolator.cpp | 7 ------- > > 3 files changed, 2 insertions(+), 44 deletions(-) > > > > diff --git a/src/ipa/libipa/interpolator.cpp b/src/ipa/libipa/interpolator.cpp > > index f901a86e4c74db6708a61e5491aa68f231e4a318..00bf66b6c2af3ce2cd9a94d5e02290c14fa3ba50 100644 > > --- a/src/ipa/libipa/interpolator.cpp > > +++ b/src/ipa/libipa/interpolator.cpp > > @@ -6,15 +6,8 @@ > > */ > > #include "interpolator.h" > > > > -#include <algorithm> > > -#include <string> > > - > > #include <libcamera/base/log.h> > > > > -#include "libcamera/internal/yaml_parser.h" > > - > > -#include "interpolator.h" > > - > > /** > > * \file interpolator.h > > * \brief Helper class for linear interpolating a set of objects > > @@ -104,20 +97,6 @@ namespace ipa { > > * \return Zero on success, negative error code otherwise > > */ > > > > -/** > > - * \fn void Interpolator<T>::setQuantization(const unsigned int q) > > - * \brief Set the quantization value > > - * \param[in] q The quantization value > > - * > > - * Sets the quantization value. When this is set, 'key' gets quantized to this > > - * size, before doing the interpolation. This can help in reducing the number of > > - * updates pushed to the hardware. > > - * > > - * Note that normally a threshold needs to be combined with quantization. > > - * Otherwise a value that swings around the edge of the quantization step will > > - * lead to constant updates. > > - */ > > - > > /** > > * \fn void Interpolator<T>::setData(std::map<unsigned int, T> &&data) > > * \brief Set the internal map > > @@ -136,10 +115,8 @@ namespace ipa { > > * \fn const T& Interpolator<T>::getInterpolated() > > * \brief Retrieve an interpolated value for the given key > > * \param[in] key The unsigned integer key of the object to retrieve > > - * \param[out] quantizedKey If provided, the key value after quantization > > * \return The object corresponding to the key. The object is cached internally, > > - * so on successive calls with the same key (after quantization) interpolation > > - * is not recalculated. > > + * so on successive calls with the same key interpolation is not recalculated. > > */ > > > > /** > > diff --git a/src/ipa/libipa/interpolator.h b/src/ipa/libipa/interpolator.h > > index 7880db6976d15aa033678f4aeb4934f5cd785bd9..fb2c611d186ed2bc8a733bdbb4273fca47942565 100644 > > --- a/src/ipa/libipa/interpolator.h > > +++ b/src/ipa/libipa/interpolator.h > > @@ -70,11 +70,6 @@ public: > > return 0; > > } > > > > - void setQuantization(const unsigned int q) > > - { > > - quantization_ = q; > > - } > > - > > void setData(std::map<unsigned int, T> &&data) > > { > > data_ = std::move(data); > > @@ -86,16 +81,10 @@ public: > > return data_; > > } > > > > - const T &getInterpolated(unsigned int key, unsigned int *quantizedKey = nullptr) > > + const T &getInterpolated(unsigned int key) > > { > > ASSERT(data_.size() > 0); > > > > - if (quantization_ > 0) > > - key = std::lround(key / static_cast<double>(quantization_)) * quantization_; > > - > > - if (quantizedKey) > > - *quantizedKey = key; > > - > > if (lastInterpolatedKey_.has_value() && > > *lastInterpolatedKey_ == key) > > return lastInterpolatedValue_; > > @@ -128,7 +117,6 @@ private: > > std::map<unsigned int, T> data_; > > T lastInterpolatedValue_; > > std::optional<unsigned int> lastInterpolatedKey_; > > - unsigned int quantization_ = 0; > > }; > > > > } /* namespace ipa */ > > diff --git a/test/ipa/libipa/interpolator.cpp b/test/ipa/libipa/interpolator.cpp > > index 6abb776060d43b8339cf9b632cac1806a9c5f9b0..03b7089a7a05fb1a2b6ee568ad8e92ad7ac716ee 100644 > > --- a/test/ipa/libipa/interpolator.cpp > > +++ b/test/ipa/libipa/interpolator.cpp > > @@ -40,13 +40,6 @@ protected: > > ASSERT_EQ(interpolator.getInterpolated(30), 300); > > ASSERT_EQ(interpolator.getInterpolated(40), 300); > > > > - interpolator.setQuantization(10); > > - unsigned int q = 0; > > - ASSERT_EQ(interpolator.getInterpolated(25, &q), 300); > > - ASSERT_EQ(q, 30); > > - ASSERT_EQ(interpolator.getInterpolated(24, &q), 200); > > - ASSERT_EQ(q, 20); > > - > > return TestPass; > > } > > }; > > > > -- > > 2.51.0 > >
2026. 01. 08. 17:05 keltezéssel, Stefan Klug írta: > The quantization of the interpolation key was only used by the LSC > algorithm. There it lead to difficult to read code was removed. As there > is no remaining user of it, drop it from the Interpolator class. > > While at it, cleanup the includes. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > > --- Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > Changes in v2: > - Added this patch > --- > src/ipa/libipa/interpolator.cpp | 25 +------------------------ > src/ipa/libipa/interpolator.h | 14 +------------- > test/ipa/libipa/interpolator.cpp | 7 ------- > 3 files changed, 2 insertions(+), 44 deletions(-) > > diff --git a/src/ipa/libipa/interpolator.cpp b/src/ipa/libipa/interpolator.cpp > index f901a86e4c74db6708a61e5491aa68f231e4a318..00bf66b6c2af3ce2cd9a94d5e02290c14fa3ba50 100644 > --- a/src/ipa/libipa/interpolator.cpp > +++ b/src/ipa/libipa/interpolator.cpp > @@ -6,15 +6,8 @@ > */ > #include "interpolator.h" > > -#include <algorithm> > -#include <string> > - > #include <libcamera/base/log.h> > > -#include "libcamera/internal/yaml_parser.h" > - > -#include "interpolator.h" > - > /** > * \file interpolator.h > * \brief Helper class for linear interpolating a set of objects > @@ -104,20 +97,6 @@ namespace ipa { > * \return Zero on success, negative error code otherwise > */ > > -/** > - * \fn void Interpolator<T>::setQuantization(const unsigned int q) > - * \brief Set the quantization value > - * \param[in] q The quantization value > - * > - * Sets the quantization value. When this is set, 'key' gets quantized to this > - * size, before doing the interpolation. This can help in reducing the number of > - * updates pushed to the hardware. > - * > - * Note that normally a threshold needs to be combined with quantization. > - * Otherwise a value that swings around the edge of the quantization step will > - * lead to constant updates. > - */ > - > /** > * \fn void Interpolator<T>::setData(std::map<unsigned int, T> &&data) > * \brief Set the internal map > @@ -136,10 +115,8 @@ namespace ipa { > * \fn const T& Interpolator<T>::getInterpolated() > * \brief Retrieve an interpolated value for the given key > * \param[in] key The unsigned integer key of the object to retrieve > - * \param[out] quantizedKey If provided, the key value after quantization > * \return The object corresponding to the key. The object is cached internally, > - * so on successive calls with the same key (after quantization) interpolation > - * is not recalculated. > + * so on successive calls with the same key interpolation is not recalculated. > */ > > /** > diff --git a/src/ipa/libipa/interpolator.h b/src/ipa/libipa/interpolator.h > index 7880db6976d15aa033678f4aeb4934f5cd785bd9..fb2c611d186ed2bc8a733bdbb4273fca47942565 100644 > --- a/src/ipa/libipa/interpolator.h > +++ b/src/ipa/libipa/interpolator.h > @@ -70,11 +70,6 @@ public: > return 0; > } > > - void setQuantization(const unsigned int q) > - { > - quantization_ = q; > - } > - > void setData(std::map<unsigned int, T> &&data) > { > data_ = std::move(data); > @@ -86,16 +81,10 @@ public: > return data_; > } > > - const T &getInterpolated(unsigned int key, unsigned int *quantizedKey = nullptr) > + const T &getInterpolated(unsigned int key) > { > ASSERT(data_.size() > 0); > > - if (quantization_ > 0) > - key = std::lround(key / static_cast<double>(quantization_)) * quantization_; > - > - if (quantizedKey) > - *quantizedKey = key; > - > if (lastInterpolatedKey_.has_value() && > *lastInterpolatedKey_ == key) > return lastInterpolatedValue_; > @@ -128,7 +117,6 @@ private: > std::map<unsigned int, T> data_; > T lastInterpolatedValue_; > std::optional<unsigned int> lastInterpolatedKey_; > - unsigned int quantization_ = 0; > }; > > } /* namespace ipa */ > diff --git a/test/ipa/libipa/interpolator.cpp b/test/ipa/libipa/interpolator.cpp > index 6abb776060d43b8339cf9b632cac1806a9c5f9b0..03b7089a7a05fb1a2b6ee568ad8e92ad7ac716ee 100644 > --- a/test/ipa/libipa/interpolator.cpp > +++ b/test/ipa/libipa/interpolator.cpp > @@ -40,13 +40,6 @@ protected: > ASSERT_EQ(interpolator.getInterpolated(30), 300); > ASSERT_EQ(interpolator.getInterpolated(40), 300); > > - interpolator.setQuantization(10); > - unsigned int q = 0; > - ASSERT_EQ(interpolator.getInterpolated(25, &q), 300); > - ASSERT_EQ(q, 30); > - ASSERT_EQ(interpolator.getInterpolated(24, &q), 200); > - ASSERT_EQ(q, 20); > - > return TestPass; > } > }; >
Quoting Stefan Klug (2026-01-09 09:36:27) > Quoting Kieran Bingham (2026-01-08 21:16:09) > > Quoting Stefan Klug (2026-01-08 16:05:53) > > > The quantization of the interpolation key was only used by the LSC > > > algorithm. There it lead to difficult to read code was removed. As there > > > is no remaining user of it, drop it from the Interpolator class. > > > > > > While at it, cleanup the includes. > > > > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > > Paul, I think you wrote this. Any objections? > > I created the Interpolator pased on Pauls MatrixInterpolator. But the > quantization was added by me, so I drop my own bad idea :-) Aha, sorry - well in that case ... Stefan - do you have any objections here ;-) -- Kieran > > Cheers, > Stefan > > > > > -- > > Kieran > > > > > > > > --- > > > > > > Changes in v2: > > > - Added this patch > > > --- > > > src/ipa/libipa/interpolator.cpp | 25 +------------------------ > > > src/ipa/libipa/interpolator.h | 14 +------------- > > > test/ipa/libipa/interpolator.cpp | 7 ------- > > > 3 files changed, 2 insertions(+), 44 deletions(-) > > > > > > diff --git a/src/ipa/libipa/interpolator.cpp b/src/ipa/libipa/interpolator.cpp > > > index f901a86e4c74db6708a61e5491aa68f231e4a318..00bf66b6c2af3ce2cd9a94d5e02290c14fa3ba50 100644 > > > --- a/src/ipa/libipa/interpolator.cpp > > > +++ b/src/ipa/libipa/interpolator.cpp > > > @@ -6,15 +6,8 @@ > > > */ > > > #include "interpolator.h" > > > > > > -#include <algorithm> > > > -#include <string> > > > - > > > #include <libcamera/base/log.h> > > > > > > -#include "libcamera/internal/yaml_parser.h" > > > - > > > -#include "interpolator.h" > > > - > > > /** > > > * \file interpolator.h > > > * \brief Helper class for linear interpolating a set of objects > > > @@ -104,20 +97,6 @@ namespace ipa { > > > * \return Zero on success, negative error code otherwise > > > */ > > > > > > -/** > > > - * \fn void Interpolator<T>::setQuantization(const unsigned int q) > > > - * \brief Set the quantization value > > > - * \param[in] q The quantization value > > > - * > > > - * Sets the quantization value. When this is set, 'key' gets quantized to this > > > - * size, before doing the interpolation. This can help in reducing the number of > > > - * updates pushed to the hardware. > > > - * > > > - * Note that normally a threshold needs to be combined with quantization. > > > - * Otherwise a value that swings around the edge of the quantization step will > > > - * lead to constant updates. > > > - */ > > > - > > > /** > > > * \fn void Interpolator<T>::setData(std::map<unsigned int, T> &&data) > > > * \brief Set the internal map > > > @@ -136,10 +115,8 @@ namespace ipa { > > > * \fn const T& Interpolator<T>::getInterpolated() > > > * \brief Retrieve an interpolated value for the given key > > > * \param[in] key The unsigned integer key of the object to retrieve > > > - * \param[out] quantizedKey If provided, the key value after quantization > > > * \return The object corresponding to the key. The object is cached internally, > > > - * so on successive calls with the same key (after quantization) interpolation > > > - * is not recalculated. > > > + * so on successive calls with the same key interpolation is not recalculated. > > > */ > > > > > > /** > > > diff --git a/src/ipa/libipa/interpolator.h b/src/ipa/libipa/interpolator.h > > > index 7880db6976d15aa033678f4aeb4934f5cd785bd9..fb2c611d186ed2bc8a733bdbb4273fca47942565 100644 > > > --- a/src/ipa/libipa/interpolator.h > > > +++ b/src/ipa/libipa/interpolator.h > > > @@ -70,11 +70,6 @@ public: > > > return 0; > > > } > > > > > > - void setQuantization(const unsigned int q) > > > - { > > > - quantization_ = q; > > > - } > > > - > > > void setData(std::map<unsigned int, T> &&data) > > > { > > > data_ = std::move(data); > > > @@ -86,16 +81,10 @@ public: > > > return data_; > > > } > > > > > > - const T &getInterpolated(unsigned int key, unsigned int *quantizedKey = nullptr) > > > + const T &getInterpolated(unsigned int key) > > > { > > > ASSERT(data_.size() > 0); > > > > > > - if (quantization_ > 0) > > > - key = std::lround(key / static_cast<double>(quantization_)) * quantization_; > > > - > > > - if (quantizedKey) > > > - *quantizedKey = key; > > > - > > > if (lastInterpolatedKey_.has_value() && > > > *lastInterpolatedKey_ == key) > > > return lastInterpolatedValue_; > > > @@ -128,7 +117,6 @@ private: > > > std::map<unsigned int, T> data_; > > > T lastInterpolatedValue_; > > > std::optional<unsigned int> lastInterpolatedKey_; > > > - unsigned int quantization_ = 0; > > > }; > > > > > > } /* namespace ipa */ > > > diff --git a/test/ipa/libipa/interpolator.cpp b/test/ipa/libipa/interpolator.cpp > > > index 6abb776060d43b8339cf9b632cac1806a9c5f9b0..03b7089a7a05fb1a2b6ee568ad8e92ad7ac716ee 100644 > > > --- a/test/ipa/libipa/interpolator.cpp > > > +++ b/test/ipa/libipa/interpolator.cpp > > > @@ -40,13 +40,6 @@ protected: > > > ASSERT_EQ(interpolator.getInterpolated(30), 300); > > > ASSERT_EQ(interpolator.getInterpolated(40), 300); > > > > > > - interpolator.setQuantization(10); > > > - unsigned int q = 0; > > > - ASSERT_EQ(interpolator.getInterpolated(25, &q), 300); > > > - ASSERT_EQ(q, 30); > > > - ASSERT_EQ(interpolator.getInterpolated(24, &q), 200); > > > - ASSERT_EQ(q, 20); > > > - > > > return TestPass; > > > } > > > }; > > > > > > -- > > > 2.51.0 > > >
diff --git a/src/ipa/libipa/interpolator.cpp b/src/ipa/libipa/interpolator.cpp index f901a86e4c74db6708a61e5491aa68f231e4a318..00bf66b6c2af3ce2cd9a94d5e02290c14fa3ba50 100644 --- a/src/ipa/libipa/interpolator.cpp +++ b/src/ipa/libipa/interpolator.cpp @@ -6,15 +6,8 @@ */ #include "interpolator.h" -#include <algorithm> -#include <string> - #include <libcamera/base/log.h> -#include "libcamera/internal/yaml_parser.h" - -#include "interpolator.h" - /** * \file interpolator.h * \brief Helper class for linear interpolating a set of objects @@ -104,20 +97,6 @@ namespace ipa { * \return Zero on success, negative error code otherwise */ -/** - * \fn void Interpolator<T>::setQuantization(const unsigned int q) - * \brief Set the quantization value - * \param[in] q The quantization value - * - * Sets the quantization value. When this is set, 'key' gets quantized to this - * size, before doing the interpolation. This can help in reducing the number of - * updates pushed to the hardware. - * - * Note that normally a threshold needs to be combined with quantization. - * Otherwise a value that swings around the edge of the quantization step will - * lead to constant updates. - */ - /** * \fn void Interpolator<T>::setData(std::map<unsigned int, T> &&data) * \brief Set the internal map @@ -136,10 +115,8 @@ namespace ipa { * \fn const T& Interpolator<T>::getInterpolated() * \brief Retrieve an interpolated value for the given key * \param[in] key The unsigned integer key of the object to retrieve - * \param[out] quantizedKey If provided, the key value after quantization * \return The object corresponding to the key. The object is cached internally, - * so on successive calls with the same key (after quantization) interpolation - * is not recalculated. + * so on successive calls with the same key interpolation is not recalculated. */ /** diff --git a/src/ipa/libipa/interpolator.h b/src/ipa/libipa/interpolator.h index 7880db6976d15aa033678f4aeb4934f5cd785bd9..fb2c611d186ed2bc8a733bdbb4273fca47942565 100644 --- a/src/ipa/libipa/interpolator.h +++ b/src/ipa/libipa/interpolator.h @@ -70,11 +70,6 @@ public: return 0; } - void setQuantization(const unsigned int q) - { - quantization_ = q; - } - void setData(std::map<unsigned int, T> &&data) { data_ = std::move(data); @@ -86,16 +81,10 @@ public: return data_; } - const T &getInterpolated(unsigned int key, unsigned int *quantizedKey = nullptr) + const T &getInterpolated(unsigned int key) { ASSERT(data_.size() > 0); - if (quantization_ > 0) - key = std::lround(key / static_cast<double>(quantization_)) * quantization_; - - if (quantizedKey) - *quantizedKey = key; - if (lastInterpolatedKey_.has_value() && *lastInterpolatedKey_ == key) return lastInterpolatedValue_; @@ -128,7 +117,6 @@ private: std::map<unsigned int, T> data_; T lastInterpolatedValue_; std::optional<unsigned int> lastInterpolatedKey_; - unsigned int quantization_ = 0; }; } /* namespace ipa */ diff --git a/test/ipa/libipa/interpolator.cpp b/test/ipa/libipa/interpolator.cpp index 6abb776060d43b8339cf9b632cac1806a9c5f9b0..03b7089a7a05fb1a2b6ee568ad8e92ad7ac716ee 100644 --- a/test/ipa/libipa/interpolator.cpp +++ b/test/ipa/libipa/interpolator.cpp @@ -40,13 +40,6 @@ protected: ASSERT_EQ(interpolator.getInterpolated(30), 300); ASSERT_EQ(interpolator.getInterpolated(40), 300); - interpolator.setQuantization(10); - unsigned int q = 0; - ASSERT_EQ(interpolator.getInterpolated(25, &q), 300); - ASSERT_EQ(q, 30); - ASSERT_EQ(interpolator.getInterpolated(24, &q), 200); - ASSERT_EQ(q, 20); - return TestPass; } };
The quantization of the interpolation key was only used by the LSC algorithm. There it lead to difficult to read code was removed. As there is no remaining user of it, drop it from the Interpolator class. While at it, cleanup the includes. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes in v2: - Added this patch --- src/ipa/libipa/interpolator.cpp | 25 +------------------------ src/ipa/libipa/interpolator.h | 14 +------------- test/ipa/libipa/interpolator.cpp | 7 ------- 3 files changed, 2 insertions(+), 44 deletions(-)