[libcamera-devel,v6,00/10] ipa: rkisp1: Add autofocus algorithm
mbox series

Message ID 20230331081930.19289-1-dse@thaumatec.com
Headers show
Series
  • ipa: rkisp1: Add autofocus algorithm
Related show

Message

Daniel Semkowicz March 31, 2023, 8:19 a.m. UTC
This is the updated version of the common contrast based Auto Focus
algorithm implementation and it's usage for RkISP1 AF implementation.

Main changes in v6:
- Pass lens controls to IPA in init() instead of configure()
- Make IPASessionConfiguration::lens optional and set the values
  only if lens was detected
- Add AF controls in IPARkISP1::updateControls() only if lens
  was detected
- Replace __FUNCTION__ with inline text
- Change if..else to switch() in requested places
- Remove final specifiers from AfHillClimbing functions
- Rename AfHillClimbing::setFramesToSkip() to skipFrames()

Best regards
Daniel Semkowicz

Daniel Semkowicz (10):
  rkisp1: Add camera lens to PH and expose it to the IPA
  ipa: rkisp1: Add lens limits to the session config
  ipa: Add base class defining AF algorithm interface
  ipa: Add common contrast based AF implementation
  ipa: af_hill_climbing: Add "Windows" metering mode
  ipa: rkisp1: Add AF algorithm based on AfHillClimbing
  ipa: rkisp1: af: Add "Windows" Metering mode
  ipa: rkisp1: Add AF controls to the RkISP1 IPA
  rkisp1: Control camera lens position from IPA
  ipa: rkisp1: Add OV5675 tuning file

 include/libcamera/ipa/rkisp1.mojom            |   4 +-
 src/ipa/libipa/algorithms/af.cpp              | 159 +++++++
 src/ipa/libipa/algorithms/af.h                |  46 ++
 .../libipa/algorithms/af_hill_climbing.cpp    | 424 ++++++++++++++++++
 src/ipa/libipa/algorithms/af_hill_climbing.h  | 101 +++++
 src/ipa/libipa/algorithms/meson.build         |  11 +
 src/ipa/libipa/meson.build                    |   6 +
 src/ipa/rkisp1/algorithms/af.cpp              | 183 ++++++++
 src/ipa/rkisp1/algorithms/af.h                |  54 +++
 src/ipa/rkisp1/algorithms/meson.build         |   1 +
 src/ipa/rkisp1/data/meson.build               |   1 +
 src/ipa/rkisp1/data/ov5675.yaml               |  18 +
 src/ipa/rkisp1/ipa_context.cpp                |  30 ++
 src/ipa/rkisp1/ipa_context.h                  |  14 +
 src/ipa/rkisp1/rkisp1.cpp                     |  58 +++
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  22 +-
 16 files changed, 1130 insertions(+), 2 deletions(-)
 create mode 100644 src/ipa/libipa/algorithms/af.cpp
 create mode 100644 src/ipa/libipa/algorithms/af.h
 create mode 100644 src/ipa/libipa/algorithms/af_hill_climbing.cpp
 create mode 100644 src/ipa/libipa/algorithms/af_hill_climbing.h
 create mode 100644 src/ipa/libipa/algorithms/meson.build
 create mode 100644 src/ipa/rkisp1/algorithms/af.cpp
 create mode 100644 src/ipa/rkisp1/algorithms/af.h
 create mode 100644 src/ipa/rkisp1/data/ov5675.yaml