Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 690895cf authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

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
parent 9dd4a2dd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);