summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2021-06-08 12:03:33 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-06-08 23:56:15 +0300
commitcaa753179c039a0ecbfef595c3179aac4bf044d5 (patch)
tree8e20435d6aa6cfe597ccdbaf859f50192eec095d /src/ipa/raspberrypi/controller
parent5055ca747c4c0d635ed8f2ab272f493748c2f50a (diff)
ipa: raspberrypi: Switch ipa and cam_helper to use utils::Duration
Switch the ipa and cam_helper code to use libcamera::utils::Duration for all time based variables. This improves code readability and avoids possible errors when converting between time bases. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-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/controller')
-rw-r--r--src/ipa/raspberrypi/controller/camera_mode.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h
index 256438c9..2aa2335d 100644
--- a/src/ipa/raspberrypi/controller/camera_mode.h
+++ b/src/ipa/raspberrypi/controller/camera_mode.h
@@ -8,6 +8,8 @@
#include <libcamera/transform.h>
+#include "libcamera/internal/utils.h"
+
// Description of a "camera mode", holding enough information for control
// algorithms to adapt their behaviour to the different modes of the camera,
// including binning, scaling, cropping etc.
@@ -33,8 +35,8 @@ struct CameraMode {
double scale_x, scale_y;
// scaling of the noise compared to the native sensor mode
double noise_factor;
- // line time in nanoseconds
- double line_length;
+ // line time
+ libcamera::utils::Duration line_length;
// any camera transform *not* reflected already in the camera tuning
libcamera::Transform transform;
// minimum and maximum fame lengths in units of lines