From d0c429c34cd37b16facaf8df0bf74614c83f5f75 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Sun, 18 Jul 2021 19:51:24 +0100 Subject: ipa: raspberrypi: Add sensitivity field to camera mode We use the CamHelper class to initialise it to the usual value of 1. The CamHelper's GetModeSensitivity method can be redefined to implement a different behaviour for sensors that require it. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Acked-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/raspberrypi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ipa/raspberrypi/raspberrypi.cpp') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index b08602f4..48e11c69 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -325,6 +325,12 @@ void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo) */ mode_.min_frame_length = sensorInfo.minFrameLength; mode_.max_frame_length = sensorInfo.maxFrameLength; + + /* + * Some sensors may have different sensitivities in different modes; + * the CamHelper will know the correct value. + */ + mode_.sensitivity = helper_->GetModeSensitivity(mode_); } int IPARPi::configure(const IPACameraSensorInfo &sensorInfo, -- cgit v1.2.1