From c755f3cdd0decc54f3d317f0281f0b038e8ece33 Mon Sep 17 00:00:00 2001 From: Simon Wilson Date: Wed, 3 Nov 2010 00:53:20 -0700 Subject: libcamera: change shutterspeed units to microseconds This is to avoid shutter speeds less than 1ms from underflowing during the conversion to the denominator portion of 1/1000s. Change-Id: Ib6df304c38dd22a23aa31bc731c95030a089f05e --- libcamera/SecCamera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libcamera') diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp index 83d100e..6f14198 100755 --- a/libcamera/SecCamera.cpp +++ b/libcamera/SecCamera.cpp @@ -3392,7 +3392,8 @@ void SecCamera::setExifChangedAttribute() shutterSpeed = 100; } mExifInfo.exposure_time.num = 1; - mExifInfo.exposure_time.den = 1000.0 / shutterSpeed; /* ms -> sec */ + // x us -> 1/x s */ + mExifInfo.exposure_time.den = (uint32_t)(1000000 / shutterSpeed); //3 ISO Speed Rating int iso = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_GET_ISO); -- cgit v1.1