summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-03-23 10:49:30 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-03-28 14:12:20 +0100
commitf7bf0be65360d9154e3bbed8d1a4c69cad7b0b98 (patch)
tree5746ee7c74f0fc6b002e7a99bf306d34a1bffadc
parent6e889113380111dfa10438e4a5a6b25d73e84c18 (diff)
ipa: raspberrypi: Fix default frame durations calculation
Fix a bug in the default frame durations calculation where the min/max values are swapped round. This is a rarely travelled code path, so has not actually caused a reported failure. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index c10e57e0..66a020d0 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -1486,8 +1486,8 @@ void IPARPi::applyFrameDurations(Duration minFrameDuration, Duration maxFrameDur
* This will only be applied once AGC recalculations occur.
* The values may be clamped based on the sensor mode capabilities as well.
*/
- minFrameDuration_ = minFrameDuration ? minFrameDuration : defaultMaxFrameDuration;
- maxFrameDuration_ = maxFrameDuration ? maxFrameDuration : defaultMinFrameDuration;
+ minFrameDuration_ = minFrameDuration ? minFrameDuration : defaultMinFrameDuration;
+ maxFrameDuration_ = maxFrameDuration ? maxFrameDuration : defaultMaxFrameDuration;
minFrameDuration_ = std::clamp(minFrameDuration_,
mode_.minFrameDuration, mode_.maxFrameDuration);
maxFrameDuration_ = std::clamp(maxFrameDuration_,