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

Commit 0e522ed2 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh Committed by Android (Google) Code Review
Browse files

Merge "camera: zsl: remove AF check if no focser presents" into lmp-dev

parents 01047680 754fb022
Loading
Loading
Loading
Loading
+24 −15
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ ZslProcessor3::ZslProcessor3(
        mZslStreamId(NO_STREAM),
        mFrameListHead(0),
        mZslQueueHead(0),
        mZslQueueTail(0) {
        mZslQueueTail(0),
        mHasFocuser(false) {
    // Initialize buffer queue and frame list based on pipeline max depth.
    size_t pipelineMaxDepth = kDefaultMaxPipelineDepth;
    if (client != 0) {
@@ -67,6 +68,11 @@ ZslProcessor3::ZslProcessor3(
                        " use default pipeline max depth %zu", __FUNCTION__,
                        kDefaultMaxPipelineDepth);
            }

            entry = device->info().find(ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE);
            if (entry.count > 0 && entry.data.f[0] != 0.) {
                mHasFocuser = true;
            }
        }
    }

@@ -489,6 +495,8 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const {
                    continue;
                }

                // Check AF state if device has focuser
                if (mHasFocuser) {
                    // Make sure the candidate frame has good focus.
                    entry = frame.find(ANDROID_CONTROL_AF_STATE);
                    if (entry.count == 0) {
@@ -504,6 +512,7 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const {
                                __FUNCTION__, afState);
                        continue;
                    }
                }

                minTimestamp = frameTimestamp;
                idx = j;
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ class ZslProcessor3 :

    CameraMetadata mLatestCapturedRequest;

    bool mHasFocuser;

    virtual bool threadLoop();

    status_t clearZslQueueLocked();