[v3,04/21] ipa: libipa: awb: Log rgb means immediately
diff mbox series

Message ID 20260918120949.191668-5-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • libcamera: rcar-gen4 + rpp-x1
Related show

Commit Message

Barnabás Pőcze Sept. 18, 2026, 12:09 p.m. UTC
Log the rgb means immediately upon enter `process()`, and also log
whether it is valid or not.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/ipa/libipa/awb.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp
index 0e312690b8..8d465a4f89 100644
--- a/src/ipa/libipa/awb.cpp
+++ b/src/ipa/libipa/awb.cpp
@@ -367,7 +367,13 @@  void AwbAlgorithmBase::process(awb::ActiveState &state,
 			       const AwbStats &stats, unsigned int lux,
 			       ControlList &metadata)
 {
-	if (!stats.valid())
+	const bool valid = stats.valid();
+
+	LOG(Awb, Debug) << std::showpoint
+			<< "means: " << stats.rgbMeans()
+			<< " (" << (!valid ? "in" : "") << "valid)";
+
+	if (!valid)
 		return;
 
 	auto awbResult = impl_->calculateAwb(stats, lux, { currentMode_->ctLo,
@@ -394,8 +400,8 @@  void AwbAlgorithmBase::process(awb::ActiveState &state,
 					      static_cast<float>(frameContext.gains.b()) });
 	metadata.set(controls::ColourTemperature, frameContext.colourTemperature);
 
-	LOG(Awb, Debug) << std::showpoint << "Means " << stats.rgbMeans()
-			<< ", gains " << state.automatic.gains
+	LOG(Awb, Debug) << std::showpoint
+			<< "gains " << state.automatic.gains
 			<< ", temp " << state.automatic.colourTemperature << "K";
 }