diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-03-15 15:34:07 +0200 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-03-17 16:35:51 +0000 |
commit | 4581ce0a8250d5d0cadb32793111c33030f3e127 (patch) | |
tree | 5d63c2d78ae873b222a66d522e09f6721ad9132b | |
parent | 4b2515899cb01c2fd99769a94b3221058279fc1d (diff) |
ipa: ipu3: agc: Use existing local short-hand variable in configure()
The configure() function has a local configuration variable referencing
context.configuration for the purpose of shortening lines. Use it
instead of context.configuration in the remaining locations, and
constify it while at it as the configuration isn't meant to be modified.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | src/ipa/ipu3/algorithms/agc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index 70cff3fe..7d4b3503 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -86,17 +86,17 @@ Agc::Agc() int Agc::configure(IPAContext &context, [[maybe_unused]] const IPAConfigInfo &configInfo) { - IPASessionConfiguration &configuration = context.configuration; + const IPASessionConfiguration &configuration = context.configuration; IPAFrameContext &frameContext = context.frameContext; stride_ = configuration.grid.stride; - minShutterSpeed_ = context.configuration.agc.minShutterSpeed; - maxShutterSpeed_ = std::min(context.configuration.agc.maxShutterSpeed, + minShutterSpeed_ = configuration.agc.minShutterSpeed; + maxShutterSpeed_ = std::min(configuration.agc.maxShutterSpeed, kMaxShutterSpeed); - minAnalogueGain_ = std::max(context.configuration.agc.minAnalogueGain, kMinAnalogueGain); - maxAnalogueGain_ = std::min(context.configuration.agc.maxAnalogueGain, kMaxAnalogueGain); + minAnalogueGain_ = std::max(configuration.agc.minAnalogueGain, kMinAnalogueGain); + maxAnalogueGain_ = std::min(configuration.agc.maxAnalogueGain, kMaxAnalogueGain); /* Configure the default exposure and gain. */ frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain); |