diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-05-29 14:39:25 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-06-06 18:17:35 +0300 |
commit | db86713ec17978cd4d42b74cece5be34aaa6a693 (patch) | |
tree | ea4bd916b93216cf4a1dd3c984d9e30303100dc0 /src/ipa/ipu3/algorithms/agc.cpp | |
parent | 0a37c203da58b3c23c011d8233c16c6063e3cb86 (diff) |
ipa: ipu3: agc: Drop hard-codec analogue gain max
As the sensor's analogue gain range is known, drop the arbitrary
maximum limit for the sensor analogue gain.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Tested-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/algorithms/agc.cpp')
-rw-r--r-- | src/ipa/ipu3/algorithms/agc.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index b5309bdb..606a237a 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -47,9 +47,8 @@ namespace ipa::ipu3::algorithms { LOG_DEFINE_CATEGORY(IPU3Agc) -/* Limits for analogue gain values */ +/* Minimum limit for analogue gain value */ static constexpr double kMinAnalogueGain = 1.0; -static constexpr double kMaxAnalogueGain = 8.0; /* \todo Honour the FrameDurationLimits control instead of hardcoding a limit */ static constexpr utils::Duration kMaxShutterSpeed = 60ms; @@ -97,10 +96,10 @@ int Agc::configure(IPAContext &context, kMaxShutterSpeed); minAnalogueGain_ = std::max(configuration.agc.minAnalogueGain, kMinAnalogueGain); - maxAnalogueGain_ = std::min(configuration.agc.maxAnalogueGain, kMaxAnalogueGain); + maxAnalogueGain_ = configuration.agc.maxAnalogueGain; /* Configure the default exposure and gain. */ - activeState.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain); + activeState.agc.gain = minAnalogueGain_; activeState.agc.exposure = 10ms / configuration.sensor.lineDuration; frameCount_ = 0; |