[v2,0/9] ove Matrix class from libipa to libcamera
mbox series

Message ID 20241119103740.1919807-1-stefan.klug@ideasonboard.com
Headers show
Series
  • ove Matrix class from libipa to libcamera
Related show

Message

Stefan Klug Nov. 19, 2024, 10:37 a.m. UTC
Hi all,

My upcoming dewarper series implements parametric lens dewarping inside
the rkisp1 pipeline. That code makes use of the Matrix class but lives
outside of the IPA. I suspect there will be more cases, where a matrix
is of good use inside libcamera.

This series movies the Matrix into libacmera/internal. As that gets
linked to the IPAs anyways, there are no negative effects for the IPAs.

This was tested on an imx8mp, but only compile tested for the
RaspberryPi.

Regards,
Stefan

Changes since v1:
- Split into smaller patches
- Replaced the initializer_list based constructor with a std::vector
  based one to align with Vector
- Dropped the Span based constructor as it is not used anywhere

Stefan Klug (9):
  ipa: rpi: Rename Matrix to Matrix3x3
  libcamera: Copy Matrix class from libipa to libcamera
  libcamera: internal: Move Matrix class into libcamera namespace
  libcamera: internal: matrix: Replace vector with array in constructor
  libcamera: internal: Add Matrix class to build
  ipa: rpi: ccm: Replace local matrix implementation with the one from
    libcamera
  libipa: Use Matrix class from libcamera
  rkisp1: Use Matrix class from libcamera
  libipa: Drop Matrix class

 .../libcamera/internal}/matrix.h              | 16 ++---
 include/libcamera/internal/meson.build        |  1 +
 src/ipa/libipa/meson.build                    |  2 -
 src/ipa/libipa/vector.h                       |  4 +-
 src/ipa/rkisp1/algorithms/ccm.h               |  3 +-
 src/ipa/rkisp1/ipa_context.h                  |  2 +-
 src/ipa/rpi/controller/rpi/ccm.cpp            | 58 +++++--------------
 src/ipa/rpi/controller/rpi/ccm.h              | 35 +----------
 src/{ipa/libipa => libcamera}/matrix.cpp      |  8 +--
 src/libcamera/meson.build                     |  1 +
 10 files changed, 33 insertions(+), 97 deletions(-)
 rename {src/ipa/libipa => include/libcamera/internal}/matrix.h (91%)
 rename src/{ipa/libipa => libcamera}/matrix.cpp (97%)