summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/cam_helper.h
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-10-06 14:17:43 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-18 03:10:08 +0300
commitcb4c5f3e44d41b646c6c7b74689af6d9584e62fa (patch)
treef657b5f98433f943e9b550754535e2049f1b5670 /src/ipa/raspberrypi/cam_helper.h
parentdd667e38646928f25c7614bd41b168667f223722 (diff)
ipa: raspberrypi: Allow full line length control
Rename CamHelper::getVBlanking to CamHelper::getBlanking, and update the calculations in that function to return both horizontal and vertical blanking values for a given exposure time and frame duration limits. The calculations are setup such that vertical blanking is extended to the maximum allowable value, and any remainder gets put into horizontal blanking. The calculated horizontal blanking value is now returned to the pipeline handler to pass into DelayedControls to program into the sensor. Update the IPA to now specify the maximum frame duration from the maximum horizontal + vertical blanking values provided by the sensor mode. Additionally, the IPA now uses the frame specific horizontal blanking value (as returned by DelayedControls) in all instances. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Tested-by: Dave Stevenson <dave.stevenson@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.h')
-rw-r--r--src/ipa/raspberrypi/cam_helper.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipa/raspberrypi/cam_helper.h b/src/ipa/raspberrypi/cam_helper.h
index 6cd1dd39..b3f8c980 100644
--- a/src/ipa/raspberrypi/cam_helper.h
+++ b/src/ipa/raspberrypi/cam_helper.h
@@ -8,6 +8,7 @@
#include <memory>
#include <string>
+#include <utility>
#include <libcamera/base/span.h>
#include <libcamera/base/utils.h>
@@ -82,9 +83,9 @@ public:
const libcamera::utils::Duration lineLength) const;
virtual libcamera::utils::Duration exposure(uint32_t exposureLines,
const libcamera::utils::Duration lineLength) const;
- virtual uint32_t getVBlanking(libcamera::utils::Duration &exposure,
- libcamera::utils::Duration minFrameDuration,
- libcamera::utils::Duration maxFrameDuration) const;
+ virtual std::pair<uint32_t, uint32_t> getBlanking(libcamera::utils::Duration &exposure,
+ libcamera::utils::Duration minFrameDuration,
+ libcamera::utils::Duration maxFrameDuration) const;
libcamera::utils::Duration hblankToLineLength(uint32_t hblank) const;
uint32_t lineLengthToHblank(const libcamera::utils::Duration &duration) const;
libcamera::utils::Duration lineLengthPckToDuration(uint32_t lineLengthPck) const;