[v2,16/17] libipa: awb_bayes: Remove overly verbose log messages
diff mbox series

Message ID 20250123114204.79321-17-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • Add Bayesian AWB algorithm to libipa and rkisp1
Related show

Commit Message

Stefan Klug Jan. 23, 2025, 11:41 a.m. UTC
Logging every search step is too verbose even with debug messages
enabled and it hides the more important messages (min max values of
errors and likelihoods). Remove the debug messages in a separate commit,
so that it can easily be reverted if needed.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

---

Changes in v2:
- Added this commit
---
 src/ipa/libipa/awb_bayes.cpp | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Paul Elder Jan. 27, 2025, 11:42 a.m. UTC | #1
On Thu, Jan 23, 2025 at 12:41:06PM +0100, Stefan Klug wrote:
> Logging every search step is too verbose even with debug messages
> enabled and it hides the more important messages (min max values of
> errors and likelihoods). Remove the debug messages in a separate commit,
> so that it can easily be reverted if needed.
> 
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> 
> ---
> 
> Changes in v2:
> - Added this commit
> ---
>  src/ipa/libipa/awb_bayes.cpp | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp
> index aaa8c7a663ad..6b88aebeffb5 100644
> --- a/src/ipa/libipa/awb_bayes.cpp
> +++ b/src/ipa/libipa/awb_bayes.cpp
> @@ -330,12 +330,6 @@ double AwbBayes::coarseSearch(const ipa::Pwl &prior, const AwbStats &stats) cons
>  		errorLimits.record(delta2Sum);
>  		priorLogLikelihoodLimits.record(priorLogLikelihood);
>  
> -		LOG(Awb, Debug) << "Coarse search t: " << t
> -				<< " gains: " << gains
> -				<< " error: " << delta2Sum
> -				<< " prior: " << priorLogLikelihood
> -				<< " likelihood: " << finalLogLikelihood;
> -
>  		points.push_back({ { t, finalLogLikelihood } });
>  		if (points.back().y() < points[bestPoint].y())
>  			bestPoint = points.size() - 1;
> @@ -453,13 +447,6 @@ void AwbBayes::fineSearch(double &t, double &r, double &b, ipa::Pwl const &prior
>  		double delta2Sum = stats.computeColourError(gains);
>  		errorLimits.record(delta2Sum);
>  		double finalLogLikelihood = delta2Sum - priorLogLikelihood;
> -		LOG(Awb, Debug)
> -			<< "Fine search t: " << tTest
> -			<< " r: " << rbTest[0]
> -			<< " b: " << rbTest[1]
> -			<< " offset: " << bestOffset
> -			<< " likelihood: " << finalLogLikelihood
> -			<< (finalLogLikelihood < bestLogLikelihood ? " NEW BEST" : "");
>  
>  		if (bestT == 0 || finalLogLikelihood < bestLogLikelihood) {
>  			bestLogLikelihood = finalLogLikelihood;
> -- 
> 2.43.0
>

Patch
diff mbox series

diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp
index aaa8c7a663ad..6b88aebeffb5 100644
--- a/src/ipa/libipa/awb_bayes.cpp
+++ b/src/ipa/libipa/awb_bayes.cpp
@@ -330,12 +330,6 @@  double AwbBayes::coarseSearch(const ipa::Pwl &prior, const AwbStats &stats) cons
 		errorLimits.record(delta2Sum);
 		priorLogLikelihoodLimits.record(priorLogLikelihood);
 
-		LOG(Awb, Debug) << "Coarse search t: " << t
-				<< " gains: " << gains
-				<< " error: " << delta2Sum
-				<< " prior: " << priorLogLikelihood
-				<< " likelihood: " << finalLogLikelihood;
-
 		points.push_back({ { t, finalLogLikelihood } });
 		if (points.back().y() < points[bestPoint].y())
 			bestPoint = points.size() - 1;
@@ -453,13 +447,6 @@  void AwbBayes::fineSearch(double &t, double &r, double &b, ipa::Pwl const &prior
 		double delta2Sum = stats.computeColourError(gains);
 		errorLimits.record(delta2Sum);
 		double finalLogLikelihood = delta2Sum - priorLogLikelihood;
-		LOG(Awb, Debug)
-			<< "Fine search t: " << tTest
-			<< " r: " << rbTest[0]
-			<< " b: " << rbTest[1]
-			<< " offset: " << bestOffset
-			<< " likelihood: " << finalLogLikelihood
-			<< (finalLogLikelihood < bestLogLikelihood ? " NEW BEST" : "");
 
 		if (bestT == 0 || finalLogLikelihood < bestLogLikelihood) {
 			bestLogLikelihood = finalLogLikelihood;