[libcamera-devel,v2,2/3] libcamera: ipa: raspberrypi: Demote warnings about lack of AWB results
diff mbox series

Message ID 20210618161807.24242-3-david.plowman@raspberrypi.com
State Superseded
Headers show
Series
  • Support monochrome raw sensors
Related show

Commit Message

David Plowman June 18, 2021, 4:18 p.m. UTC
Warnings about the lack of AWB status results are demoted to being
just "Debug". With monochrome sensors becoming more common this would
otherwise overwhelm the console output, and in practice nothing is
really lost as it is normally very evident if AWB is failing to run.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/raspberrypi/controller/rpi/agc.cpp  | 2 +-
 src/ipa/raspberrypi/controller/rpi/alsc.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Kieran Bingham June 18, 2021, 8:06 p.m. UTC | #1
Hi David

On 18/06/2021 17:18, David Plowman wrote:
> Warnings about the lack of AWB status results are demoted to being
> just "Debug". With monochrome sensors becoming more common this would
> otherwise overwhelm the console output, and in practice nothing is
> really lost as it is normally very evident if AWB is failing to run.
> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> ---
>  src/ipa/raspberrypi/controller/rpi/agc.cpp  | 2 +-
>  src/ipa/raspberrypi/controller/rpi/alsc.cpp | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
> index 55e80ac7..2c95f287 100644
> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
> @@ -481,7 +481,7 @@ void Agc::fetchAwbStatus(Metadata *image_metadata)
>  	awb_.gain_g = 1.0;
>  	awb_.gain_b = 1.0;
>  	if (image_metadata->Get("awb.status", awb_) != 0)
> -		LOG(RPiAgc, Warning) << "Agc: no AWB status found";
> +		LOG(RPiAgc, Debug) << "Agc: no AWB status found";

Would it make any more sense to disable the warning instead if the
sensor is mono?

>  }
>  
>  static double compute_initial_Y(bcm2835_isp_stats *stats, AwbStatus const &awb,
> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> index b0d24aa2..c58ef7d0 100644
> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> @@ -267,7 +267,7 @@ double get_ct(Metadata *metadata, double default_ct)
>  	AwbStatus awb_status;
>  	awb_status.temperature_K = default_ct; // in case nothing found
>  	if (metadata->Get("awb.status", awb_status) != 0)
> -		LOG(RPiAlsc, Warning) << "no AWB results found, using "
> +		LOG(RPiAlsc, Debug) << "no AWB results found, using "
>  				      << awb_status.temperature_K;

Same comment as above, but also - when the indentation on a multiline
statement changes, the other lines should be adjusted as well (in this
case to maintain the vertical alignment of the <<'s.

If it doesn't make sense (or isn't feasible) to disable on Mono sensors,
then with the alignment fixed:

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

>  	else
>  		LOG(RPiAlsc, Debug) << "AWB results found, using "
>

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
index 55e80ac7..2c95f287 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
@@ -481,7 +481,7 @@  void Agc::fetchAwbStatus(Metadata *image_metadata)
 	awb_.gain_g = 1.0;
 	awb_.gain_b = 1.0;
 	if (image_metadata->Get("awb.status", awb_) != 0)
-		LOG(RPiAgc, Warning) << "Agc: no AWB status found";
+		LOG(RPiAgc, Debug) << "Agc: no AWB status found";
 }
 
 static double compute_initial_Y(bcm2835_isp_stats *stats, AwbStatus const &awb,
diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
index b0d24aa2..c58ef7d0 100644
--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
@@ -267,7 +267,7 @@  double get_ct(Metadata *metadata, double default_ct)
 	AwbStatus awb_status;
 	awb_status.temperature_K = default_ct; // in case nothing found
 	if (metadata->Get("awb.status", awb_status) != 0)
-		LOG(RPiAlsc, Warning) << "no AWB results found, using "
+		LOG(RPiAlsc, Debug) << "no AWB results found, using "
 				      << awb_status.temperature_K;
 	else
 		LOG(RPiAlsc, Debug) << "AWB results found, using "