[v2,0/4] ipa: pwl: Fixes for single point PWLs
mbox series

Message ID 20250613100947.589875-1-stefan.klug@ideasonboard.com
Headers show
Series
  • ipa: pwl: Fixes for single point PWLs
Related show

Message

Stefan Klug June 13, 2025, 10:09 a.m. UTC
In our tuning files we have several occasions where we interpolate some
value (like colour temperature probabilities) based on some other value
(like lux levels) using the Pwl class.

In cases where this interpolation is not wanted it is tempting to just
put a single pair of values into the tuning file. Unfortunately this
doesn't work as the Pwl refuses to work with a single point. There is no
(to my knowlege) reason not to support that usecase.

Update v2: 

This series add support for the single point Pwls. After the feedback in
v1 I kept the extrapolation code in place and only fixed the
documentation for that.

Best regards,
Stefan

Stefan Klug (4):
  test: ipa: Add basic Pwl test
  libipa: pwl: Improve documentation
  test: ipa: Add failing test for single point Pwl
  libipa: pwl: Fix single point Pwl

 src/ipa/libipa/pwl.cpp      | 19 +++++++------
 test/ipa/libipa/meson.build |  1 +
 test/ipa/libipa/pwl.cpp     | 57 +++++++++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 8 deletions(-)
 create mode 100644 test/ipa/libipa/pwl.cpp