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/cam_helper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ipa/raspberrypi/cam_helper.cpp') diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp index 3c6afce7..8f64e014 100644 --- a/src/ipa/raspberrypi/cam_helper.cpp +++ b/src/ipa/raspberrypi/cam_helper.cpp @@ -129,6 +129,17 @@ bool CamHelper::SensorEmbeddedDataPresent() const return false; } +double CamHelper::GetModeSensitivity([[maybe_unused]] const CameraMode &mode) const +{ + /* + * Most sensors have the same sensitivity in every mode, but this + * method can be overridden for those that do not. Note that it is + * called before mode_ is set, so it must return the sensitivity + * of the mode that is passed in. + */ + return 1.0; +} + unsigned int CamHelper::HideFramesStartup() const { /* -- cgit v1.2.1