[libcamera-devel,v3,0/5] libcamera: converter: generalize Converter to remove MediaDevice dependency
mbox series

Message ID 20230928185537.20178-1-andrey.konovalov@linaro.org
Headers show
  • libcamera: converter: generalize Converter to remove MediaDevice dependency
Related show


Andrey Konovalov Sept. 28, 2023, 6:55 p.m. UTC
The first patch in this series is a few fixes to the
ConverterFactoryBase documentation.

The second patch is new in v3. This is a small fix which
didn't fit into the other patches (drops unneeded #include).

The third patch makes the Converter class more generic
by making pointer to MediaDevice an optional argument in
the relevant member functions.

The last two patches demonstrate a software converter using
this generalized version of the Converter class.

The raw bayer to RGB software converter implementation is
a slightly improved version of the ones in my previous
patchsets [1] and [2]. But this is still work in progress
hence the [RFC] for the last two patches (do not merge
them for now).

Changes in v3 vs v2:
- fixes to the ConverterFactoryBase documentation improved
  as per the review feedback
- added a separate patch which drops unneeded #include
  in src/libcamera/converter.cpp
- SwConverter code simplified as per the review comments,
  missing #include's added, isp_ is now created once - in
  the SwConverter constructor

Changes in v2 vs v1:
- added a separate patch to fix the ConverterFactoryBase documentation
- modified the Converter class to make the '*media' parameter optional
  instead of splitting out ConverterMD from the Converter. This
  also makes it possible to use the same ConverterFactory template
  for converters that rely on MediaDevice, and the software ones.
- removed the unnecessary header includes

[1] v1: https://patchwork.libcamera.org/cover/18924/
[2] v2: https://patchwork.libcamera.org/cover/19060/

Andrey Konovalov (5):
  libcamera: converter: a few fixes to ConverterFactoryBase
  libcamera: converter: drop unnecessary #include directive
  libcamera: converter: make using MediaDevice optional for the
  libcamera: converter: add software converter
  libcamera: pipeline: simple: enable software converter for qcom-camss

 include/libcamera/internal/converter.h        |   9 +-
 .../internal/converter/converter_softw.h      | 100 ++++
 .../libcamera/internal/converter/meson.build  |   1 +
 src/libcamera/converter.cpp                   |  46 +-
 src/libcamera/converter/converter_softw.cpp   | 445 ++++++++++++++++++
 src/libcamera/converter/meson.build           |   3 +-
 src/libcamera/pipeline/simple/simple.cpp      |  41 +-
 7 files changed, 611 insertions(+), 34 deletions(-)
 create mode 100644 include/libcamera/internal/converter/converter_softw.h
 create mode 100644 src/libcamera/converter/converter_softw.cpp