Loading camera/CaptureResult.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ status_t CaptureResultExtras::readFromParcel(Parcel *parcel) { parcel->readInt32(&afTriggerId); parcel->readInt32(&precaptureTriggerId); parcel->readInt64(&frameNumber); parcel->readInt32(&partialResultCount); return OK; } Loading @@ -52,6 +53,7 @@ status_t CaptureResultExtras::writeToParcel(Parcel *parcel) const { parcel->writeInt32(afTriggerId); parcel->writeInt32(precaptureTriggerId); parcel->writeInt64(frameNumber); parcel->writeInt32(partialResultCount); return OK; } Loading include/camera/CaptureResult.h +7 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,11 @@ struct CaptureResultExtras { */ int64_t frameNumber; /** * The partial result count (index) for this capture result. */ int32_t partialResultCount; /** * Constructor initializes object as invalid by setting requestId to be -1. */ Loading @@ -60,7 +65,8 @@ struct CaptureResultExtras { burstId(0), afTriggerId(0), precaptureTriggerId(0), frameNumber(0) { frameNumber(0), partialResultCount(0) { } /** Loading services/camera/libcameraservice/api1/client2/FrameProcessor.cpp +18 −9 Original line number Diff line number Diff line Loading @@ -40,7 +40,12 @@ FrameProcessor::FrameProcessor(wp<CameraDeviceBase> device, { SharedParameters::Lock l(client->getParameters()); mUsePartialQuirk = l.mParameters.quirks.partialResults; if (client->getCameraDeviceVersion() >= CAMERA_DEVICE_API_VERSION_3_2) { mUsePartialResult = (mNumPartialResults > 1); } else { mUsePartialResult = l.mParameters.quirks.partialResults; } // Initialize starting 3A state m3aState.afTriggerId = l.mParameters.afTriggerCounter; Loading @@ -63,17 +68,21 @@ bool FrameProcessor::processSingleFrame(CaptureResult &frame, return false; } bool partialResult = false; if (mUsePartialQuirk) { bool isPartialResult = false; if (mUsePartialResult) { if (client->getCameraDeviceVersion() >= CAMERA_DEVICE_API_VERSION_3_2) { isPartialResult = frame.mResultExtras.partialResultCount < mNumPartialResults; } else { camera_metadata_entry_t entry; entry = frame.mMetadata.find(ANDROID_QUIRKS_PARTIAL_RESULT); if (entry.count > 0 && entry.data.u8[0] == ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL) { partialResult = true; isPartialResult = true; } } } if (!partialResult && processFaceDetect(frame.mMetadata, client) != OK) { if (!isPartialResult && processFaceDetect(frame.mMetadata, client) != OK) { return false; } Loading services/camera/libcameraservice/api1/client2/FrameProcessor.h +2 −2 Original line number Diff line number Diff line Loading @@ -91,8 +91,8 @@ class FrameProcessor : public FrameProcessorBase { } } m3aState; // Whether the partial result quirk is enabled for this device bool mUsePartialQuirk; // Whether the partial result is enabled for this device bool mUsePartialResult; // Track most recent frame number for which 3A notifications were sent for. // Used to filter against sending 3A notifications for the same frame Loading services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -94,14 +94,14 @@ void ZslProcessor3::onResultAvailable(const CaptureResult &result) { entry = result.mMetadata.find(ANDROID_SENSOR_TIMESTAMP); nsecs_t timestamp = entry.data.i64[0]; if (entry.count == 0) { ALOGE("%s: metadata doesn't have timestamp, skip this result"); ALOGE("%s: metadata doesn't have timestamp, skip this result", __FUNCTION__); return; } (void)timestamp; entry = result.mMetadata.find(ANDROID_REQUEST_FRAME_COUNT); if (entry.count == 0) { ALOGE("%s: metadata doesn't have frame number, skip this result"); ALOGE("%s: metadata doesn't have frame number, skip this result", __FUNCTION__); return; } int32_t frameNumber = entry.data.i32[0]; Loading Loading
camera/CaptureResult.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ status_t CaptureResultExtras::readFromParcel(Parcel *parcel) { parcel->readInt32(&afTriggerId); parcel->readInt32(&precaptureTriggerId); parcel->readInt64(&frameNumber); parcel->readInt32(&partialResultCount); return OK; } Loading @@ -52,6 +53,7 @@ status_t CaptureResultExtras::writeToParcel(Parcel *parcel) const { parcel->writeInt32(afTriggerId); parcel->writeInt32(precaptureTriggerId); parcel->writeInt64(frameNumber); parcel->writeInt32(partialResultCount); return OK; } Loading
include/camera/CaptureResult.h +7 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,11 @@ struct CaptureResultExtras { */ int64_t frameNumber; /** * The partial result count (index) for this capture result. */ int32_t partialResultCount; /** * Constructor initializes object as invalid by setting requestId to be -1. */ Loading @@ -60,7 +65,8 @@ struct CaptureResultExtras { burstId(0), afTriggerId(0), precaptureTriggerId(0), frameNumber(0) { frameNumber(0), partialResultCount(0) { } /** Loading
services/camera/libcameraservice/api1/client2/FrameProcessor.cpp +18 −9 Original line number Diff line number Diff line Loading @@ -40,7 +40,12 @@ FrameProcessor::FrameProcessor(wp<CameraDeviceBase> device, { SharedParameters::Lock l(client->getParameters()); mUsePartialQuirk = l.mParameters.quirks.partialResults; if (client->getCameraDeviceVersion() >= CAMERA_DEVICE_API_VERSION_3_2) { mUsePartialResult = (mNumPartialResults > 1); } else { mUsePartialResult = l.mParameters.quirks.partialResults; } // Initialize starting 3A state m3aState.afTriggerId = l.mParameters.afTriggerCounter; Loading @@ -63,17 +68,21 @@ bool FrameProcessor::processSingleFrame(CaptureResult &frame, return false; } bool partialResult = false; if (mUsePartialQuirk) { bool isPartialResult = false; if (mUsePartialResult) { if (client->getCameraDeviceVersion() >= CAMERA_DEVICE_API_VERSION_3_2) { isPartialResult = frame.mResultExtras.partialResultCount < mNumPartialResults; } else { camera_metadata_entry_t entry; entry = frame.mMetadata.find(ANDROID_QUIRKS_PARTIAL_RESULT); if (entry.count > 0 && entry.data.u8[0] == ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL) { partialResult = true; isPartialResult = true; } } } if (!partialResult && processFaceDetect(frame.mMetadata, client) != OK) { if (!isPartialResult && processFaceDetect(frame.mMetadata, client) != OK) { return false; } Loading
services/camera/libcameraservice/api1/client2/FrameProcessor.h +2 −2 Original line number Diff line number Diff line Loading @@ -91,8 +91,8 @@ class FrameProcessor : public FrameProcessorBase { } } m3aState; // Whether the partial result quirk is enabled for this device bool mUsePartialQuirk; // Whether the partial result is enabled for this device bool mUsePartialResult; // Track most recent frame number for which 3A notifications were sent for. // Used to filter against sending 3A notifications for the same frame Loading
services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -94,14 +94,14 @@ void ZslProcessor3::onResultAvailable(const CaptureResult &result) { entry = result.mMetadata.find(ANDROID_SENSOR_TIMESTAMP); nsecs_t timestamp = entry.data.i64[0]; if (entry.count == 0) { ALOGE("%s: metadata doesn't have timestamp, skip this result"); ALOGE("%s: metadata doesn't have timestamp, skip this result", __FUNCTION__); return; } (void)timestamp; entry = result.mMetadata.find(ANDROID_REQUEST_FRAME_COUNT); if (entry.count == 0) { ALOGE("%s: metadata doesn't have frame number, skip this result"); ALOGE("%s: metadata doesn't have frame number, skip this result", __FUNCTION__); return; } int32_t frameNumber = entry.data.i32[0]; Loading