[PATCH v3 00/17] Improve linear algebra helpers in libipa
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Nov 18 23:16:01 CET 2024
Hello,
This patch series tries to simplify IPA linear algebra calculations by
improving the Vector class API.
Patches 01/17 to 10/17 start by improving the Vector class, and patch
11/17 adds a unit test for the class. Patche 12/17 follows with
migrating the IPU3 IPA module to replace its custom RGB class with the
generic version, enabling usage of the new RGB class in the libipa API
in patch 13/17. Patches 14/17 to 16/17 are further code simpflications
thanks to the new helpers. Finally, patch 17/17 is a drive-by extension
of a comment to record information I discovered while working on the
series.
Further usage of the RGB, Vector and Matrix classes are likely possible.
In particular, I have limited changes to the Raspberry Pi IPA module to
the minimum required due to the updates in colours.h.
Compared to v1, the series has been rebased on conflicting changes from
Dan that introduced src/ipa/libipa/colours.{cpp,h}. Please see
individual patches for detailed changelogs.
Please note the patches have been compile-tested and unit-tested only.
Laurent Pinchart (17):
ipa: libipa: vector: Add mutable x(), y() and z() accessors
ipa: libipa: vector: Add r(), g() and b() accessors
ipa: libipa: vector: Add scalar constructor
ipa: libipa: vector: Add copy constructor and assignment operator
ipa: libipa: vector: Rename the dot product operator*() to dot()
ipa: libipa: vector: Generalize arithmetic operators
ipa: libipa: vector: Add missing binary arithemtic operators
ipa: libipa: vector: Add compound assignment operators
ipa: libipa: vector: Add element-wise min() and max() functions
ipa: libipa: vector: Add sum() function
test: libipa: Add Vector class test
ipa: ipu3: awb: Replace Awb::RGB class with ipa::RGB
ipa: libipa: colour: Use the RGB class to model RGB values
ipa: libipa: colour: Use Vector and Matrix for linear algebra
ipa: rkisp1: awb: Use RGB class to store colour gains
ipa: rkisp1: awb: Use Vector and Matrix for linear algebra
ipa: rkisp1: awb: Expand comment
src/ipa/ipu3/algorithms/agc.cpp | 14 +-
src/ipa/ipu3/algorithms/awb.cpp | 37 +--
src/ipa/ipu3/algorithms/awb.h | 18 +-
src/ipa/libipa/colours.cpp | 40 ++--
src/ipa/libipa/colours.h | 6 +-
src/ipa/libipa/vector.cpp | 264 ++++++++++++++++++---
src/ipa/libipa/vector.h | 258 ++++++++++++++++----
src/ipa/rkisp1/algorithms/awb.cpp | 127 +++++-----
src/ipa/rkisp1/ipa_context.cpp | 31 +--
src/ipa/rkisp1/ipa_context.h | 20 +-
src/ipa/rpi/controller/rpi/agc_channel.cpp | 21 +-
test/ipa/libipa/meson.build | 2 +
test/ipa/libipa/vector.cpp | 100 ++++++++
13 files changed, 672 insertions(+), 266 deletions(-)
create mode 100644 test/ipa/libipa/vector.cpp
base-commit: d5217b16020c659145f9d6dbf5849129b8500967
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list