[libcamera-devel,PATCH/RFC,v2,0/4] Convert IPA API to plain C
mbox series

Message ID 20191013001340.14266-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • Convert IPA API to plain C
Related show

Message

Laurent Pinchart Oct. 13, 2019, 12:13 a.m. UTC
Hello,

This series converts the C++ IPA API to plain C. It gathers patches that
have already been posted separately, and reworks, improves and extends
them.

The rationale is explained in patch 2/4: to allow for closed-source IPAs
that don't link to libcamera, we need to offer a plain C API to IPAs.

The series starts in patch 1/4 with a small extension to the Buffer
class that is needed by later patches. Patch 2/4 then introduces the C
API, and patch 3/4 switches to it. The C++ IPAInterface class is kept as
it is easier to use from pipeline handlers (and can come handy for the
implementation of IPAs too), we thus introduce wrappers to convert
between the C and C++ APIs.

Patch 4/4 finally offers a shortcut to avoid conversions between the C
and C++ APIs when the IPA module implements an IPAInterface internally.

This is still work in progress, the IPAInterface configure(),
processEvents() and queueFrameAction are not fully implemented yet. The
infrastructure is present, but the parameters to the calls are not
translated. This will likely require serialisation of ControlList and
V4L2ControlInfoMap to complete the implementation.

Jacopo Mondi (1):
  ipa: Switch to the plain C API

Laurent Pinchart (3):
  libcamera: buffer: Add const accessor to Buffer planes
  ipa: Define a plain C API
  ipa: Allow short-circuiting the ipa_context_ops

 Documentation/Doxyfile.in                     |   1 +
 Documentation/meson.build                     |   2 +
 include/ipa/ipa_interface.h                   |  45 ++++
 include/libcamera/buffer.h                    |   1 +
 src/ipa/ipa_vimc.cpp                          |   6 +-
 src/ipa/libipa/ipa_interface_wrapper.cpp      | 159 +++++++++++
 src/ipa/libipa/ipa_interface_wrapper.h        |  46 ++++
 src/ipa/libipa/meson.build                    |  11 +
 src/ipa/meson.build                           |   3 +
 src/libcamera/buffer.cpp                      |   6 +
 src/libcamera/include/ipa_context_wrapper.h   |  41 +++
 src/libcamera/include/ipa_module.h            |   5 +-
 src/libcamera/include/meson.build             |   1 +
 src/libcamera/ipa_context_wrapper.cpp         | 158 +++++++++++
 src/libcamera/ipa_interface.cpp               | 246 +++++++++++++++---
 src/libcamera/ipa_manager.cpp                 |  67 ++++-
 src/libcamera/ipa_module.cpp                  |  23 +-
 src/libcamera/meson.build                     |   1 +
 .../proxy/worker/ipa_proxy_linux_worker.cpp   |   8 +-
 19 files changed, 780 insertions(+), 50 deletions(-)
 create mode 100644 src/ipa/libipa/ipa_interface_wrapper.cpp
 create mode 100644 src/ipa/libipa/ipa_interface_wrapper.h
 create mode 100644 src/ipa/libipa/meson.build
 create mode 100644 src/libcamera/include/ipa_context_wrapper.h
 create mode 100644 src/libcamera/ipa_context_wrapper.cpp