[libcamera-devel] [PATCH 5/5] src: ipa: raspberrypi: Drop the correct number of frames on startup for ov5647

David Plowman david.plowman at raspberrypi.com
Wed Dec 2 12:52:53 CET 2020


The ov5647 delivers two under-exposed frames at startup, even when
the exposure and gain are explicitly programmed. The system needs to
be told to drop these.

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

diff --git a/src/ipa/raspberrypi/cam_helper_ov5647.cpp b/src/ipa/raspberrypi/cam_helper_ov5647.cpp
index dc5d8275..0b841cd1 100644
--- a/src/ipa/raspberrypi/cam_helper_ov5647.cpp
+++ b/src/ipa/raspberrypi/cam_helper_ov5647.cpp
@@ -19,6 +19,7 @@ public:
 	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;
+	unsigned int HideFramesStartup() const override;
 	unsigned int HideFramesModeSwitch() const override;
 	unsigned int MistrustFramesStartup() const override;
 	unsigned int MistrustFramesModeSwitch() const override;
@@ -54,6 +55,15 @@ void CamHelperOv5647::GetDelays(int &exposure_delay, int &gain_delay) const
 	gain_delay = 2;
 }
 
+unsigned int CamHelperOv5647::HideFramesStartup() const
+{
+	/*
+	 * On startup, we get a couple of under-exposed frames which
+	 * we don't want shown.
+	 */
+	return 2;
+}
+
 unsigned int CamHelperOv5647::HideFramesModeSwitch() const
 {
 	/*
-- 
2.20.1



More information about the libcamera-devel mailing list