Message ID | 20250815102945.1602071-8-stefan.klug@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Hi Stefan On 15/08/2025 11:29, Stefan Klug wrote: > 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: 42e18c96bcb7 ("libipa: agc_mean_luminance: Add debug logging") > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> > --- > > Changes in v3: > - Added this patch > --- > src/ipa/libipa/agc_mean_luminance.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp > index ff96a381ffce..fce1a5064870 100644 > --- a/src/ipa/libipa/agc_mean_luminance.cpp > +++ b/src/ipa/libipa/agc_mean_luminance.cpp > @@ -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; > } > } >
Quoting Stefan Klug (2025-08-15 11:29:27) > 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: 42e18c96bcb7 ("libipa: agc_mean_luminance: Add debug logging") > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > > Changes in v3: > - Added this patch > --- > src/ipa/libipa/agc_mean_luminance.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp > index ff96a381ffce..fce1a5064870 100644 > --- a/src/ipa/libipa/agc_mean_luminance.cpp > +++ b/src/ipa/libipa/agc_mean_luminance.cpp > @@ -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; > } > } > > -- > 2.48.1 >
diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index ff96a381ffce..fce1a5064870 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -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; } }
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: 42e18c96bcb7 ("libipa: agc_mean_luminance: Add debug logging") Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes in v3: - Added this patch --- src/ipa/libipa/agc_mean_luminance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)