[libcamera-devel] [PATCH v2 2/2] src: ipa: raspberrypi: Add digital gain to libcamera metadata

David Plowman david.plowman at raspberrypi.com
Thu Nov 26 15:50:05 CET 2020


The digital gain reported by the AGC algorithm is reported in the
metadata that is included in completed requests.

Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
---
 src/ipa/raspberrypi/raspberrypi.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 9853a343..631fe7b3 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -403,8 +403,10 @@ void IPARPi::reportMetadata()
 	}
 
 	AgcStatus *agcStatus = rpiMetadata_.GetLocked<AgcStatus>("agc.status");
-	if (agcStatus)
+	if (agcStatus) {
 		libcameraMetadata_.set(controls::AeLocked, agcStatus->locked);
+		libcameraMetadata_.set(controls::DigitalGain, agcStatus->digital_gain);
+	}
 
 	LuxStatus *luxStatus = rpiMetadata_.GetLocked<LuxStatus>("lux.status");
 	if (luxStatus)
-- 
2.20.1



More information about the libcamera-devel mailing list