[libcamera-devel,RFC,0/5] IPU3: Introduce modularity for algorithms
mbox series

Message ID 20210809092007.79067-1-jeanmichel.hautbois@ideasonboard.com
Headers show
Series
  • IPU3: Introduce modularity for algorithms
Related show

Message

Jean-Michel Hautbois Aug. 9, 2021, 9:20 a.m. UTC
This patch series splits the algorithms in IPU3 into a modular form.
When the Metadata class was discussed a proposal from Kieran was to have
a fully-defined structure which would be used to pass the context
between algorithms and the IPAIPU3 class, as well as between the
algorithms themselves.

The algorithms are statically emplaced in a list for the moment, and a
registration system may be used later.
In order to demonstrate how to add a new algorithm, patch 3/5
demonstrates how the gamma table is calculated.
Patch 4/5 and 5/5 move the AWB and AGC algorithms currently used.

Jean-Michel Hautbois (5):
  ipa: ipu3: Introduce a Context structure
  ipa: ipu3: Introduce modular algorithms
  ipa: ipu3: Introduce a modular contrast algorithm
  ipa: ipu3: Move IPU3 awb into algorithms
  ipa: ipu3: Move IPU3 agc into algorithms

 .../ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} |  59 +++++----
 src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} |  33 +++--
 src/ipa/ipu3/algorithms/algorithm.h           |  30 +++++
 .../ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} |  79 ++++--------
 src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} |  28 +++--
 src/ipa/ipu3/algorithms/contrast.cpp          |  52 ++++++++
 src/ipa/ipu3/algorithms/contrast.h            |  32 +++++
 src/ipa/ipu3/algorithms/meson.build           |   7 ++
 src/ipa/ipu3/ipa_context.h                    |  53 ++++++++
 src/ipa/ipu3/ipu3.cpp                         | 114 +++++++++++++-----
 src/ipa/ipu3/meson.build                      |   6 +-
 11 files changed, 345 insertions(+), 148 deletions(-)
 rename src/ipa/ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} (80%)
 rename src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} (59%)
 create mode 100644 src/ipa/ipu3/algorithms/algorithm.h
 rename src/ipa/ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} (78%)
 rename src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} (77%)
 create mode 100644 src/ipa/ipu3/algorithms/contrast.cpp
 create mode 100644 src/ipa/ipu3/algorithms/contrast.h
 create mode 100644 src/ipa/ipu3/algorithms/meson.build
 create mode 100644 src/ipa/ipu3/ipa_context.h