[2/3] ipa: simple: Report the ColourGains in metadata
diff mbox series

Message ID 20240617232525.878530-3-kieran.bingham@ideasonboard.com
State New
Headers show
Series
  • ipa: simple: Introduce metadata reporting
Related show

Commit Message

Kieran Bingham June 17, 2024, 11:25 p.m. UTC
Provide the determined colour gains back into the metadata
to add to completed requests.

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

Patch
diff mbox series

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. */