summaryrefslogtreecommitdiff
path: root/test/ipa/libipa/meson.build
AgeCommit message (Collapse)Author
4 dayslibipa: histogram: Fix interQuantileMean() for small rangesStefan Klug
The interQuantileMean() is supposed to return a weighted mean value between two quantiles. This works for fine histograms, but fails for coarse histograms and small quantile ranges because the weight is always taken from the lower border of the bin. Fix that by rewriting the algorithm to calculate a lower and upper bound for every (partial) bin that goes into the mean calculation and weight the bins by the middle of these bounds. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 daystest: ipa: libipa: histogram: Add tests for small inter quantile mean rangesStefan Klug
Add tests for small inter quantile mean ranges. As these cases fail at the moment, mark the test as should_fail. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 dayslibipa: histogram: Fix quantile() calculation for fractional resultsStefan Klug
The calculation of the frac variable is based solely on integers and therefore results in the fractional part being either 0 or 1. In the original code from RaspberryPi this is mitigated by casting the nominator to a double. This works for most cases, but fails when q is very small because of the quantization introduced by item being an integer. Fix both issues by doing the full calculation in double and remove the should_fail tag. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 daystest: ipa: libipa: histogram: Add tests for quantile() returning a fractionStefan Klug
Add tests for quantile() returning a fractional value. These cases will get fixed in the next commit. Therefore mark the test as should_fail. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 daystest: ipa: libipa: Add histogram testsStefan Klug
Add some basic tests for the histogram class. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-02-12libipa: Drop Vector classStefan Klug
The Vector class from libipa is not used anymore. Drop it. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-12-17libipa: Centralise Fixed / Floating point convertorsDaniel Scally
The rkisp1 IPA has some utility functions to convert between fixed and floating point numbers. Move those to libipa so they're available for use in other IPA modules too. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-11-26test: libipa: Add Vector class testLaurent Pinchart
Add a unit test to exercize the API of the ipa::Vector class. The test binary being called 'vector', implicit includes cause the binary to be picked by '#include <vector>', causing builds to fail. Set implicit_include_directories to false to avoid this, as done in commit 6cd849125888 ("test: Don't add current build directory to include path"). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-09-23test: ipa: libipa: Add tets for InterpolatorStefan Klug
Add tests for the Interpolator class. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>