Message ID | 20250331144352.736700-5-stefan.klug@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Quoting Stefan Klug (2025-03-31 15:43:43) > 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> > --- > src/ipa/libipa/agc_mean_luminance.cpp | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp > index f617fde81101..9154f083a510 100644 > --- a/src/ipa/libipa/agc_mean_luminance.cpp > +++ b/src/ipa/libipa/agc_mean_luminance.cpp > @@ -468,12 +468,16 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex, > hist.interQuantileMean(constraint.qLo, constraint.qHi); > > if (constraint.bound == AgcConstraint::Bound::Lower && > - newGain > gain) > + newGain > gain) { > gain = newGain; > + LOG(AgcMeanLuminance, Debug) << "Apply lower bound: " << gain << " to " << newGain; > + } > > if (constraint.bound == AgcConstraint::Bound::Upper && > - newGain < gain) > + newGain < gain) { > gain = newGain; > + LOG(AgcMeanLuminance, Debug) << "Apply upper bound: " << gain << " to " << newGain; > + } Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > } > > return gain; > -- > 2.43.0 >
Hi Stefan On 31/03/2025 15:43, Stefan Klug wrote: > 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> > --- Makes sense to me: Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> > src/ipa/libipa/agc_mean_luminance.cpp | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp > index f617fde81101..9154f083a510 100644 > --- a/src/ipa/libipa/agc_mean_luminance.cpp > +++ b/src/ipa/libipa/agc_mean_luminance.cpp > @@ -468,12 +468,16 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex, > hist.interQuantileMean(constraint.qLo, constraint.qHi); > > if (constraint.bound == AgcConstraint::Bound::Lower && > - newGain > gain) > + newGain > gain) { > gain = newGain; > + LOG(AgcMeanLuminance, Debug) << "Apply lower bound: " << gain << " to " << newGain; > + } > > if (constraint.bound == AgcConstraint::Bound::Upper && > - newGain < gain) > + newGain < gain) { > gain = newGain; > + LOG(AgcMeanLuminance, Debug) << "Apply upper bound: " << gain << " to " << newGain; > + } > } > > return gain;
diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index f617fde81101..9154f083a510 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -468,12 +468,16 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex, hist.interQuantileMean(constraint.qLo, constraint.qHi); if (constraint.bound == AgcConstraint::Bound::Lower && - newGain > gain) + newGain > gain) { gain = newGain; + LOG(AgcMeanLuminance, Debug) << "Apply lower bound: " << gain << " to " << newGain; + } if (constraint.bound == AgcConstraint::Bound::Upper && - newGain < gain) + newGain < gain) { gain = newGain; + LOG(AgcMeanLuminance, Debug) << "Apply upper bound: " << gain << " to " << newGain; + } } return gain;
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> --- src/ipa/libipa/agc_mean_luminance.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)