[00/10] libipa: agc: Add digital gain support
mbox series

Message ID 20261117-sklug-digital-gain-support-v1-v1-0-f0aa342ca877@ideasonboard.com
Headers show
Series
  • libipa: agc: Add digital gain support
Related show

Message

Stefan Klug Nov. 17, 2026, 8:47 a.m. UTC
Hi everyone,

Currently Agc (or specifically AgcMeanLuminance) doesn't support digital
gain. In cases where either the sensor has no analogue gain or the
available gain is not sufficient, digital gain is very useful. This
series implements digital gain support for AgcMeanLuminance.

Patches 1-6 implement digital gain and unconditionally enable it on
RkIsp1. Unconditionally enabling it is not entirely correct as we can
only apply digital gain if the Compress algorithm is provided in the
tuning file.

To properly solve that, we need some kind of inter-algorithm
dependencies. Patches 7-9 implement a prototype for a simple dependency
management. These patch are marked as RFC and should be treated as
discussion basis.

As we don't have tuning files in mainline that use digital gain, I think
we could still continue with patches 1-6 even if we need more time for
the rest as there is no negative effect for the user.

Best regards,
Stefan

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
Stefan Klug (10):
      libipa: exposure_mode_helper: Add digital gain support
      libcamera: control_ids_core: Add DigitalGainMode enum
      libipa: agc_mean_luminance: Add support for digital gain
      libipa: agc: Rename agEnable to agMode
      libipa: agc: Pass agc::Session to prepare()
      libipa: agc: Implement DigitalGainMode support
      ipa: rkisp1: agc: Add digital gain support
      RFC ipa: libipa: Inject the registered name into an algorithm
      RFC ipa: libipa: Implement algorithm dependencies
      RFC rkisp1: Model dependencies between Compress and Agc

 src/ipa/ipu3/algorithms/agc.cpp         |   2 +-
 src/ipa/libipa/agc.cpp                  | 102 ++++++++++++++++--
 src/ipa/libipa/agc.h                    |  10 +-
 src/ipa/libipa/agc_mean_luminance.cpp   |  30 +++++-
 src/ipa/libipa/agc_mean_luminance.h     |   3 +-
 src/ipa/libipa/algorithm.cpp            |  22 ++++
 src/ipa/libipa/algorithm.h              |  69 ++++++++++++-
 src/ipa/libipa/exposure_mode_helper.cpp |  90 +++++++++++-----
 src/ipa/libipa/exposure_mode_helper.h   |   8 +-
 src/ipa/libipa/module.h                 | 178 ++++++++++++++++++++++++++------
 src/ipa/mali-c55/algorithms/agc.cpp     |   2 +-
 src/ipa/rkisp1/algorithms/agc.cpp       |  46 +++++++--
 src/ipa/rkisp1/algorithms/agc.h         |   2 +
 src/ipa/rkisp1/algorithms/compress.cpp  |  17 +++
 src/ipa/rkisp1/algorithms/compress.h    |   2 +
 src/ipa/rkisp1/rkisp1.cpp               |  16 +--
 src/ipa/softisp/algorithms/agc.cpp      |   2 +-
 src/libcamera/control_ids_core.yaml     |  44 ++++++++
 18 files changed, 554 insertions(+), 91 deletions(-)
---
base-commit: da6a6ed33ed0ab305f10b6f8b44736150d39cef4
change-id: 20261113-sklug-digital-gain-support-v1-0f0855f98ac6

Best regards,