diff options
author | Roger Hsieh <rogercyhsieh@google.com> | 2023-03-17 22:45:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-03-17 22:45:04 +0000 |
commit | b3f8654e471a9f6bdce34b02a477cdf8293e2b4d (patch) | |
tree | ca3e3b0f5ba7964c48b975d184491dad98bdf4cc | |
parent | 051167f0b5d1466884baa37dfa1b6d75480b8af7 (diff) | |
parent | c4ef53b221e896c4e91032304def281a08f25db9 (diff) | |
download | camera-b3f8654e471a9f6bdce34b02a477cdf8293e2b4d.tar.gz |
Merge "Disable ZSL for 10-bit HDR preview" into tm-qpr-dev
-rw-r--r-- | common/hal/google_camera_hal/zsl_snapshot_capture_session.cc | 9 | ||||
-rw-r--r-- | common/hal/utils/utils.cc | 5 | ||||
-rw-r--r-- | common/hal/utils/utils.h | 1 |
3 files changed, 15 insertions, 0 deletions
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 a3da477..8d9e6d7 100644 --- a/common/hal/google_camera_hal/zsl_snapshot_capture_session.cc +++ b/common/hal/google_camera_hal/zsl_snapshot_capture_session.cc @@ -217,6 +217,7 @@ bool ZslSnapshotCaptureSession::IsStreamConfigurationSupported( bool has_eligible_snapshot_stream = false; bool has_preview_stream = false; + bool has_hdr_preview_stream = false; for (const auto& stream : stream_config.streams) { if (stream.is_physical_camera_stream) { ALOGE("%s: support logical stream only", __FUNCTION__); @@ -233,6 +234,9 @@ bool ZslSnapshotCaptureSession::IsStreamConfigurationSupported( } } else if (utils::IsPreviewStream(stream)) { has_preview_stream = true; + if (utils::IsHdrStream(stream)) { + has_hdr_preview_stream = true; + } } else { ALOGE("%s: only support preview + (snapshot and/or YUV) streams", __FUNCTION__); @@ -248,6 +252,11 @@ bool ZslSnapshotCaptureSession::IsStreamConfigurationSupported( ALOGE("%s: no preview stream", __FUNCTION__); return false; } + if (has_hdr_preview_stream) { + ALOGE("%s: 10-bit HDR preview stream does not support ZSL snapshot", + __FUNCTION__); + return false; + } ALOGD("%s: ZslSnapshotCaptureSession supports the stream config", __FUNCTION__); diff --git a/common/hal/utils/utils.cc b/common/hal/utils/utils.cc index 1f9c4e2..6bc5867 100644 --- a/common/hal/utils/utils.cc +++ b/common/hal/utils/utils.cc @@ -556,6 +556,11 @@ bool IsStreamUseCasesVideoCall(const Stream& stream) { : false; } +bool IsHdrStream(const Stream& stream) { + return stream.dynamic_profile != + ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD; +} + } // namespace utils } // namespace google_camera_hal } // namespace android diff --git a/common/hal/utils/utils.h b/common/hal/utils/utils.h index 770fd12..16a60d2 100644 --- a/common/hal/utils/utils.h +++ b/common/hal/utils/utils.h @@ -40,6 +40,7 @@ bool IsOutputZslStream(const Stream& stream); bool IsSoftwareDenoiseEligibleSnapshotStream(const Stream& stream); bool IsSecuredStream(const Stream& stream); bool IsStreamUseCasesVideoCall(const Stream& stream); +bool IsHdrStream(const Stream& stream); bool HasCapability(const HalCameraMetadata* metadata, uint8_t capability); |