diff options
author | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-08-27 12:58:33 -0700 |
---|---|---|
committer | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-08-27 15:00:35 -0700 |
commit | 690895cfe0f128ee3fc375a357ab99b0b98394b6 (patch) | |
tree | b997c70f46e205cf359edac664e0200c7ec30188 /services/camera | |
parent | 9dd4a2ddd7caf8cbe50d8a76e0ec3e0274d2bce6 (diff) | |
download | frameworks_av-690895cfe0f128ee3fc375a357ab99b0b98394b6.zip frameworks_av-690895cfe0f128ee3fc375a357ab99b0b98394b6.tar.gz frameworks_av-690895cfe0f128ee3fc375a357ab99b0b98394b6.tar.bz2 |
cameraservice: decrease zsl metadata queue size by 1
Zsl buffer needs to be longer than metadata queue to ensure that
oldest metadata can always find a match in buffer queue.
Since we don't want to add memory overhead, decrease metadata
queue size by one serves the same purpose.
bug 17264283
Change-Id: Ic53441cc29c98e57d3345f5845d92839d0ce6faf
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp b/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp index b388079..5cf69bd 100644 --- a/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp +++ b/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp @@ -78,8 +78,12 @@ ZslProcessor3::ZslProcessor3( ALOGV("%s: Initialize buffer queue and frame list depth based on max pipeline depth (%d)", __FUNCTION__, pipelineMaxDepth); - mBufferQueueDepth = pipelineMaxDepth + 1; - mFrameListDepth = pipelineMaxDepth + 1; + // Need to keep buffer queue longer than metadata queue because sometimes buffer arrives + // earlier than metadata which causes the buffer corresponding to oldest metadata being + // removed. + mFrameListDepth = pipelineMaxDepth; + mBufferQueueDepth = mFrameListDepth + 1; + mZslQueue.insertAt(0, mBufferQueueDepth); mFrameList.insertAt(0, mFrameListDepth); |