[libcamera-devel,v3,00/10] Add IPAManager and IPAInterface
mbox series

Message ID 20190605005316.4835-1-paul.elder@ideasonboard.com
Headers show
Series
  • Add IPAManager and IPAInterface
Related show

Message

Paul Elder June 5, 2019, 12:53 a.m. UTC
Pipeline handlers need a way to acquire an IPA module. To achieve this,
we use an IPA manager, that loads many IPA modules, after which a
pipeline handler can ask the IPA manager for an IPA module that matches
it. Each IPA can only be used with one pipeline handler, but a pipeline
handler may work with many IPAs (not simultaneously).
The pipeline handlers also need names and versions (previously only the
factory had a name) to be matched with an IPA module.

Each IPA module, in a shared object, implements an IPAInterface class,
which defines the interface between a pipeline hander and an IPA
implementation, hence the name.

Changes in v3:
- remove major and minor pipeline version and replace with a single
  number
- when finding an IPA for a pipeline, the pipeline handler supplies a
  version range, and the pipeline handler no longer has its own version
- pipeline handlers are not 1-to-1 with IPAs, so the generic
  PipelineHandler class no longer has an IPA member variable

Changes in v2:
- add PIPELINE_VERSION macro to convert a major minor version pair to a
  single version number
- make the IPA module directory hardcoded to the insallation directory,
  and read additional paths from an environment variable
- pipeline handlers save the IPA that they load

Paul Elder (10):
  libcamera: ipa_interface: add header
  libcamera: pipeline: add name
  libcamera: ipa_module_info: update struct to allow IPA matching
  libcamera: ipa_module: verify IPA module API version upon loading
  libcamera: ipa_module: allow instantiation of IPAInterface
  libcamera: ipa_module: match IPA module with pipeline handler
  libcamera: ipa_manager: implement class for managing IPA modules
  libcamera: ipa: add dummy IPA implementation
  libcamera: test: remove test IPA and use dummy IPA instead
  libcamera: pipeline: vimc: add dummy IPA

 Documentation/Doxyfile.in                |   7 +-
 include/libcamera/ipa/ipa_interface.h    |  22 ++++
 include/libcamera/ipa/ipa_module_info.h  |  10 +-
 include/libcamera/meson.build            |   1 +
 src/ipa/ipa_dummy.cpp                    |  45 +++++++
 src/ipa/meson.build                      |  15 +++
 src/libcamera/include/ipa_manager.h      |  40 ++++++
 src/libcamera/include/ipa_module.h       |  17 +++
 src/libcamera/include/pipeline_handler.h |  14 ++-
 src/libcamera/ipa_interface.cpp          |  27 ++++
 src/libcamera/ipa_manager.cpp            | 149 +++++++++++++++++++++++
 src/libcamera/ipa_module.cpp             | 138 +++++++++++++++++++--
 src/libcamera/meson.build                |   6 +-
 src/libcamera/pipeline/vimc.cpp          |  11 ++
 src/libcamera/pipeline_handler.cpp       |  17 +++
 src/meson.build                          |   1 +
 test/ipa/ipa_test.cpp                    |  33 +++--
 test/ipa/meson.build                     |  11 --
 test/ipa/shared_test.c                   |   6 -
 test/ipa/shared_test.cpp                 |  12 --
 test/libtest/test.cpp                    |   6 +
 21 files changed, 526 insertions(+), 62 deletions(-)
 create mode 100644 include/libcamera/ipa/ipa_interface.h
 create mode 100644 src/ipa/ipa_dummy.cpp
 create mode 100644 src/ipa/meson.build
 create mode 100644 src/libcamera/include/ipa_manager.h
 create mode 100644 src/libcamera/ipa_interface.cpp
 create mode 100644 src/libcamera/ipa_manager.cpp
 delete mode 100644 test/ipa/shared_test.c
 delete mode 100644 test/ipa/shared_test.cpp