[libcamera-devel,RFC,0/5] Add IPAManager
mbox series

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

Message

Paul Elder May 22, 2019, 9:02 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, but a pipeline may work
with many IPAs (not simultaneously).

I took inspiration from the DeviceEnumerator, and went for one
IPAManager, that scans a directory (or many) for IPA modules, and loads
them into a list, after which a pipeline handler can aquire one.
5/5 "libcamera: pipelines: add IPAManager" shows how this might work.
The pipeline handler fills in parameters into a struct IPAModuleInfo
which the IPA manager uses to find a matching IPA module.

I do realize that some (a lot) of the documentation is unfinished, but I
wanted to get some feedback on this direction before doing so.

Paul Elder (5):
  libcamera: ipa_module_info: update struct to allow IPA matching
  libcamera: ipa_module: add aquired attribute
  libcamera: ipa_manager: implement class for managing IPA modules
  test: ipa_manager: add test for IPAManager
  libcamera: pipelines: add IPAManager

 include/libcamera/ipa/ipa_module_info.h  |   8 +-
 src/libcamera/camera_manager.cpp         |   8 +-
 src/libcamera/include/ipa_manager.h      |  38 +++++++++
 src/libcamera/include/ipa_module.h       |   5 ++
 src/libcamera/include/pipeline_handler.h |   3 +-
 src/libcamera/ipa_manager.cpp            | 102 +++++++++++++++++++++++
 src/libcamera/ipa_module.cpp             |  21 ++++-
 src/libcamera/meson.build                |   2 +
 src/libcamera/pipeline/ipu3/ipu3.cpp     |   5 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp |   5 +-
 src/libcamera/pipeline/uvcvideo.cpp      |  18 +++-
 src/libcamera/pipeline/vimc.cpp          |   4 +-
 test/ipa/ipa_manager_test.cpp            |  43 ++++++++++
 test/ipa/ipa_test.cpp                    |  37 +++++---
 test/ipa/meson.build                     |   3 +-
 test/ipa/shared_test.c                   |   4 +-
 test/ipa/shared_test.cpp                 |   6 +-
 17 files changed, 283 insertions(+), 29 deletions(-)
 create mode 100644 src/libcamera/include/ipa_manager.h
 create mode 100644 src/libcamera/ipa_manager.cpp
 create mode 100644 test/ipa/ipa_manager_test.cpp