diff options
author | Sundar Raman <sunds@ti.com> | 2011-08-12 00:50:19 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-12 16:04:49 -0700 |
commit | 16a3cb189a5254eee9e449503417dfafc8e58d1a (patch) | |
tree | b8b30b1c10baa4f52b17aba0f19346b73a98823a | |
parent | b63b51574f15823225f394be6e6627440d7ac7f7 (diff) | |
download | hardware_ti_omap4-16a3cb189a5254eee9e449503417dfafc8e58d1a.zip hardware_ti_omap4-16a3cb189a5254eee9e449503417dfafc8e58d1a.tar.gz hardware_ti_omap4-16a3cb189a5254eee9e449503417dfafc8e58d1a.tar.bz2 |
Camera HAL: CTS: Fix for #testSmoothZoom
The zoom value being passed up with stopSmoothZoom was 0
instead of 1. CTS expects the value of the zoom callback
to atleast start from 1. This patch fixes this.
Change-Id: I2a043af12d15e83012d1e5b633209ccf194e71ea
Signed-off-by: Sundar Raman <sunds@ti.com>
-rw-r--r-- | camera/OMXCameraAdapter/OMXZoom.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/camera/OMXCameraAdapter/OMXZoom.cpp b/camera/OMXCameraAdapter/OMXZoom.cpp index c5bcb97..0771fb9 100644 --- a/camera/OMXCameraAdapter/OMXZoom.cpp +++ b/camera/OMXCameraAdapter/OMXZoom.cpp @@ -139,6 +139,7 @@ status_t OMXCameraAdapter::advanceZoom() if ( mReturnZoomStatus ) { + mCurrentZoomIdx +=mZoomInc; mTargetZoomIdx = mCurrentZoomIdx; mReturnZoomStatus = false; ret = doZoom(mCurrentZoomIdx); @@ -257,7 +258,15 @@ status_t OMXCameraAdapter::stopSmoothZoom() if ( mTargetZoomIdx != mCurrentZoomIdx ) { - mTargetZoomIdx = mCurrentZoomIdx; + if ( mCurrentZoomIdx < mTargetZoomIdx ) + { + mZoomInc = 1; + } + else + { + mZoomInc = -1; + } + mReturnZoomStatus = true; mReturnZoomStatus = true; CAMHAL_LOGDB("Stop smooth zoom mCurrentZoomIdx = %d, mTargetZoomIdx = %d", mCurrentZoomIdx, |