[3/3] ipa: simple: Report black levels in metadata
diff mbox series

Message ID 20240617232525.878530-4-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 black level values in the metadata
to add to the 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 d35d28c26a3b..460fb216d49a 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -309,6 +309,10 @@  void IPASoftSimple::processStats(const ControlList &sensorControls)
 	const float gains[] = { gainR / maxGain, gainB / maxGain };
 	metadata.set(controls::ColourGains, gains);
 
+	/* Assign each of the R G G B channels as the same black level. */
+	const auto blackLevels = { blackLevel, blackLevel, blackLevel, blackLevel };
+	metadata.set(controls::SensorBlackLevels, blackLevels);
+
 	setIspParams.emit(metadata);
 
 	/* \todo Switch to the libipa/algorithm.h API someday. */