summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/cam_helper.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-10-06 14:17:36 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-18 03:09:38 +0300
commitc513522f3f5b9e3cb091cf7dfd249376b4171bfe (patch)
treed0652bfc23075ecd15b131b53d3e152fcb1cf0df /src/ipa/raspberrypi/cam_helper.cpp
parente5fc0132f80d644757373ab0e0e3db00fe6ee010 (diff)
ipa: raspberrypi: Add minimum and maximum line length fields to CameraMode
Add fields for minimum and maximum line length duration to the CameraMode structure. This replaces the existing lineLength field. Any use of the existing lineLength field is replaced by the new minLineLength field, as logically we always want to use the fastest sensor readout by default. As a drive-by cosmetic change, split all fields in the CameraMode structure into separate lines. 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.cpp')
-rw-r--r--src/ipa/raspberrypi/cam_helper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp
index cac8f39e..42251ba2 100644
--- a/src/ipa/raspberrypi/cam_helper.cpp
+++ b/src/ipa/raspberrypi/cam_helper.cpp
@@ -64,13 +64,13 @@ void CamHelper::process([[maybe_unused]] StatisticsPtr &stats,
uint32_t CamHelper::exposureLines(const Duration exposure) const
{
assert(initialized_);
- return exposure / mode_.lineLength;
+ return exposure / mode_.minLineLength;
}
Duration CamHelper::exposure(uint32_t exposureLines) const
{
assert(initialized_);
- return exposureLines * mode_.lineLength;
+ return exposureLines * mode_.minLineLength;
}
uint32_t CamHelper::getVBlanking(Duration &exposure,
@@ -86,8 +86,8 @@ uint32_t CamHelper::getVBlanking(Duration &exposure,
* minFrameDuration and maxFrameDuration are clamped by the caller
* based on the limits for the active sensor mode.
*/
- frameLengthMin = minFrameDuration / mode_.lineLength;
- frameLengthMax = maxFrameDuration / mode_.lineLength;
+ frameLengthMin = minFrameDuration / mode_.minLineLength;
+ frameLengthMax = maxFrameDuration / mode_.minLineLength;
/*
* Limit the exposure to the maximum frame duration requested, and