libipa: agc_mean_luminance: Add debug logging

When debugging the AEGC it is important to know when the constraints
apply. As this is important information for anyone doing tuning file
optimization, add it upstream.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Stefan Klug
2025-07-07 10:55:07 +02:00
parent 6630533c8d
commit 42e18c96bc

View File

@@ -467,12 +467,20 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,
hist.interQuantileMean(constraint.qLo, constraint.qHi); hist.interQuantileMean(constraint.qLo, constraint.qHi);
if (constraint.bound == AgcConstraint::Bound::Lower && if (constraint.bound == AgcConstraint::Bound::Lower &&
newGain > gain) newGain > gain) {
gain = newGain; gain = newGain;
LOG(AgcMeanLuminance, Debug)
<< "Apply lower bound: " << gain << " to "
<< newGain;
}
if (constraint.bound == AgcConstraint::Bound::Upper && if (constraint.bound == AgcConstraint::Bound::Upper &&
newGain < gain) newGain < gain) {
gain = newGain; gain = newGain;
LOG(AgcMeanLuminance, Debug)
<< "Apply upper bound: " << gain << " to "
<< newGain;
}
} }
return gain; return gain;