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

Commit 65d8e64b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Camera3: Reduce the ZSL queue depth to 4"

parents 7725466d d5c3da53
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define ATRACE_TAG ATRACE_TAG_CAMERA
//#define LOG_NDEBUG 0
//#define LOG_NNDEBUG 0
#define AVERAGE_PIPELINE_DEPTH 4

#ifdef LOG_NNDEBUG
#define ALOGVV(...) ALOGV(__VA_ARGS__)
@@ -79,11 +80,14 @@ ZslProcessor3::ZslProcessor3(

    ALOGV("%s: Initialize buffer queue and frame list depth based on max pipeline depth (%d)",
          __FUNCTION__, pipelineMaxDepth);

    // Optimized the buffer queue depth based on the average pipeline depth to reduce memory
    // consumption
    // 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;
    mBufferQueueDepth = AVERAGE_PIPELINE_DEPTH;
    mFrameListDepth = mBufferQueueDepth - 1;


    mZslQueue.insertAt(0, mBufferQueueDepth);