summaryrefslogtreecommitdiffstats
path: root/libcamera
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2010-11-03 00:53:20 -0700
committerSimon Wilson <simonwilson@google.com>2010-12-17 14:12:17 -0800
commitc755f3cdd0decc54f3d317f0281f0b038e8ece33 (patch)
treeee384cab6da6c80b5f21d678d73dd42f983c7cf2 /libcamera
parent277dfba014985bfa360e45ae75f323e533b3c6a5 (diff)
downloaddevice_samsung_crespo-c755f3cdd0decc54f3d317f0281f0b038e8ece33.zip
device_samsung_crespo-c755f3cdd0decc54f3d317f0281f0b038e8ece33.tar.gz
device_samsung_crespo-c755f3cdd0decc54f3d317f0281f0b038e8ece33.tar.bz2
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
Diffstat (limited to 'libcamera')
-rwxr-xr-xlibcamera/SecCamera.cpp3
1 files changed, 2 insertions, 1 deletions
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);