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

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

Message

Laurent Pinchart Nov. 17, 2024, 10:17 p.m. UTC
Hello,

This patch series tries to simplify IPA linear algebra calculations by
improving the Vector class API. The first 9 patches improves the Vector
class, and the last two patches 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.

Laurent Pinchart (11):
  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() and normalize() functions
  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         | 261 ++++++++++++++++++++++++++----
 src/ipa/libipa/vector.h           | 257 +++++++++++++++++++++++------
 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 +--
 6 files changed, 505 insertions(+), 200 deletions(-)


base-commit: 5c71df927ddaaa01204bff1e647c9d2bf653d95f

Comments

Kieran Bingham Nov. 18, 2024, 11:22 a.m. UTC | #1
Quoting Laurent Pinchart (2024-11-17 22:17:01)
> Hello,
> 
> This patch series tries to simplify IPA linear algebra calculations by
> improving the Vector class API. The first 9 patches improves the Vector
> class, and the last two patches 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.

Personally I like it. I like not repeating three identical lines for
3 types that always follow each other around.

--
Kieran

> 
> Laurent Pinchart (11):
>   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() and normalize() functions
>   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         | 261 ++++++++++++++++++++++++++----
>  src/ipa/libipa/vector.h           | 257 +++++++++++++++++++++++------
>  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 +--
>  6 files changed, 505 insertions(+), 200 deletions(-)
> 
> 
> base-commit: 5c71df927ddaaa01204bff1e647c9d2bf653d95f
> -- 
> Regards,
> 
> Laurent Pinchart
>