[RFC,v2,00/12] Improve linear algebra helpers in libipa
mbox series

Message ID 20241118000738.18977-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • Improve linear algebra helpers in libipa
Related show

Message

Laurent Pinchart Nov. 18, 2024, 12:07 a.m. UTC
Hello,

This patch series tries to simplify IPA linear algebra calculations by
improving the Vector class API. Patches 01/12 to 09/12 improve the
Vector class, patch 10/12 add a unit test for the class, and patches
11/12 to 12/12 showcase the improvements this can bring in the rkisp1
AWB algorithm.

I'm relatively happy with the result. The only part I'm not sure about
is the introduction of the RGB type alias.

Please note the patches have been compile-tested only.

Compared to v1, the Vector::normalize() function has been dropped, and
the unit test was added in patch 10/12.

Laurent Pinchart (12):
  ipa: libipa: vector: Add mutable x(), y() and z() accessors
  ipa: libipa: vector: Add r(), g() and b() accessors
  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: rkisp1: awb: Use RGB class to store colour gains
  ipa: rkisp1: awb: Replace manual calculations with Vector and Matrix

 src/ipa/libipa/vector.cpp         | 256 ++++++++++++++++++++++++++----
 src/ipa/libipa/vector.h           | 252 +++++++++++++++++++++++------
 src/ipa/rkisp1/algorithms/awb.cpp | 134 ++++++++--------
 src/ipa/rkisp1/algorithms/awb.h   |   2 +-
 src/ipa/rkisp1/ipa_context.cpp    |  31 +---
 src/ipa/rkisp1/ipa_context.h      |  20 +--
 test/ipa/libipa/meson.build       |   2 +
 test/ipa/libipa/vector.cpp        | 100 ++++++++++++
 8 files changed, 597 insertions(+), 200 deletions(-)
 create mode 100644 test/ipa/libipa/vector.cpp


base-commit: 5c71df927ddaaa01204bff1e647c9d2bf653d95f