[libcamera-devel] [PATCH v4 00/12] Add tuning file support for the RkISP1 IPA module

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jun 20 03:42:53 CEST 2022


Hello,

This patch series is a new version of Florian's "[PATCH v3 0/5] Add
tuning file support for rkisp1 blc algo".

The first 6 patches address an issue with v3 that stemmed from the new
YAML file format, using ordered mappings. As ordered mappings can't be
indexed by key, the retrieval of algorithm data by each algorithm got
broken. Instead of trying to fix that issue, I decided to bite the
bullet and make the algorithms dynamically instantiable, like done in
the RPi IPA.

To support this without duplicating too much code in different IPA
modules, patch 01/12 introduces a Module class template for IPA modules.
Patch 02/12 then cleans up documentation a little bit, and patch 03/12
adds an algorithm registration mechanism. Patch 04/12 extends the
Algorithm class with an init() function to parse the tuning data for the
algorithm, and patch 05/12 supports dynamic instantiation of algorithms
from YAML in the Module class. Patch 06/12 is a small debugging
improvement.

The rest of the series is similar to v3, with patch 07/12 that
implements tuning file selection in the RkISP1 pipeline handler. Patch
08/12 then enables algorithm registration in the RkISP1 IPA module, and
patch 09/12 implements tuning data parsing in the IPA. Patch 10/12 is
new and adds a tuning file for the IMX219, while patches 11/12 and 12/12
are similar to v3 (with the changes required by the rework of the rest
of the series).

Changes to patches present in v3 are described in individual patches.

I'm tempted to merge the src/ipa/${ipa}/algorithms/algorithm.h file with
src/ipa/${ipa}/module.h, as the Algorithm and Module class are very
related, and both files are very small. Feedback would be appreciated.

Florian Sylvestre (5):
  ipa: libipa: algorithm: Add init() function to the Algorithm class
  pipeline: rkisp1: Support IPA tuning file
  ipa: rkisp1: Add YAML tuning file support
  ipa: rkisp1: Add OV5640 tuning file
  ipa: rkisp1: Add support of Black Level Correction tuning

Laurent Pinchart (7):
  ipa: libipa: Introduce a Module class template
  ipa: libipa: Move ipa namespace documentation to module.cpp
  ipa: libipa: algorithm: Add an algorithm registration mechanism
  ipa: libipa: module: Add support for instantiation from YAML
  ipa: libipa: module: Make the Module class Loggable
  ipa: rkisp1: Register algorithms
  ipa: rkisp1: Add IMX219 tuning file

 src/ipa/ipu3/algorithms/algorithm.h      |   8 +-
 src/ipa/ipu3/module.h                    |  27 +++++
 src/ipa/libipa/algorithm.cpp             |  87 ++++++++++++++--
 src/ipa/libipa/algorithm.h               |  64 ++++++++++--
 src/ipa/libipa/libipa.cpp                |  22 ----
 src/ipa/libipa/meson.build               |   6 +-
 src/ipa/libipa/module.cpp                | 126 +++++++++++++++++++++++
 src/ipa/libipa/module.h                  | 124 ++++++++++++++++++++++
 src/ipa/rkisp1/algorithms/agc.cpp        |   2 +
 src/ipa/rkisp1/algorithms/algorithm.h    |  10 +-
 src/ipa/rkisp1/algorithms/awb.cpp        |   2 +
 src/ipa/rkisp1/algorithms/blc.cpp        |  51 +++++++--
 src/ipa/rkisp1/algorithms/blc.h          |  10 +-
 src/ipa/rkisp1/data/imx219.yaml          |  13 +++
 src/ipa/rkisp1/data/meson.build          |  10 ++
 src/ipa/rkisp1/data/ov5640.yaml          |  13 +++
 src/ipa/rkisp1/data/uncalibrated.yaml    |   8 ++
 src/ipa/rkisp1/meson.build               |   1 +
 src/ipa/rkisp1/module.h                  |  27 +++++
 src/ipa/rkisp1/rkisp1.cpp                |  54 +++++++---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp |  20 +++-
 21 files changed, 608 insertions(+), 77 deletions(-)
 create mode 100644 src/ipa/ipu3/module.h
 delete mode 100644 src/ipa/libipa/libipa.cpp
 create mode 100644 src/ipa/libipa/module.cpp
 create mode 100644 src/ipa/libipa/module.h
 create mode 100644 src/ipa/rkisp1/data/imx219.yaml
 create mode 100644 src/ipa/rkisp1/data/meson.build
 create mode 100644 src/ipa/rkisp1/data/ov5640.yaml
 create mode 100644 src/ipa/rkisp1/data/uncalibrated.yaml
 create mode 100644 src/ipa/rkisp1/module.h

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list