summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/cam_helper/cam_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rpi/cam_helper/cam_helper.cpp')
-rw-r--r--src/ipa/rpi/cam_helper/cam_helper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipa/rpi/cam_helper/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp
index ddd5e9a4..7e29373b 100644
--- a/src/ipa/rpi/cam_helper/cam_helper.cpp
+++ b/src/ipa/rpi/cam_helper/cam_helper.cpp
@@ -71,7 +71,7 @@ void CamHelper::process([[maybe_unused]] StatisticsPtr &stats,
uint32_t CamHelper::exposureLines(const Duration exposure, const Duration lineLength) const
{
- return exposure / lineLength;
+ return std::chrono::duration(exposure) / std::chrono::duration(lineLength);
}
Duration CamHelper::exposure(uint32_t exposureLines, const Duration lineLength) const
@@ -93,8 +93,8 @@ std::pair<uint32_t, uint32_t> CamHelper::getBlanking(Duration &exposure,
* frameLengthMax gets calculated on the smallest line length as we do
* not want to extend that unless absolutely necessary.
*/
- frameLengthMin = minFrameDuration / mode_.minLineLength;
- frameLengthMax = maxFrameDuration / mode_.minLineLength;
+ frameLengthMin = std::chrono::duration(minFrameDuration) / std::chrono::duration(mode_.minLineLength);
+ frameLengthMax = std::chrono::duration(maxFrameDuration) / std::chrono::duration(mode_.minLineLength);
/*
* Watch out for (exposureLines + frameIntegrationDiff_) overflowing a