diff options
author | Zhijun He <zhijunhe@google.com> | 2013-10-11 10:26:52 -0700 |
---|---|---|
committer | Zhijun He <zhijunhe@google.com> | 2013-10-11 12:03:36 -0700 |
commit | b790abf4d17f1c6865af7eb1595ec94dc0306447 (patch) | |
tree | af2b7e55f779d29f89fdc82cefba8f941928a440 /services | |
parent | cc27e117ed01c9a2b4def5a9c7a3103af83ee47e (diff) | |
download | frameworks_av-b790abf4d17f1c6865af7eb1595ec94dc0306447.zip frameworks_av-b790abf4d17f1c6865af7eb1595ec94dc0306447.tar.gz frameworks_av-b790abf4d17f1c6865af7eb1595ec94dc0306447.tar.bz2 |
Camera: Skip AE precapture when possible
Skip AE precapture when AE is already converged for still capture use case. This
could save still capture latency 6-7 frame time for AE already converged case.
Bug: 10712902
Change-Id: Ie5512618b76e5d87c62c57c3d96d2004c604e29e
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp index 1a1b27b..4260c3a 100644 --- a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp +++ b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp @@ -379,11 +379,23 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardStart( sp<Camera2Client> &client) { ATRACE_CALL(); + bool isAeConverged = false; // Get the onFrameAvailable callback when the requestID == mCaptureId client->registerFrameListener(mCaptureId, mCaptureId + 1, this); + + { + Mutex::Autolock l(mInputMutex); + isAeConverged = (mAEState == ANDROID_CONTROL_AE_STATE_CONVERGED); + } + { SharedParameters::Lock l(client->getParameters()); + // Skip AE precapture when it is already converged and not in force flash mode. + if (l.mParameters.flashMode != Parameters::FLASH_MODE_ON && isAeConverged) { + return STANDARD_CAPTURE; + } + mTriggerId = l.mParameters.precaptureTriggerCounter++; } client->getCameraDevice()->triggerPrecaptureMetering(mTriggerId); |