[PATCH 2/3] ipa: simple: Report the ColourGains in metadata

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Jun 18 01:25:24 CEST 2024


Provide the determined colour gains back into the metadata
to add to completed requests.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/ipa/simple/soft_simple.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index 09c7b575301e..d35d28c26a3b 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -305,6 +305,10 @@ void IPASoftSimple::processStats(const ControlList &sensorControls)
 		params_->blue[i] = gammaTable_[idx];
 	}
 
+	const float maxGain = 1024.0;
+	const float gains[] = { gainR / maxGain, gainB / maxGain };
+	metadata.set(controls::ColourGains, gains);
+
 	setIspParams.emit(metadata);
 
 	/* \todo Switch to the libipa/algorithm.h API someday. */
-- 
2.34.1



More information about the libcamera-devel mailing list