[libcamera-devel,v4,00/11] Introduce AGC for RkISP1
mbox series

Message ID 20211124134019.110765-1-jeanmichel.hautbois@ideasonboard.com
Headers show
Series
  • Introduce AGC for RkISP1
Related show

Message

Jean-Michel Hautbois Nov. 24, 2021, 1:40 p.m. UTC
Hello,

This is the v4 of the RkISP1 AGC series.

In v3, a template for the Algorithm class is introduced in
patch 6/11 and 7/11 for the RkISP1 implementation.

Now that AGC is working pretty nicely on IPU3, make it work on RkISP1
too.

For that purpose, patches 1/11 to 5/11 reuse the concepts of Algorithm and
IPAContext and make those part of the rkisp1 IPA. The effective sensor
controls can then be reported with patch 8/11.

In v4, the hw revision is included in IPAContext before the AGC uses it
(patch 9/11).

Patch 10/11 is a small adaptation of the IPU3 AGC: we reuse the relative
luminance estimation, basing it on the Y mean measured by the ISP, and
removes the histogram based calculation for now.

In v2 the improvements from Laurent's series "ipa: ipu3: agc: Misc
improvements" are also included.

Patch 11/11 introduces a new prepare() call from the Algorithm class in
AGC.

Jean-Michel Hautbois (11):
  libipa: Correct IMX219 in CameraSensorHelper
  ipa: rkisp1: Pass IPASettings at init call
  ipa: Do not modify the sensor limits
  ipa: rkisp1: Instantiate CameraSensorHelper
  ipa: rkisp1: Introduce IPAContext
  ipa: libipa: Introduce Algorithm class template
  ipa: rkisp1: Use the Algorithm class
  ipa: rkisp1: Report and use sensor controls
  ipa: rkisp1: agc: Configure the number of cells used by HW
  ipa: rkisp1: Introduce AGC
  ipa: rkisp1: agc: Introduce prepare call

 include/libcamera/ipa/rkisp1.mojom            |   6 +-
 src/ipa/ipu3/algorithms/algorithm.h           |  12 +-
 src/ipa/ipu3/algorithms/awb.cpp               |   9 +
 src/ipa/ipu3/algorithms/meson.build           |   1 -
 src/ipa/ipu3/ipu3.cpp                         |   4 +-
 .../{ipu3/algorithms => libipa}/algorithm.cpp |  38 +--
 src/ipa/libipa/algorithm.h                    |  38 +++
 src/ipa/libipa/camera_sensor_helper.cpp       |   2 +-
 src/ipa/libipa/meson.build                    |   1 +
 src/ipa/rkisp1/algorithms/agc.cpp             | 286 ++++++++++++++++++
 src/ipa/rkisp1/algorithms/agc.h               |  46 +++
 src/ipa/rkisp1/algorithms/algorithm.h         |  25 ++
 src/ipa/rkisp1/algorithms/meson.build         |   5 +
 src/ipa/rkisp1/ipa_context.cpp                | 111 +++++++
 src/ipa/rkisp1/ipa_context.h                  |  51 ++++
 src/ipa/rkisp1/meson.build                    |  11 +-
 src/ipa/rkisp1/rkisp1.cpp                     | 128 ++++----
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   5 +-
 18 files changed, 688 insertions(+), 91 deletions(-)
 rename src/ipa/{ipu3/algorithms => libipa}/algorithm.cpp (75%)
 create mode 100644 src/ipa/libipa/algorithm.h
 create mode 100644 src/ipa/rkisp1/algorithms/agc.cpp
 create mode 100644 src/ipa/rkisp1/algorithms/agc.h
 create mode 100644 src/ipa/rkisp1/algorithms/algorithm.h
 create mode 100644 src/ipa/rkisp1/algorithms/meson.build
 create mode 100644 src/ipa/rkisp1/ipa_context.cpp
 create mode 100644 src/ipa/rkisp1/ipa_context.h