summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/cam_helper_ov5647.cpp
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2021-03-08 22:39:37 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-09 00:50:42 +0200
commit18691c538b9dad777bd61fe8400289298c78ac10 (patch)
treeefbcebf6733e1e82fef69e55db33e6dc6c240c2a /src/ipa/raspberrypi/cam_helper_ov5647.cpp
parentf484857994075d0e4d33f8897cb3b47c7cf3fd6a (diff)
ipa: raspberrypi: Make CamHelpers return the frame delay for vblanking
For some sensors (e.g. imx477) we need to update the vblanking on the frame before the exposure. For this reason the GetDelays method must also return the number of frame delays for the vblanking control. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper_ov5647.cpp')
-rw-r--r--src/ipa/raspberrypi/cam_helper_ov5647.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ipa/raspberrypi/cam_helper_ov5647.cpp b/src/ipa/raspberrypi/cam_helper_ov5647.cpp
index 75486e90..12be6bf9 100644
--- a/src/ipa/raspberrypi/cam_helper_ov5647.cpp
+++ b/src/ipa/raspberrypi/cam_helper_ov5647.cpp
@@ -17,7 +17,8 @@ public:
CamHelperOv5647();
uint32_t GainCode(double gain) const override;
double Gain(uint32_t gain_code) const override;
- void GetDelays(int &exposure_delay, int &gain_delay) const override;
+ void GetDelays(int &exposure_delay, int &gain_delay,
+ int &vblank_delay) const override;
unsigned int HideFramesStartup() const override;
unsigned int HideFramesModeSwitch() const override;
unsigned int MistrustFramesStartup() const override;
@@ -51,7 +52,8 @@ double CamHelperOv5647::Gain(uint32_t gain_code) const
return static_cast<double>(gain_code) / 16.0;
}
-void CamHelperOv5647::GetDelays(int &exposure_delay, int &gain_delay) const
+void CamHelperOv5647::GetDelays(int &exposure_delay, int &gain_delay,
+ int &vblank_delay) const
{
/*
* We run this sensor in a mode where the gain delay is bumped up to
@@ -59,6 +61,7 @@ void CamHelperOv5647::GetDelays(int &exposure_delay, int &gain_delay) const
*/
exposure_delay = 2;
gain_delay = 2;
+ vblank_delay = 2;
}
unsigned int CamHelperOv5647::HideFramesStartup() const