diff options
author | Emilian Peev <epeev@mm-sol.com> | 2012-09-13 16:50:48 +0300 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 20:09:17 +0200 |
commit | d0742b32f49a0501508ff4f871c7a494fc02c450 (patch) | |
tree | 0c49700fc86b953d5e9f68549080bb55125be6a8 /camera | |
parent | 7628ea29a242c677c8a55e5f88dd34b767a6f6d1 (diff) | |
download | hardware_ti_omap4-d0742b32f49a0501508ff4f871c7a494fc02c450.zip hardware_ti_omap4-d0742b32f49a0501508ff4f871c7a494fc02c450.tar.gz hardware_ti_omap4-d0742b32f49a0501508ff4f871c7a494fc02c450.tar.bz2 |
CameraHal: Improve performance when queuing shots
- When queued shot is running and parameters like
tap-out/ins don't change we could skip some of
the overhead involved in triggering image capture
using the new shots.
Change-Id: I9738ed0abbc266da0354c216f852bc2f8971d58c
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Diffstat (limited to 'camera')
-rw-r--r-- | camera/CameraHal.cpp | 17 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapture.cpp | 9 |
2 files changed, 20 insertions, 6 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index bfb90db..7a43cd0 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -3288,6 +3288,23 @@ status_t CameraHal::__takePicture(const char *params) // when we remove legacy TI parameters implementation } + // if we are already in the middle of a capture and using the same + // tapout ST...then we just need setParameters and start image + // capture to queue more shots + if (((mCameraAdapter->getState() & CameraAdapter::CAPTURE_STATE) == + CameraAdapter::CAPTURE_STATE) && + (mCameraAdapter->getNextState() != CameraAdapter::PREVIEW_STATE) && + (reuseTapout) ) { +#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS + //pass capture timestamp along with the camera adapter command + ret = mCameraAdapter->sendCommand(CameraAdapter::CAMERA_START_IMAGE_CAPTURE, + (int) &mStartCapture); +#else + ret = mCameraAdapter->sendCommand(CameraAdapter::CAMERA_START_IMAGE_CAPTURE); +#endif + return ret; + } + if ( !mBracketingRunning ) { // if application didn't set burst through android::ShotParameters diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp index 292eea5..9fbd784 100644 --- a/camera/OMXCameraAdapter/OMXCapture.cpp +++ b/camera/OMXCameraAdapter/OMXCapture.cpp @@ -1235,6 +1235,9 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing, CachedCaptureParam mBurstFramesQueued++; } } + } else { + mCapturedFrames += mBurstFrames; + mBurstFramesAccum += mBurstFrames; } CAMHAL_LOGD("mBurstFramesQueued = %d mBurstFramesAccum = %d index = %d " "capData->mNumBufs = %d queued = %d capData->mMaxQueueable = %d", @@ -1910,12 +1913,6 @@ status_t OMXCameraAdapter::UseBuffersCapture(CameraBuffer * bufArr, int num) } } - { - android::AutoMutex lock(mBurstLock); - mCapturedFrames += mBurstFrames; - mBurstFramesAccum += mBurstFrames; - } - mCaptureConfigured = true; #ifdef CAMERAHAL_USE_RAW_IMAGE_SAVING |