summaryrefslogtreecommitdiff
path: root/src/ipa/libipa
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-13 03:04:16 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-18 00:58:12 +0300
commit226ce29483ef595525c4f3a43e6795ba962b006c (patch)
tree2e3659b8b81a8d4508125a24e9f3af9f95188715 /src/ipa/libipa
parentb781955c6af5a537face58f0b92a25905df377f8 (diff)
ipa: libipa: pwl: Drop readYaml() function
All users of the Pwl::readYaml() function have been removed. The function is not used, and is deprecated in favour of YamlObject::get(). Drop it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/libipa')
-rw-r--r--src/ipa/libipa/pwl.cpp38
-rw-r--r--src/ipa/libipa/pwl.h2
2 files changed, 0 insertions, 40 deletions
diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp
index 3c639645..9b213754 100644
--- a/src/ipa/libipa/pwl.cpp
+++ b/src/ipa/libipa/pwl.cpp
@@ -126,44 +126,6 @@ Pwl::Pwl(std::vector<Point> &&points)
}
/**
- * \brief Populate the piecewise linear function from yaml data
- * \param[in] params Yaml data to populate the piecewise linear function with
- *
- * Any existing points in the piecewise linear function *will* be overwritten.
- *
- * The yaml data is expected to be a list with an even number of numerical
- * elements. These will be parsed in pairs into x and y points in the piecewise
- * linear function, and added in order. x must be monotonically increasing.
- *
- * \return 0 on success, negative error code otherwise
- */
-int Pwl::readYaml(const libcamera::YamlObject &params)
-{
- if (!params.size() || params.size() % 2)
- return -EINVAL;
-
- const auto &list = params.asList();
-
- points_.clear();
-
- for (auto it = list.begin(); it != list.end(); it++) {
- auto x = it->get<double>();
- if (!x)
- return -EINVAL;
- if (it != list.begin() && *x <= points_.back().x())
- return -EINVAL;
-
- auto y = (++it)->get<double>();
- if (!y)
- return -EINVAL;
-
- points_.push_back(Point({ *x, *y }));
- }
-
- return 0;
-}
-
-/**
* \brief Append a point to the end of the piecewise linear function
* \param[in] x x-coordinate of the point to add to the piecewise linear function
* \param[in] y y-coordinate of the point to add to the piecewise linear function
diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h
index 8edb4d33..b6f93494 100644
--- a/src/ipa/libipa/pwl.h
+++ b/src/ipa/libipa/pwl.h
@@ -49,8 +49,6 @@ public:
Pwl(const std::vector<Point> &points);
Pwl(std::vector<Point> &&points);
- int readYaml(const libcamera::YamlObject &params);
-
void append(double x, double y, double eps = 1e-6);
bool empty() const { return points_.empty(); }