diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-09 01:08:52 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-09 01:08:52 +0000 |
commit | 99da7360716ae3b03ca65d1ebfd3c4a551e2662e (patch) | |
tree | d514bdf2e596839def1e55c878b6a8bafcad93af | |
parent | 7b01bf9f043ed1f36e9836a49144662e276008b0 (diff) | |
parent | 1542044354229b6010361be2d69b2ef229791b81 (diff) | |
download | camera-99da7360716ae3b03ca65d1ebfd3c4a551e2662e.tar.gz |
Snap for 7533212 from 1542044354229b6010361be2d69b2ef229791b81 to sc-release
Change-Id: I76c7556b76314c9668fa9b1ab8d7a539fd421d01
4 files changed, 4 insertions, 9 deletions
diff --git a/common/hal/google_camera_hal/snapshot_request_processor.cc b/common/hal/google_camera_hal/snapshot_request_processor.cc index b58fbc0..bd07b55 100644 --- a/common/hal/google_camera_hal/snapshot_request_processor.cc +++ b/common/hal/google_camera_hal/snapshot_request_processor.cc @@ -183,8 +183,7 @@ status_t SnapshotRequestProcessor::ProcessRequest(const CaptureRequest& request) // Get multiple yuv buffer and metadata from internal stream as input status_t result = internal_stream_manager_->GetMostRecentStreamBuffer( yuv_stream_id_, &(block_request.input_buffers), - &(block_request.input_buffer_metadata), /*payload_frames=*/1, - /*min_filled_buffers=*/1); + &(block_request.input_buffer_metadata), /*payload_frames=*/kZslBufferSize); if (result != OK) { ALOGE("%s: frame:%d GetStreamBuffer failed.", __FUNCTION__, request.frame_number); diff --git a/common/hal/google_camera_hal/snapshot_request_processor.h b/common/hal/google_camera_hal/snapshot_request_processor.h index 97ef81c..a17191a 100644 --- a/common/hal/google_camera_hal/snapshot_request_processor.h +++ b/common/hal/google_camera_hal/snapshot_request_processor.h @@ -60,6 +60,8 @@ class SnapshotRequestProcessor : public RequestProcessor { status_t Initialize(CameraDeviceSessionHwl* device_session_hwl, int32_t yuv_stream_id); bool IsReadyForNextRequest(); + + static constexpr int kZslBufferSize = 3; std::mutex process_block_lock_; // Protected by process_block_lock_. diff --git a/common/hal/google_camera_hal/zsl_snapshot_capture_session.cc b/common/hal/google_camera_hal/zsl_snapshot_capture_session.cc index f93e607..099684b 100644 --- a/common/hal/google_camera_hal/zsl_snapshot_capture_session.cc +++ b/common/hal/google_camera_hal/zsl_snapshot_capture_session.cc @@ -61,12 +61,6 @@ bool IsSwDenoiseSnapshotCompatible(const CaptureRequest& request) { return false; } - if (request.settings->Get(ANDROID_CONTROL_ENABLE_ZSL, &entry) != OK || - *entry.data.u8 != ANDROID_CONTROL_ENABLE_ZSL_TRUE) { - ALOGV("%s: ANDROID_CONTROL_ENABLE_ZSL is not true", __FUNCTION__); - return false; - } - if (request.settings->Get(ANDROID_NOISE_REDUCTION_MODE, &entry) != OK || *entry.data.u8 != ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY) { ALOGV("%s: ANDROID_NOISE_REDUCTION_MODE is not HQ", __FUNCTION__); diff --git a/common/hal/google_camera_hal/zsl_snapshot_capture_session.h b/common/hal/google_camera_hal/zsl_snapshot_capture_session.h index 082c85b..dab4515 100644 --- a/common/hal/google_camera_hal/zsl_snapshot_capture_session.h +++ b/common/hal/google_camera_hal/zsl_snapshot_capture_session.h @@ -93,7 +93,7 @@ class ZslSnapshotCaptureSession : public CaptureSession { private: static constexpr uint32_t kPartialResult = 1; - static constexpr int kAdditionalBufferNumber = 1; + static constexpr int kAdditionalBufferNumber = 3; status_t Initialize(CameraDeviceSessionHwl* device_session_hwl, const StreamConfiguration& stream_config, |