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

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

Message

Paul Elder June 3, 2019, 11:16 p.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 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, major version, and minor version
  libcamera: ipa_module_info: update struct to allow IPA matching
  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: store IPA in pipeline data
  libcamera: pipeline: vimc: add dummy IPA

 Documentation/Doxyfile.in                |   7 +-
 include/libcamera/ipa/ipa_interface.h    |  22 +++
 include/libcamera/ipa/ipa_module_info.h  |  12 +-
 include/libcamera/meson.build            |   1 +
 src/ipa/ipa_dummy.cpp                    |  45 +++++++
 src/ipa/meson.build                      |  13 ++
 src/libcamera/include/ipa_manager.h      |  39 ++++++
 src/libcamera/include/ipa_module.h       |  16 +++
 src/libcamera/include/pipeline_handler.h |  17 ++-
 src/libcamera/ipa_interface.cpp          |  27 ++++
 src/libcamera/ipa_manager.cpp            | 141 +++++++++++++++++++
 src/libcamera/ipa_module.cpp             | 165 +++++++++++++++++++++--
 src/libcamera/meson.build                |   6 +-
 src/libcamera/pipeline/ipu3/ipu3.cpp     |  13 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp |  14 +-
 src/libcamera/pipeline/uvcvideo.cpp      |  11 +-
 src/libcamera/pipeline/vimc.cpp          |  23 +++-
 src/libcamera/pipeline_handler.cpp       |  40 +++++-
 src/meson.build                          |   1 +
 test/ipa/ipa_test.cpp                    |  36 ++---
 test/ipa/meson.build                     |  11 --
 test/ipa/shared_test.c                   |   6 -
 test/ipa/shared_test.cpp                 |   4 +-
 test/libtest/test.cpp                    |   6 +
 24 files changed, 604 insertions(+), 72 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