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>
This commit is contained in:
parent
0a37c203da
commit
db86713ec1
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue