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

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

Message

Andrey Konovalov Sept. 10, 2023, 5:50 p.m. UTC
This series is one patch which makes the Converter class more
generic by moving the MediaDevice related part out into
derived class, and two more patches which 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 one in my previous
patchset [1] (buffers mapping fixed). But this is still
work in progress hence the [RFC] for the last two patches.

I am almost sure that the software converters deserve their
own converter factory, but haven't got to implementing one
yet. So for now, in the last patch the Simple pipeline handler
just instanciates a SwConverter directly.

[1] https://patchwork.libcamera.org/cover/18924/

Andrey Konovalov (3):
  libcamera: converter: split ConverterMD (media device) out of
    Converter
  libcamera: converter: add software converter
  libcamera: pipeline: simple: add software converter support

 include/libcamera/internal/converter.h        |  49 +--
 .../internal/converter/converter_softw.h      |  88 ++++
 .../internal/converter/converter_v4l2_m2m.h   |   4 +-
 .../libcamera/internal/converter/meson.build  |   1 +
 include/libcamera/internal/converter_media.h  |  86 ++++
 include/libcamera/internal/meson.build        |   1 +
 src/libcamera/converter.cpp                   | 191 +-------
 src/libcamera/converter/converter_softw.cpp   | 412 ++++++++++++++++++
 .../converter/converter_v4l2_m2m.cpp          |   4 +-
 src/libcamera/converter/meson.build           |   3 +-
 src/libcamera/converter_media.cpp             | 241 ++++++++++
 src/libcamera/meson.build                     |   1 +
 src/libcamera/pipeline/simple/simple.cpp      |  38 +-
 13 files changed, 865 insertions(+), 254 deletions(-)
 create mode 100644 include/libcamera/internal/converter/converter_softw.h
 create mode 100644 include/libcamera/internal/converter_media.h
 create mode 100644 src/libcamera/converter/converter_softw.cpp
 create mode 100644 src/libcamera/converter_media.cpp