libipa: agc_mean_luminance: Fix constraint logging

The debug log statements in constraintClampGain() are after the
assignment of gain. So they correctly log when the constraint applies,
but the gain values logged are the same. Fix that.

Fixes: 42e18c96bc ("libipa: agc_mean_luminance: Add debug logging")
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Stefan Klug
2025-09-19 10:48:05 +01:00
committed by Kieran Bingham
parent 3c3b9f1091
commit 3d310f106a
+2 -2
View File
@@ -488,18 +488,18 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,
if (constraint.bound == AgcConstraint::Bound::Lower &&
newGain > gain) {
gain = newGain;
LOG(AgcMeanLuminance, Debug)
<< "Apply lower bound: " << gain << " to "
<< newGain;
gain = newGain;
}
if (constraint.bound == AgcConstraint::Bound::Upper &&
newGain < gain) {
gain = newGain;
LOG(AgcMeanLuminance, Debug)
<< "Apply upper bound: " << gain << " to "
<< newGain;
gain = newGain;
}
}