summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Hsieh <rogercyhsieh@google.com>2023-03-17 00:25:43 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-17 00:25:43 +0000
commit59b81d9bb9f8618217d9014d7afb3f7c65f0679d (patch)
tree717d0697306c0df42ef8ec17645955d493c93cd0
parentb9a2c7d2a21f2a8aaeb30ca37cbe47f5ff3b8344 (diff)
parent529f74eeccfd3c01e05962e770cf62801d34db6f (diff)
downloadcamera-59b81d9bb9f8618217d9014d7afb3f7c65f0679d.tar.gz
Merge "Disable ZSL for 10-bit HDR preview" into udc-dev am: 529f74eecc
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/camera/+/21807386 Change-Id: I7e95134714308fe7fc9217ba4f1bf48a0cb0656b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--common/hal/google_camera_hal/zsl_snapshot_capture_session.cc9
-rw-r--r--common/hal/utils/utils.cc5
-rw-r--r--common/hal/utils/utils.h1
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 4dac918..93a3e13 100644
--- a/common/hal/utils/utils.cc
+++ b/common/hal/utils/utils.cc
@@ -544,6 +544,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);