[libcamera-devel,v2,00/10] IPU3: Introduce modularity for algorithms
mbox series

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

Message

Jean-Michel Hautbois Aug. 12, 2021, 4:52 p.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 AWBgrid is calculated using the BDS configuration
from the pipeline handler and the IPAConfigInfo.

Patch 4/10 adds a prepare function to the algorithm interface, and patch
5/10 introduces a process function with a demonstration of its usage
with a new contrast algorithm.

Patch 6/10 and 7/10 change the AWB and AGC to use the new interface.
Patch 8/10 removes unneeded stuff from AGC before moving it into the
algorithms directory, to make it as straightforward as possible.

And the two latest patches are indeed the usage of the new modular
interface.

Jean-Michel Hautbois (10):
  ipa: move libipa::Algorithm to ipa/ipu3/algorithms
  ipa: ipu3: Introduce a Context structure
  ipa: ipu3: Introduce modular grid algorithm
  ipa: ipu3: Introduce a prepare() call to Algorithm
  ipa: ipu3: Introduce a modular contrast algorithm
  ipa: ipu3: convert AWB to the new algorithm interface
  ipa: ipu3: convert AGC to the new algorithm interface
  ipa: ipu3: Remove unneeded function calls in AGC
  ipa: ipu3: Move IPU3 awb into algorithms
  ipa: ipu3: Move IPU3 agc into algorithms

 .../ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} |  39 ++---
 src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} |  32 ++--
 src/ipa/ipu3/algorithms/algorithm.h           |  39 +++++
 .../ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} | 155 ++++++------------
 src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} |  26 +--
 src/ipa/ipu3/algorithms/contrast.cpp          |  51 ++++++
 src/ipa/ipu3/algorithms/contrast.h            |  33 ++++
 src/ipa/ipu3/algorithms/grid.cpp              |  89 ++++++++++
 src/ipa/ipu3/algorithms/grid.h                |  30 ++++
 src/ipa/ipu3/algorithms/meson.build           |   8 +
 src/ipa/ipu3/ipa_context.h                    |  64 ++++++++
 src/ipa/ipu3/ipu3.cpp                         | 109 ++++--------
 src/ipa/ipu3/meson.build                      |   6 +-
 src/ipa/libipa/algorithm.cpp                  |  39 -----
 src/ipa/libipa/algorithm.h                    |  24 ---
 src/ipa/libipa/meson.build                    |   2 -
 16 files changed, 445 insertions(+), 301 deletions(-)
 rename src/ipa/ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} (88%)
 rename src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} (51%)
 create mode 100644 src/ipa/ipu3/algorithms/algorithm.h
 rename src/ipa/ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} (72%)
 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/grid.cpp
 create mode 100644 src/ipa/ipu3/algorithms/grid.h
 create mode 100644 src/ipa/ipu3/algorithms/meson.build
 create mode 100644 src/ipa/ipu3/ipa_context.h
 delete mode 100644 src/ipa/libipa/algorithm.cpp
 delete mode 100644 src/ipa/libipa/algorithm.h