summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:11:35 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:11:35 +0000
commit4cbea0721aa14b5f25156db0a557b907665a2eb2 (patch)
tree0213509366058b560461bca5a88bfd3fb738ba9c
parent28fffb8daf5c7e4a97b908dd5851ff42a51c5e5b (diff)
parente847eb6b4da55720be0ebd32c35b5589646439ad (diff)
downloadcamera-android14-mainline-permission-release.tar.gz
Change-Id: Ic174065b36199785199f0c9e962323358b0c6a41
-rw-r--r--Android.mk6
-rw-r--r--common/hal/aidl_service/Android.bp7
-rw-r--r--common/hal/aidl_service/aidl_camera_device_session.cc40
-rw-r--r--common/hal/aidl_service/aidl_camera_device_session.h3
-rw-r--r--common/hal/aidl_service/aidl_camera_provider.cc10
-rw-r--r--common/hal/aidl_service/aidl_service.cc2
-rw-r--r--common/hal/aidl_service/aidl_utils.cc86
-rw-r--r--common/hal/aidl_service/aidl_utils.h5
-rw-r--r--common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml2
-rw-r--r--common/hal/aidl_service/version_script.py2
-rw-r--r--common/hal/common/hal_types.h29
-rw-r--r--common/hal/common/vendor_tag_defs.h13
-rw-r--r--common/hal/google_camera_hal/Android.bp1
-rw-r--r--common/hal/google_camera_hal/basic_request_processor.cc1
-rw-r--r--common/hal/google_camera_hal/camera_device_session.cc4
-rw-r--r--common/hal/google_camera_hal/camera_provider.cc5
-rw-r--r--common/hal/google_camera_hal/hdrplus_capture_session.cc3
-rw-r--r--common/hal/google_camera_hal/pending_requests_tracker.cc30
-rw-r--r--common/hal/google_camera_hal/pending_requests_tracker.h3
-rw-r--r--common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc166
-rw-r--r--common/hal/google_camera_hal/realtime_zsl_result_request_processor.h20
-rw-r--r--common/hal/google_camera_hal/rgbird_capture_session.cc3
-rw-r--r--common/hal/google_camera_hal/vendor_tags.cc3
-rw-r--r--common/hal/google_camera_hal/zsl_snapshot_capture_session.cc30
-rw-r--r--common/hal/tests/Android.bp21
-rw-r--r--common/hal/tests/AndroidTest.xml34
-rw-r--r--common/hal/tests/result_dispatcher_tests.cc4
-rw-r--r--common/hal/utils/Android.bp1
-rw-r--r--common/hal/utils/realtime_process_block.cc (renamed from common/hal/google_camera_hal/realtime_process_block.cc)5
-rw-r--r--common/hal/utils/realtime_process_block.h (renamed from common/hal/google_camera_hal/realtime_process_block.h)0
-rw-r--r--common/hal/utils/result_dispatcher.cc219
-rw-r--r--common/hal/utils/result_dispatcher.h52
-rw-r--r--common/hal/utils/stream_buffer_cache_manager.cc2
-rw-r--r--common/hal/utils/utils.cc47
-rw-r--r--common/hal/utils/utils.h3
-rw-r--r--common/hal/utils/zsl_result_dispatcher.cc20
-rw-r--r--common/hal/utils/zsl_result_dispatcher.h7
-rw-r--r--common/sensor_listener/goog_sensor_motion.cc7
-rw-r--r--devices/EmulatedCamera/hwl/Base.h5
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedCameraDeviceSessionHWLImpl.cpp6
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.cpp5
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h2
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp139
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestProcessor.h20
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestState.cpp59
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestState.h4
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedSensor.cpp395
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedSensor.h82
-rw-r--r--devices/EmulatedCamera/hwl/JpegCompressor.cpp155
-rw-r--r--devices/EmulatedCamera/hwl/JpegCompressor.h2
-rw-r--r--devices/EmulatedCamera/hwl/apex/Android.bp10
-rw-r--r--devices/EmulatedCamera/hwl/apex/apex_manifest.json3
-rw-r--r--devices/EmulatedCamera/hwl/apex/com.google.emulated.camera.provider.hal.rc4
-rw-r--r--devices/EmulatedCamera/hwl/apex/file_contexts4
-rw-r--r--devices/EmulatedCamera/hwl/configs/Android.bp2
-rw-r--r--devices/EmulatedCamera/hwl/configs/emu_camera_back.json1613
-rw-r--r--devices/EmulatedCamera/hwl/configs/emu_camera_depth.json736
-rw-r--r--devices/EmulatedCamera/hwl/configs/emu_camera_front.json7289
-rwxr-xr-xdevices/EmulatedCamera/hwl/tools/parse_bugreport.py23
-rw-r--r--devices/EmulatedCamera/hwl/utils/ExifUtils.h8
-rw-r--r--devices/EmulatedCamera/hwl/utils/HWLUtils.cpp132
61 files changed, 6501 insertions, 5093 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..4b0e014
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,6 @@
+LOCAL_PATH := $(call my-dir)
+
+$(eval $(call declare-1p-copy-files,hardware/google/camera,))
+
+# Include the sub-makefiles
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/common/hal/aidl_service/Android.bp b/common/hal/aidl_service/Android.bp
index df5d70e..179a826 100644
--- a/common/hal/aidl_service/Android.bp
+++ b/common/hal/aidl_service/Android.bp
@@ -90,13 +90,15 @@ cc_defaults {
],
compile_multilib: "first",
shared_libs: [
- "android.hardware.camera.device-V1-ndk",
+ "android.hardware.camera.device-V2-ndk",
"android.hardware.camera.common-V1-ndk",
- "android.hardware.camera.provider-V1-ndk",
+ "android.hardware.camera.provider-V2-ndk",
"android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@4.0",
+ "android.hardware.thermal@1.0",
"android.hardware.thermal@2.0",
+ "android.hardware.thermal-V1-ndk",
"libbinder",
"libbinder_ndk",
"libbase",
@@ -115,6 +117,7 @@ cc_defaults {
],
static_libs: [
"libaidlcommonsupport",
+ "libthermalutils",
],
}
diff --git a/common/hal/aidl_service/aidl_camera_device_session.cc b/common/hal/aidl_service/aidl_camera_device_session.cc
index 9af6de1..9a69d74 100644
--- a/common/hal/aidl_service/aidl_camera_device_session.cc
+++ b/common/hal/aidl_service/aidl_camera_device_session.cc
@@ -19,10 +19,14 @@
//#define LOG_NDEBUG 0
#include "aidl_camera_device_session.h"
+#include <aidl/android/hardware/thermal/IThermal.h>
+#include <android/binder_ibinder_platform.h>
+#include <android/binder_manager.h>
#include <cutils/properties.h>
#include <cutils/trace.h>
#include <log/log.h>
#include <malloc.h>
+#include <thermalutils/ThermalHidlWrapper.h>
#include <utils/Trace.h>
#include "aidl_profiler.h"
@@ -384,7 +388,27 @@ status_t AidlCameraDeviceSession::Initialize(
return res;
}
- thermal_ = android::hardware::thermal::V2_0::IThermal::getService();
+ const std::string thermal_instance_name =
+ std::string(::aidl::android::hardware::thermal::IThermal::descriptor) +
+ "/default";
+ if (AServiceManager_isDeclared(thermal_instance_name.c_str())) {
+ auto thermal_aidl_service =
+ ::aidl::android::hardware::thermal::IThermal::fromBinder(ndk::SpAIBinder(
+ AServiceManager_waitForService(thermal_instance_name.c_str())));
+ if (thermal_aidl_service) {
+ thermal_ =
+ sp<::aidl::android::hardware::thermal::ThermalHidlWrapper>::make(
+ thermal_aidl_service);
+ } else {
+ ALOGW("Unable to get Thermal AIDL service; trying Thermal HIDL service");
+ }
+ } else {
+ ALOGW("Thermal AIDL service is not declared; trying Thermal HIDL service");
+ }
+
+ if (!thermal_) {
+ thermal_ = android::hardware::thermal::V2_0::IThermal::getService();
+ }
if (thermal_ == nullptr) {
ALOGE("%s: Getting thermal failed.", __FUNCTION__);
// Continue without getting thermal information.
@@ -584,8 +608,12 @@ ScopedAStatus AidlCameraDeviceSession::configureStreams(
num_pending_first_frame_buffers_ = 0;
google_camera_hal::StreamConfiguration hal_stream_config;
- status_t res = aidl_utils::ConvertToHalStreamConfig(requestedConfiguration,
- &hal_stream_config);
+ StreamConfiguration requestedConfigurationOverriddenSensorPixelModes =
+ requestedConfiguration;
+ aidl_utils::FixSensorPixelModesInStreamConfig(
+ &requestedConfigurationOverriddenSensorPixelModes);
+ status_t res = aidl_utils::ConvertToHalStreamConfig(
+ requestedConfigurationOverriddenSensorPixelModes, &hal_stream_config);
if (res != OK) {
return ScopedAStatus::fromServiceSpecificError(
static_cast<int32_t>(Status::ILLEGAL_ARGUMENT));
@@ -798,6 +826,12 @@ ScopedAStatus AidlCameraDeviceSession::isReconfigurationRequired(
return ScopedAStatus::ok();
}
+::ndk::SpAIBinder AidlCameraDeviceSession::createBinder() {
+ auto binder = BnCameraDeviceSession::createBinder();
+ AIBinder_setInheritRt(binder.get(), true);
+ return binder;
+}
+
} // namespace implementation
} // namespace device
} // namespace camera
diff --git a/common/hal/aidl_service/aidl_camera_device_session.h b/common/hal/aidl_service/aidl_camera_device_session.h
index e14604d..3423d8f 100644
--- a/common/hal/aidl_service/aidl_camera_device_session.h
+++ b/common/hal/aidl_service/aidl_camera_device_session.h
@@ -113,6 +113,9 @@ class AidlCameraDeviceSession : public BnCameraDeviceSession {
AidlCameraDeviceSession() = default;
+ protected:
+ ::ndk::SpAIBinder createBinder() override;
+
private:
static constexpr uint32_t kRequestMetadataQueueSizeBytes = 1 << 20; // 1MB
static constexpr uint32_t kResultMetadataQueueSizeBytes = 1 << 20; // 1MB
diff --git a/common/hal/aidl_service/aidl_camera_provider.cc b/common/hal/aidl_service/aidl_camera_provider.cc
index 7eac3f2..be1ccc7 100644
--- a/common/hal/aidl_service/aidl_camera_provider.cc
+++ b/common/hal/aidl_service/aidl_camera_provider.cc
@@ -301,7 +301,13 @@ ScopedAStatus AidlCameraProvider::isConcurrentStreamCombinationSupported(
devices_stream_configs(configs.size());
status_t res = OK;
size_t c = 0;
- for (auto& config : configs) {
+ std::vector<CameraIdAndStreamCombination> configsWithOverriddenSensorPixelModes =
+ configs;
+ for (auto& config : configsWithOverriddenSensorPixelModes) {
+ aidl_utils::FixSensorPixelModesInStreamConfig(&config.streamConfiguration);
+ }
+
+ for (auto& config : configsWithOverriddenSensorPixelModes) {
res = aidl_utils::ConvertToHalStreamConfig(
config.streamConfiguration,
&devices_stream_configs[c].stream_configuration);
@@ -317,7 +323,7 @@ ScopedAStatus AidlCameraProvider::isConcurrentStreamCombinationSupported(
res = google_camera_provider_->IsConcurrentStreamCombinationSupported(
devices_stream_configs, supported);
if (res != OK) {
- ALOGE("%s: ConverToHalStreamConfig failed", __FUNCTION__);
+ ALOGE("%s: IsConcurrentStreamCombinationSupported failed", __FUNCTION__);
return ScopedAStatus::fromServiceSpecificError(
static_cast<int32_t>(Status::INTERNAL_ERROR));
}
diff --git a/common/hal/aidl_service/aidl_service.cc b/common/hal/aidl_service/aidl_service.cc
index 91f52b1..a98753a 100644
--- a/common/hal/aidl_service/aidl_service.cc
+++ b/common/hal/aidl_service/aidl_service.cc
@@ -28,6 +28,7 @@
#include <cutils/properties.h>
#include <hidl/HidlTransportSupport.h>
#include <malloc.h>
+#include <utils/AndroidThreads.h>
#include <utils/Errors.h>
#include <cinttypes>
@@ -101,6 +102,7 @@ int main() {
return android::NO_INIT;
}
}
+ androidSetThreadName("google.camera.provider");
ABinderProcess_joinThreadPool();
// In normal operation, the threadpool should never return.
diff --git a/common/hal/aidl_service/aidl_utils.cc b/common/hal/aidl_service/aidl_utils.cc
index b5a4028..332d1a1 100644
--- a/common/hal/aidl_service/aidl_utils.cc
+++ b/common/hal/aidl_service/aidl_utils.cc
@@ -15,11 +15,12 @@
*/
#define LOG_TAG "GCH_AidlUtils"
-//#define LOG_NDEBUG 0
+// #define LOG_NDEBUG 0
#include "aidl_utils.h"
#include <aidlcommonsupport/NativeHandle.h>
#include <log/log.h>
+#include <system/camera_metadata.h>
#include <regex>
@@ -35,6 +36,8 @@ namespace aidl_utils {
using AidlCameraProvider = provider::implementation::AidlCameraProvider;
using AidlCameraDevice = device::implementation::AidlCameraDevice;
using AidlStatus = aidl::android::hardware::camera::common::Status;
+using DynamicRangeProfile = google_camera_hal::DynamicRangeProfile;
+using ColorSpaceProfile = google_camera_hal::ColorSpaceProfile;
ScopedAStatus ConvertToAidlReturn(status_t hal_status) {
switch (hal_status) {
@@ -711,12 +714,29 @@ status_t ConvertToHalMetadata(
const camera_metadata_t* metadata = nullptr;
std::vector<int8_t> metadata_queue_settings;
+ const size_t min_camera_metadata_size =
+ calculate_camera_metadata_size(/*entry_count=*/0, /*data_count=*/0);
if (message_queue_setting_size == 0) {
// Use the settings in the request.
if (request_settings.size() != 0) {
+ if (request_settings.size() < min_camera_metadata_size) {
+ ALOGE("%s: The size of request_settings is %zu, which is not valid",
+ __FUNCTION__, request_settings.size());
+ return BAD_VALUE;
+ }
+
metadata =
reinterpret_cast<const camera_metadata_t*>(request_settings.data());
+
+ size_t metadata_size = get_camera_metadata_size(metadata);
+ if (metadata_size != request_settings.size()) {
+ ALOGE(
+ "%s: Mismatch between camera metadata size (%zu) and request "
+ "setting size (%zu)",
+ __FUNCTION__, metadata_size, request_settings.size());
+ return BAD_VALUE;
+ }
}
} else {
// Read the settings from request metadata queue.
@@ -724,6 +744,11 @@ status_t ConvertToHalMetadata(
ALOGE("%s: request_metadata_queue is nullptr", __FUNCTION__);
return BAD_VALUE;
}
+ if (message_queue_setting_size < min_camera_metadata_size) {
+ ALOGE("%s: invalid message queue setting size: %u", __FUNCTION__,
+ message_queue_setting_size);
+ return BAD_VALUE;
+ }
metadata_queue_settings.resize(message_queue_setting_size);
bool success = request_metadata_queue->read(metadata_queue_settings.data(),
@@ -735,6 +760,15 @@ status_t ConvertToHalMetadata(
metadata = reinterpret_cast<const camera_metadata_t*>(
metadata_queue_settings.data());
+
+ size_t metadata_size = get_camera_metadata_size(metadata);
+ if (metadata_size != message_queue_setting_size) {
+ ALOGE(
+ "%s: Mismatch between camera metadata size (%zu) and message "
+ "queue setting size (%u)",
+ __FUNCTION__, metadata_size, message_queue_setting_size);
+ return BAD_VALUE;
+ }
}
if (metadata == nullptr) {
@@ -742,6 +776,16 @@ status_t ConvertToHalMetadata(
return OK;
}
+ // Validates the injected metadata structure. This prevents memory access
+ // violation that could be introduced by malformed metadata.
+ // (b/236688120) In general we trust metadata sent from Framework, but this is
+ // to defend an exploit chain that skips Framework's validation.
+ if (validate_camera_metadata_structure(metadata, /*expected_size=*/NULL) !=
+ OK) {
+ ALOGE("%s: Failed to validate the metadata structure", __FUNCTION__);
+ return BAD_VALUE;
+ }
+
*hal_metadata = google_camera_hal::HalCameraMetadata::Clone(metadata);
return OK;
}
@@ -867,6 +911,34 @@ static bool sensorPixelModeContains(const Stream& aidl_stream, uint32_t key) {
return false;
}
+void FixSensorPixelModesInStreamConfig(
+ StreamConfiguration* out_aidl_stream_config) {
+ if (out_aidl_stream_config == nullptr) {
+ ALOGE("%s: input stream config is NULL", __FUNCTION__);
+ return;
+ }
+
+ // Get the sensor pixel modes in the stream config, do one pass and check if
+ // default is present in all.
+ using SensorPixelMode =
+ aidl::android::hardware::camera::metadata::SensorPixelMode;
+ for (const auto& stream : out_aidl_stream_config->streams) {
+ const auto& sensorPixelModes = stream.sensorPixelModesUsed;
+ if ((std::count(sensorPixelModes.begin(), sensorPixelModes.end(),
+ static_cast<SensorPixelMode>(
+ ANDROID_SENSOR_PIXEL_MODE_DEFAULT)) == 0)) {
+ return;
+ }
+ }
+
+ // All of them contain DEFAULT, just override them to be default only.
+ for (auto& stream : out_aidl_stream_config->streams) {
+ stream.sensorPixelModesUsed.clear();
+ stream.sensorPixelModesUsed.push_back(
+ static_cast<SensorPixelMode>(ANDROID_SENSOR_PIXEL_MODE_DEFAULT));
+ }
+}
+
status_t ConvertToHalStreamConfig(
const StreamConfiguration& aidl_stream_config,
google_camera_hal::StreamConfiguration* hal_stream_config) {
@@ -909,6 +981,7 @@ status_t ConvertToHalStreamConfig(
aidl_stream_config.streamConfigCounter;
hal_stream_config->multi_resolution_input_image =
aidl_stream_config.multiResolutionInputImage;
+ hal_stream_config->log_id = aidl_stream_config.logId;
return OK;
}
@@ -1007,16 +1080,17 @@ status_t ConvertToHalStream(const Stream& aidl_stream,
hal_stream->buffer_size = aidl_stream.bufferSize;
hal_stream->group_id = aidl_stream.groupId;
- hal_stream->used_in_max_resolution_mode = sensorPixelModeContains(
+ hal_stream->intended_for_max_resolution_mode = sensorPixelModeContains(
aidl_stream, ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION);
- hal_stream->used_in_default_resolution_mode =
+ hal_stream->intended_for_default_resolution_mode =
aidl_stream.sensorPixelModesUsed.size() > 0
? sensorPixelModeContains(aidl_stream,
ANDROID_SENSOR_PIXEL_MODE_DEFAULT)
: true;
- hal_stream->dynamic_profile = static_cast<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map>(
- aidl_stream.dynamicRangeProfile);
+ hal_stream->dynamic_profile =
+ static_cast<DynamicRangeProfile>(aidl_stream.dynamicRangeProfile);
+ hal_stream->color_space =
+ static_cast<ColorSpaceProfile>(aidl_stream.colorSpace);
hal_stream->use_case =
static_cast<camera_metadata_enum_android_scaler_available_stream_use_cases>(
diff --git a/common/hal/aidl_service/aidl_utils.h b/common/hal/aidl_service/aidl_utils.h
index 05873f3..be7e6a5 100644
--- a/common/hal/aidl_service/aidl_utils.h
+++ b/common/hal/aidl_service/aidl_utils.h
@@ -162,6 +162,11 @@ status_t ConvertToHalBufferCaches(
const std::vector<BufferCache>& aidl_buffer_caches,
std::vector<google_camera_hal::BufferCache>* hal_buffer_caches);
+// Optimize sensor pixel modes list: If all streams' sensor pixel modes
+// list contains DEFAULT, just override them to DEFAULT only.
+void FixSensorPixelModesInStreamConfig(
+ StreamConfiguration* out_aidl_stream_config);
+
status_t ConvertToHalStreamConfig(
const StreamConfiguration& aidl_stream_config,
google_camera_hal::StreamConfiguration* hal_stream_config);
diff --git a/common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml b/common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml
index 5e74ac5..a772f31 100644
--- a/common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml
+++ b/common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.camera.provider</name>
- <version>1</version>
+ <version>2</version>
<interface>
<name>ICameraProvider</name>
<instance>internal/0</instance>
diff --git a/common/hal/aidl_service/version_script.py b/common/hal/aidl_service/version_script.py
index 5551ad9..bdfe922 100644
--- a/common/hal/aidl_service/version_script.py
+++ b/common/hal/aidl_service/version_script.py
@@ -20,7 +20,7 @@ import os
import re
import sys
-BRANCH_SPECIFIC_VERSION_IDENTIFIER = 4 # main
+BRANCH_SPECIFIC_VERSION_IDENTIFIER = 10 # main
DEFAULT_ENG_BUILD_NUMBER = 2147480000
DEFAULT_BAD_BUILD_NUMBER = DEFAULT_ENG_BUILD_NUMBER - 1
diff --git a/common/hal/common/hal_types.h b/common/hal/common/hal_types.h
index 7c18b34..8695418 100644
--- a/common/hal/common/hal_types.h
+++ b/common/hal/common/hal_types.h
@@ -105,6 +105,13 @@ enum class StreamRotation : uint32_t {
kRotation270,
};
+typedef camera_metadata_enum_android_request_available_dynamic_range_profiles_map
+ DynamicRangeProfile;
+typedef camera_metadata_enum_android_request_available_color_space_profiles_map
+ ColorSpaceProfile;
+typedef camera_metadata_enum_android_scaler_available_stream_use_cases
+ StreamUseCase;
+
// See the definition of
// ::android::hardware::camera::device::V3_8::Stream;
struct Stream {
@@ -120,13 +127,13 @@ struct Stream {
uint32_t physical_camera_id = 0;
uint32_t buffer_size = 0;
int32_t group_id = -1;
- bool used_in_max_resolution_mode = false;
- bool used_in_default_resolution_mode = true;
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map
- dynamic_profile =
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD;
- camera_metadata_enum_android_scaler_available_stream_use_cases use_case =
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT;
+ bool intended_for_max_resolution_mode = false;
+ bool intended_for_default_resolution_mode = true;
+ DynamicRangeProfile dynamic_profile =
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD;
+ StreamUseCase use_case = ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT;
+ ColorSpaceProfile color_space =
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED;
};
// See the definition of
@@ -144,6 +151,7 @@ struct StreamConfiguration {
std::unique_ptr<HalCameraMetadata> session_params;
uint32_t stream_config_counter = 0;
bool multi_resolution_input_image = false;
+ long log_id = 0;
};
struct CameraIdAndStreamConfiguration {
@@ -378,9 +386,10 @@ struct BufferReturn {
// ::android::hardware::camera::provider::V2_5::DeviceState
enum class DeviceState : uint64_t {
kNormal = 0ull,
- kBackCovered = 1ull,
- kFrontCovered = 2ull,
- kFolded = 4ull
+ kBackCovered = 1 << 0,
+ kFrontCovered = 1 << 1,
+ kFolded = 1 << 2,
+ kMaxDeviceState = 1 << 3 // for data validation
};
// Callback function invoked to process capture results.
diff --git a/common/hal/common/vendor_tag_defs.h b/common/hal/common/vendor_tag_defs.h
index 8b7c6ce..bce1b13 100644
--- a/common/hal/common/vendor_tag_defs.h
+++ b/common/hal/common/vendor_tag_defs.h
@@ -48,6 +48,7 @@ enum VendorTagIds : uint32_t {
kHdrUsageMode,
kSwDenoiseEnabled,
kVideoSwDenoiseEnabled,
+ kVideo60to30FPSThermalThrottle,
// This should not be used as a vendor tag ID on its own, but as a placeholder
// to indicate the end of currently defined vendor tag IDs
kEndMarker
@@ -73,6 +74,9 @@ enum class SmoothyMode : uint32_t {
// done at app side which is N frame later than HAL where N is the pipeline
// depth.
kDelayedTrackingMode,
+
+ // Indicates macro video mode.
+ kMacroVideoMode,
};
// Logical camera vendor tags
@@ -229,6 +233,15 @@ static const std::vector<VendorTag> kInternalVendorTags = {
{.tag_id = VendorTagIds::kVideoSwDenoiseEnabled,
.tag_name = "VideoSwDenoiseEnabled",
.tag_type = CameraMetadataType::kByte},
+ // Video Recording 60 to 30 FPS Thermal Throttling enabled
+ //
+ // Indicates whether 60 to 30FPS thermal throttling is enabled
+ //
+ // Present in: request and session keys
+ // Payload: Video60to30FPSThermalThrottle
+ {.tag_id = VendorTagIds::kVideo60to30FPSThermalThrottle,
+ .tag_name = "Video60to30FPSThermalThrottle",
+ .tag_type = CameraMetadataType::kByte},
};
// Google Camera HAL vendor tag sections
diff --git a/common/hal/google_camera_hal/Android.bp b/common/hal/google_camera_hal/Android.bp
index 59640ea..0b35366 100644
--- a/common/hal/google_camera_hal/Android.bp
+++ b/common/hal/google_camera_hal/Android.bp
@@ -67,7 +67,6 @@ cc_library_shared {
"dual_ir_result_request_processor.cc",
"hdrplus_capture_session.cc",
"pending_requests_tracker.cc",
- "realtime_process_block.cc",
"realtime_zsl_request_processor.cc",
"realtime_zsl_result_processor.cc",
"realtime_zsl_result_request_processor.cc",
diff --git a/common/hal/google_camera_hal/basic_request_processor.cc b/common/hal/google_camera_hal/basic_request_processor.cc
index c38d9e0..06beb5d 100644
--- a/common/hal/google_camera_hal/basic_request_processor.cc
+++ b/common/hal/google_camera_hal/basic_request_processor.cc
@@ -61,6 +61,7 @@ status_t BasicRequestProcessor::ConfigureStreams(
stream_config.stream_config_counter;
process_block_stream_config->multi_resolution_input_image =
stream_config.multi_resolution_input_image;
+ process_block_stream_config->log_id = stream_config.log_id;
return OK;
}
diff --git a/common/hal/google_camera_hal/camera_device_session.cc b/common/hal/google_camera_hal/camera_device_session.cc
index f1821e6..f0fb273 100644
--- a/common/hal/google_camera_hal/camera_device_session.cc
+++ b/common/hal/google_camera_hal/camera_device_session.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-//#define LOG_NDEBUG 0
+// #define LOG_NDEBUG 0
#define LOG_TAG "GCH_CameraDeviceSession"
#define ATRACE_TAG ATRACE_TAG_CAMERA
#include "camera_device_session.h"
@@ -1858,9 +1858,9 @@ status_t CameraDeviceSession::RequestStreamBuffers(
ALOGI("%s: stream %d, buffer request error %d", __FUNCTION__,
buffer_return.stream_id, buffer_return.val.error);
}
-
pending_requests_tracker_->TrackBufferAcquisitionFailure(stream_id,
num_buffers);
+ pending_requests_tracker_->DumpStatus();
// TODO(b/129362905): Return partial buffers.
return UNKNOWN_ERROR;
}
diff --git a/common/hal/google_camera_hal/camera_provider.cc b/common/hal/google_camera_hal/camera_provider.cc
index 2d816eb..30e184d 100644
--- a/common/hal/google_camera_hal/camera_provider.cc
+++ b/common/hal/google_camera_hal/camera_provider.cc
@@ -23,6 +23,9 @@
#include <log/log.h>
#include <utils/Trace.h>
+#if !GCH_HWL_USE_DLOPEN
+#include "lyric_hwl/madvise_library_list.h"
+#endif
#include "vendor_tag_defs.h"
#include "vendor_tag_utils.h"
@@ -282,6 +285,8 @@ status_t CameraProvider::CreateCameraDevice(
#if GCH_HWL_USE_DLOPEN
configure_streams_libs = reinterpret_cast<decltype(configure_streams_libs)>(
dlsym(hwl_lib_handle_, "configure_streams_libraries"));
+#else
+ configure_streams_libs = &configure_streams_libraries;
#endif
*device =
CameraDevice::Create(std::move(camera_device_hwl),
diff --git a/common/hal/google_camera_hal/hdrplus_capture_session.cc b/common/hal/google_camera_hal/hdrplus_capture_session.cc
index c7b676a..28abcce 100644
--- a/common/hal/google_camera_hal/hdrplus_capture_session.cc
+++ b/common/hal/google_camera_hal/hdrplus_capture_session.cc
@@ -481,7 +481,8 @@ status_t HdrplusCaptureSession::Initialize(
// Create result dispatcher
result_dispatcher_ =
- ResultDispatcher::Create(kPartialResult, process_capture_result, notify);
+ ResultDispatcher::Create(kPartialResult, process_capture_result, notify,
+ stream_config, "HdrplusDispatcher");
if (result_dispatcher_ == nullptr) {
ALOGE("%s: Cannot create result dispatcher.", __FUNCTION__);
return UNKNOWN_ERROR;
diff --git a/common/hal/google_camera_hal/pending_requests_tracker.cc b/common/hal/google_camera_hal/pending_requests_tracker.cc
index 87ad722..23eae69 100644
--- a/common/hal/google_camera_hal/pending_requests_tracker.cc
+++ b/common/hal/google_camera_hal/pending_requests_tracker.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-//#define LOG_NDEBUG 0
+// #define LOG_NDEBUG 0
#define LOG_TAG "GCH_PendingRequestsTracker"
#define ATRACE_TAG ATRACE_TAG_CAMERA
#include <log/log.h>
@@ -318,5 +318,33 @@ void PendingRequestsTracker::TrackBufferAcquisitionFailure(int32_t stream_id,
stream_acquired_buffers_[overridden_stream_id] -= num_buffers;
}
+void PendingRequestsTracker::DumpStatus() {
+ std::string pending_requests_string = "{";
+ {
+ std::lock_guard<std::mutex> lock(pending_requests_mutex_);
+ for (auto& [stream_id, num_pending_buffers] : stream_pending_buffers_) {
+ pending_requests_string += "{" + std::to_string(stream_id) + ": " +
+ std::to_string(num_pending_buffers) + "},";
+ }
+ }
+ pending_requests_string += "}";
+
+ std::string pending_acquisition_string = "{";
+ {
+ std::lock_guard<std::mutex> lock(pending_acquisition_mutex_);
+ for (auto& [stream_id, num_acquired_buffers] : stream_acquired_buffers_) {
+ pending_acquisition_string += "{" + std::to_string(stream_id) + ": " +
+ std::to_string(num_acquired_buffers) + "},";
+ }
+ }
+ pending_acquisition_string += "}";
+
+ ALOGI(
+ "%s: Buffers (including dummy) pending return from HWL: %s. Buffers "
+ "proactively acquired from the framework: %s.",
+ __FUNCTION__, pending_requests_string.c_str(),
+ pending_acquisition_string.c_str());
+}
+
} // namespace google_camera_hal
} // namespace android
diff --git a/common/hal/google_camera_hal/pending_requests_tracker.h b/common/hal/google_camera_hal/pending_requests_tracker.h
index cdff661..529eb6a 100644
--- a/common/hal/google_camera_hal/pending_requests_tracker.h
+++ b/common/hal/google_camera_hal/pending_requests_tracker.h
@@ -63,6 +63,9 @@ class PendingRequestsTracker {
// Notify the request tracker that the buffer cache manager has been flushed.
void OnBufferCacheFlushed();
+ // Dump the buffer counting status
+ void DumpStatus();
+
virtual ~PendingRequestsTracker() = default;
protected:
diff --git a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc
index 23b9f78..472b5bc 100644
--- a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc
+++ b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc
@@ -24,6 +24,8 @@
#include <log/log.h>
#include <utils/Trace.h>
+#include <memory>
+
#include "hal_types.h"
#include "hal_utils.h"
#include "realtime_zsl_result_processor.h"
@@ -70,7 +72,7 @@ RealtimeZslResultRequestProcessor::RealtimeZslResultRequestProcessor(
}
void RealtimeZslResultRequestProcessor::UpdateOutputBufferCount(
- int32_t frame_number, int output_buffer_count) {
+ int32_t frame_number, int output_buffer_count, bool is_preview_intent) {
ATRACE_CALL();
std::lock_guard<std::mutex> lock(callback_lock_);
// Cache the CaptureRequest in a queue as the metadata and buffers may not
@@ -79,6 +81,12 @@ void RealtimeZslResultRequestProcessor::UpdateOutputBufferCount(
.capture_request = std::make_unique<CaptureRequest>(),
.framework_buffer_count = output_buffer_count};
request_entry.capture_request->frame_number = frame_number;
+ if (!is_preview_intent) {
+ // If no preview intent is provided, RealtimeZslRequestProcessor will not
+ // add an internal buffer to the request so there is no ZSL buffer to wait
+ // for in that case.
+ request_entry.zsl_buffer_received = true;
+ }
pending_frame_number_to_requests_[frame_number] = std::move(request_entry);
}
@@ -93,18 +101,29 @@ void RealtimeZslResultRequestProcessor::ProcessResult(
return;
}
+ // May change to ALOGD for per-frame results.
+ ALOGV(
+ "%s: Received result at frame: %d, has metadata (%s), output buffer "
+ "counts: %zu, input buffer counts: %zu",
+ __FUNCTION__, result->frame_number,
+ (result->result_metadata ? "yes" : "no"), result->output_buffers.size(),
+ result->input_buffers.size());
+
// Pending request should always exist
RequestEntry& pending_request =
pending_frame_number_to_requests_[result->frame_number];
+ if (pending_request.capture_request == nullptr) {
+ pending_request.capture_request = std::make_unique<CaptureRequest>();
+ pending_request.capture_request->frame_number = result->frame_number;
+ }
// Return filled raw buffer to internal stream manager
// And remove raw buffer from result
- bool returned_output = false;
status_t res;
std::vector<StreamBuffer> modified_output_buffers;
for (uint32_t i = 0; i < result->output_buffers.size(); i++) {
if (stream_id_ == result->output_buffers[i].stream_id) {
- returned_output = true;
+ pending_request.has_returned_output_to_internal_stream_manager = true;
res = internal_stream_manager_->ReturnFilledBuffer(
result->frame_number, result->output_buffers[i]);
if (res != OK) {
@@ -146,45 +165,8 @@ void RealtimeZslResultRequestProcessor::ProcessResult(
if (pending_error_frames_.find(result->frame_number) !=
pending_error_frames_.end()) {
RequestEntry& error_entry = pending_error_frames_[result->frame_number];
- // Also need to process pending buffers and metadata for the frame if exists.
- // If the result is complete (buffers and all partial results arrived), send
- // the callback directly. Otherwise wait until the missing pieces arrive.
- if (pending_request.zsl_buffer_received &&
- pending_request.framework_buffer_count ==
- static_cast<int>(
- pending_request.capture_request->output_buffers.size())) {
- result->output_buffers = pending_request.capture_request->output_buffers;
- result->input_buffers = pending_request.capture_request->input_buffers;
- error_entry.capture_request->output_buffers = result->output_buffers;
- error_entry.capture_request->input_buffers = result->input_buffers;
- error_entry.zsl_buffer_received = pending_request.zsl_buffer_received;
- error_entry.framework_buffer_count =
- pending_request.framework_buffer_count;
- }
- if (pending_request.capture_request->settings != nullptr) {
- result->result_metadata = HalCameraMetadata::Clone(
- pending_request.capture_request->settings.get());
- result->partial_result = pending_request.partial_results_received;
- error_entry.partial_results_received++;
- }
-
- // Reset capture request for pending request as all data has been
- // transferred to error_entry already.
- pending_request.capture_request = std::make_unique<CaptureRequest>();
- pending_request.capture_request->frame_number = result->frame_number;
-
- if (AllDataCollected(error_entry)) {
- pending_error_frames_.erase(result->frame_number);
- pending_frame_number_to_requests_.erase(result->frame_number);
- }
-
- // Don't send result to framework if only internal raw callback
- if (returned_output && result->result_metadata == nullptr &&
- result->output_buffers.size() == 0) {
- return;
- }
- process_capture_result_(std::move(result));
- return;
+ return ReturnResultDirectlyForFramesWithErrorsLocked(
+ error_entry, pending_request, std::move(result));
}
// Fill in final result metadata
@@ -201,7 +183,7 @@ void RealtimeZslResultRequestProcessor::ProcessResult(
pending_request.capture_request->settings =
HalCameraMetadata::Clone(result->result_metadata.get());
} else {
- // Append final result to early result
+ // Append early result to final result
pending_request.capture_request->settings->Append(
result->result_metadata->GetRawCameraMetadata());
}
@@ -251,6 +233,7 @@ status_t RealtimeZslResultRequestProcessor::ConfigureStreams(
stream_config.stream_config_counter;
process_block_stream_config->multi_resolution_input_image =
stream_config.multi_resolution_input_image;
+ process_block_stream_config->log_id = stream_config.log_id;
return OK;
}
@@ -328,15 +311,110 @@ void RealtimeZslResultRequestProcessor::Notify(
// Will return buffer for kErrorRequest and kErrorBuffer.
if (message.type == MessageType::kError) {
+ // May change to ALOGD for per-frame error messages.
+ ALOGV("%s: Received error message at frame: %d, error code (%d)",
+ __FUNCTION__, message.message.error.frame_number,
+ static_cast<int>(message.message.error.error_code));
if (message.message.error.error_code == ErrorCode::kErrorRequest ||
message.message.error.error_code == ErrorCode::kErrorBuffer) {
pending_error_frames_.try_emplace(
message.message.error.frame_number,
RequestEntry{.capture_request = std::make_unique<CaptureRequest>()});
+ if (message.message.error.error_code == ErrorCode::kErrorRequest) {
+ // ProcessCaptureResult is not called in the case of metadata error.
+ // Therefore, treat it as if a metadata callback arrived so that we can
+ // know when the request is complete.
+ pending_error_frames_[message.message.error.frame_number]
+ .partial_results_received++;
+ }
+ }
+ // Gives latched results (those that have arrived but are waiting for
+ // AllDataCollected()) a chance to return their valid buffer.
+ uint32_t frame_number = message.message.error.frame_number;
+ auto result = std::make_unique<CaptureResult>();
+ result->frame_number = frame_number;
+ if (pending_frame_number_to_requests_.find(frame_number) !=
+ pending_frame_number_to_requests_.end()) {
+ RequestEntry& pending_request =
+ pending_frame_number_to_requests_[frame_number];
+ if (pending_request.zsl_buffer_received) {
+ ReturnResultDirectlyForFramesWithErrorsLocked(
+ pending_error_frames_[frame_number], pending_request,
+ std::move(result));
+ }
}
+ } else {
+ // May change to ALOGD for per-frame shutter messages.
+ ALOGV("%s: Received shutter message for frame %d, timestamp_ns: %" PRId64
+ ", readout_timestamp_ns: %" PRId64,
+ __FUNCTION__, message.message.shutter.frame_number,
+ message.message.shutter.timestamp_ns,
+ message.message.shutter.readout_timestamp_ns);
}
notify_(message);
}
+void RealtimeZslResultRequestProcessor::CombineErrorAndPendingEntriesToResult(
+ RequestEntry& error_entry, RequestEntry& pending_request,
+ std::unique_ptr<CaptureResult>& result) const {
+ result->output_buffers.insert(
+ result->output_buffers.end(),
+ pending_request.capture_request->output_buffers.begin(),
+ pending_request.capture_request->output_buffers.end());
+ result->input_buffers.insert(
+ result->input_buffers.end(),
+ pending_request.capture_request->input_buffers.begin(),
+ pending_request.capture_request->input_buffers.end());
+ error_entry.capture_request->output_buffers = result->output_buffers;
+ error_entry.capture_request->input_buffers = result->input_buffers;
+ error_entry.zsl_buffer_received = pending_request.zsl_buffer_received;
+ error_entry.framework_buffer_count = pending_request.framework_buffer_count;
+ if (pending_request.capture_request->settings != nullptr) {
+ if (result->result_metadata == nullptr) {
+ // result is a buffer-only result and we have early metadata sitting in
+ // pending_request. Copy this early metadata and its partial_result count.
+ result->result_metadata = HalCameraMetadata::Clone(
+ pending_request.capture_request->settings.get());
+ result->partial_result = pending_request.partial_results_received;
+ } else {
+ // result carries final metadata and we have early metadata sitting in
+ // pending_request. Append the early metadata but keep the
+ // partial_result count to reflect that this is the final metadata.
+ result->result_metadata->Append(
+ pending_request.capture_request->settings->GetRawCameraMetadata());
+ }
+ error_entry.partial_results_received += result->partial_result;
+ }
+
+ // Reset capture request for pending request as all data has been
+ // transferred to error_entry already.
+ pending_request.capture_request = std::make_unique<CaptureRequest>();
+ pending_request.capture_request->frame_number = result->frame_number;
+}
+
+void RealtimeZslResultRequestProcessor::ReturnResultDirectlyForFramesWithErrorsLocked(
+ RequestEntry& error_entry, RequestEntry& pending_request,
+ std::unique_ptr<CaptureResult> result) {
+ // Also need to process pending buffers and metadata for the frame if exists.
+ // If the result is complete (buffers and all partial results arrived), send
+ // the callback directly. Otherwise wait until the missing pieces arrive.
+ CombineErrorAndPendingEntriesToResult(error_entry, pending_request, result);
+
+ if (AllDataCollected(error_entry)) {
+ pending_error_frames_.erase(result->frame_number);
+ pending_frame_number_to_requests_.erase(result->frame_number);
+ }
+
+ // Don't send result to framework if only internal raw callback
+ if (pending_request.has_returned_output_to_internal_stream_manager &&
+ result->result_metadata == nullptr && result->output_buffers.size() == 0) {
+ return;
+ }
+ ALOGV("%s: Returning capture result for frame %d due to existing errors.",
+ __FUNCTION__, result->frame_number);
+ process_capture_result_(std::move(result));
+ return;
+}
+
} // namespace google_camera_hal
-} // namespace android \ No newline at end of file
+} // namespace android
diff --git a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h
index 609b2c3..5454916 100644
--- a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h
+++ b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h
@@ -60,7 +60,8 @@ class RealtimeZslResultRequestProcessor : public RealtimeZslResultProcessor,
status_t Flush() override;
// Override functions of RequestProcessor end.
- void UpdateOutputBufferCount(int32_t frame_number, int output_buffer_count);
+ void UpdateOutputBufferCount(int32_t frame_number, int output_buffer_count,
+ bool is_preview_intent);
protected:
RealtimeZslResultRequestProcessor(
@@ -79,10 +80,27 @@ class RealtimeZslResultRequestProcessor : public RealtimeZslResultProcessor,
uint32_t partial_results_received = 0;
bool zsl_buffer_received = false;
int framework_buffer_count = INT_MAX;
+ // Whether there were filled raw buffers that have been returned to internal
+ // stream manager.
+ bool has_returned_output_to_internal_stream_manager = false;
};
bool AllDataCollected(const RequestEntry& request_entry) const;
+ // A helper function to combine information for the same frame number from
+ // `pending_error_frames_` and `pending_frame_number_to_requests_` to the
+ // `result`. This is a 3-way update, where `pending_request` info is copied to
+ // `error_entry` and `result`, and `pending_request` info gets reset.
+ void CombineErrorAndPendingEntriesToResult(
+ RequestEntry& error_entry, RequestEntry& pending_request,
+ std::unique_ptr<CaptureResult>& result) const;
+
+ // Returns result directly for frames with errors, if applicable. Call site
+ // must hold callback_lock_.
+ void ReturnResultDirectlyForFramesWithErrorsLocked(
+ RequestEntry& error_entry, RequestEntry& pending_request,
+ std::unique_ptr<CaptureResult> result);
+
// Results collected so far on a valid frame. Results are passed to the
// processor block once all items in the RequestEntry struct are complete -
// i.e. all buffers arrived an all partial results arrived.
diff --git a/common/hal/google_camera_hal/rgbird_capture_session.cc b/common/hal/google_camera_hal/rgbird_capture_session.cc
index 272b2a8..e41872b 100644
--- a/common/hal/google_camera_hal/rgbird_capture_session.cc
+++ b/common/hal/google_camera_hal/rgbird_capture_session.cc
@@ -987,7 +987,8 @@ status_t RgbirdCaptureSession::Initialize(
// Create result dispatcher
result_dispatcher_ =
- ResultDispatcher::Create(kPartialResult, process_capture_result, notify);
+ ResultDispatcher::Create(kPartialResult, process_capture_result, notify,
+ stream_config, "RgbirdDispatcher");
if (result_dispatcher_ == nullptr) {
ALOGE("%s: Cannot create result dispatcher.", __FUNCTION__);
return UNKNOWN_ERROR;
diff --git a/common/hal/google_camera_hal/vendor_tags.cc b/common/hal/google_camera_hal/vendor_tags.cc
index 7cd6fd7..f1f0641 100644
--- a/common/hal/google_camera_hal/vendor_tags.cc
+++ b/common/hal/google_camera_hal/vendor_tags.cc
@@ -105,6 +105,9 @@ status_t ModifyCharacteristicsKeys(HalCameraMetadata* metadata) {
request_keys.push_back(VendorTagIds::kSensorModeFullFov);
result_keys.push_back(VendorTagIds::kSensorModeFullFov);
session_keys.push_back(VendorTagIds::kSensorModeFullFov);
+ // VendorTagIds::kVideo60to30FPSThermalThrottle
+ session_keys.push_back(VendorTagIds::kVideo60to30FPSThermalThrottle);
+ request_keys.push_back(VendorTagIds::kVideo60to30FPSThermalThrottle);
// Update the static metadata with the new set of keys
if (metadata->Set(ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS, request_keys.data(),
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 151ed69..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,9 +217,14 @@ 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 camera only", __FUNCTION__);
+ ALOGE("%s: support logical stream only", __FUNCTION__);
+ return false;
+ }
+ if (utils::IsSecuredStream(stream)) {
+ ALOGE("%s: don't support secured stream", __FUNCTION__);
return false;
}
if (utils::IsJPEGSnapshotStream(stream) ||
@@ -229,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__);
@@ -244,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__);
@@ -740,7 +753,7 @@ status_t ZslSnapshotCaptureSession::Initialize(
partial_result_count_ = partial_result_entry.data.i32[0];
}
result_dispatcher_ = ZslResultDispatcher::Create(
- partial_result_count_, process_capture_result, notify);
+ partial_result_count_, process_capture_result, notify, stream_config);
if (result_dispatcher_ == nullptr) {
ALOGE("%s: Cannot create result dispatcher.", __FUNCTION__);
return UNKNOWN_ERROR;
@@ -808,12 +821,17 @@ status_t ZslSnapshotCaptureSession::Initialize(
status_t ZslSnapshotCaptureSession::ProcessRequest(const CaptureRequest& request) {
ATRACE_CALL();
bool is_zsl_request = false;
+ bool is_preview_intent = false;
camera_metadata_ro_entry entry;
if (request.settings != nullptr) {
if (request.settings->Get(ANDROID_CONTROL_ENABLE_ZSL, &entry) == OK &&
*entry.data.u8 == ANDROID_CONTROL_ENABLE_ZSL_TRUE) {
is_zsl_request = true;
}
+ if (request.settings->Get(ANDROID_CONTROL_CAPTURE_INTENT, &entry) == OK &&
+ *entry.data.u8 == ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW) {
+ is_preview_intent = true;
+ }
}
status_t res = result_dispatcher_->AddPendingRequest(request, is_zsl_request);
if (res != OK) {
@@ -827,12 +845,18 @@ status_t ZslSnapshotCaptureSession::ProcessRequest(const CaptureRequest& request
ALOGW(
"%s: frame (%d) fall back to real time request for snapshot: %s (%d)",
__FUNCTION__, request.frame_number, strerror(-res), res);
+ if (realtime_zsl_result_request_processor_ != nullptr) {
+ realtime_zsl_result_request_processor_->UpdateOutputBufferCount(
+ request.frame_number, request.output_buffers.size(),
+ is_preview_intent);
+ }
res = realtime_request_processor_->ProcessRequest(request);
}
} else {
if (realtime_zsl_result_request_processor_ != nullptr) {
realtime_zsl_result_request_processor_->UpdateOutputBufferCount(
- request.frame_number, request.output_buffers.size());
+ request.frame_number, request.output_buffers.size(),
+ is_preview_intent);
}
res = realtime_request_processor_->ProcessRequest(request);
diff --git a/common/hal/tests/Android.bp b/common/hal/tests/Android.bp
index 0535c45..16c943d 100644
--- a/common/hal/tests/Android.bp
+++ b/common/hal/tests/Android.bp
@@ -27,7 +27,7 @@ cc_library_headers {
],
}
-cc_library_shared {
+cc_library {
name: "libgoogle_camera_hal_tests",
defaults: ["google_camera_hal_defaults"],
compile_multilib: "first",
@@ -91,9 +91,26 @@ cc_test {
"google_camera_hal_tests.cc",
],
shared_libs: [
- "libgoogle_camera_hal_tests",
+ "lib_profiler",
+ "libgooglecamerahal",
+ "libgooglecamerahalutils",
+ "android.hardware.camera.provider@2.4",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.mapper@3.0",
+ "android.hardware.graphics.mapper@4.0",
+ "libcamera_metadata",
+ "libcutils",
+ "libhardware",
+ "libhidlbase",
"liblog",
"libutils",
],
+ whole_static_libs: [
+ "libgoogle_camera_hal_tests",
+ ],
+ static_libs: [
+ "libgmock",
+ "libgtest",
+ ],
local_include_dirs: ["."],
}
diff --git a/common/hal/tests/AndroidTest.xml b/common/hal/tests/AndroidTest.xml
new file mode 100644
index 0000000..aed59e0
--- /dev/null
+++ b/common/hal/tests/AndroidTest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2022 Google LLC.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<configuration description="Config for Google Camera HAL test cases">
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="apct-native" />
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
+ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+ <option name="cleanup" value="true" />
+ <option name="push" value="google_camera_hal_tests->/data/local/tests/vendor/google_camera_hal_tests" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.GTest" >
+ <option name="native-test-device-path" value="/data/local/tests/vendor" />
+ <option name="ld-library-path" value="/apex/com.google.pixel.camera.hal/lib64:/system/lib64:/vendor/lib64" />
+ <option name="module-name" value="google_camera_hal_tests" />
+ <option name="runtime-hint" value="5m" />
+ <option name="native-test-timeout" value="50000" />
+ </test>
+</configuration>
diff --git a/common/hal/tests/result_dispatcher_tests.cc b/common/hal/tests/result_dispatcher_tests.cc
index 7196767..6296ab2 100644
--- a/common/hal/tests/result_dispatcher_tests.cc
+++ b/common/hal/tests/result_dispatcher_tests.cc
@@ -59,12 +59,14 @@ class ResultDispatcherTests : public ::testing::Test {
GTEST_SKIP();
}
+ StreamConfiguration stream_config;
result_dispatcher_ = ResultDispatcher::Create(
kPartialResult,
[this](std::unique_ptr<CaptureResult> result) {
ProcessCaptureResult(std::move(result));
},
- [this](const NotifyMessage& message) { Notify(message); });
+ [this](const NotifyMessage& message) { Notify(message); },
+ stream_config, "TestResultDispatcher");
ASSERT_NE(result_dispatcher_, nullptr)
<< "Creating ResultDispatcher failed";
diff --git a/common/hal/utils/Android.bp b/common/hal/utils/Android.bp
index 1b428ef..98fffef 100644
--- a/common/hal/utils/Android.bp
+++ b/common/hal/utils/Android.bp
@@ -36,6 +36,7 @@ cc_library_shared {
"internal_stream_manager.cc",
"multicam_realtime_process_block.cc",
"pipeline_request_id_manager.cc",
+ "realtime_process_block.cc",
"result_dispatcher.cc",
"stream_buffer_cache_manager.cc",
"utils.cc",
diff --git a/common/hal/google_camera_hal/realtime_process_block.cc b/common/hal/utils/realtime_process_block.cc
index 8cfa5be..d082886 100644
--- a/common/hal/google_camera_hal/realtime_process_block.cc
+++ b/common/hal/utils/realtime_process_block.cc
@@ -14,14 +14,15 @@
* limitations under the License.
*/
-//#define LOG_NDEBUG 0
+// #define LOG_NDEBUG 0
#define LOG_TAG "GCH_RealtimeProcessBlock"
#define ATRACE_TAG ATRACE_TAG_CAMERA
+#include "realtime_process_block.h"
+
#include <log/log.h>
#include <utils/Trace.h>
#include "hal_utils.h"
-#include "realtime_process_block.h"
#include "result_processor.h"
namespace android {
diff --git a/common/hal/google_camera_hal/realtime_process_block.h b/common/hal/utils/realtime_process_block.h
index b1fcf6c..b1fcf6c 100644
--- a/common/hal/google_camera_hal/realtime_process_block.h
+++ b/common/hal/utils/realtime_process_block.h
diff --git a/common/hal/utils/result_dispatcher.cc b/common/hal/utils/result_dispatcher.cc
index 0a4832c..b539bc2 100644
--- a/common/hal/utils/result_dispatcher.cc
+++ b/common/hal/utils/result_dispatcher.cc
@@ -17,12 +17,16 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "GCH_ResultDispatcher"
#define ATRACE_TAG ATRACE_TAG_CAMERA
+#include "result_dispatcher.h"
+
+#include <inttypes.h>
#include <log/log.h>
+#include <sys/resource.h>
#include <utils/Trace.h>
-#include <inttypes.h>
+#include <string>
+#include <string_view>
-#include "result_dispatcher.h"
#include "utils.h"
namespace android {
@@ -30,12 +34,15 @@ namespace google_camera_hal {
std::unique_ptr<ResultDispatcher> ResultDispatcher::Create(
uint32_t partial_result_count,
- ProcessCaptureResultFunc process_capture_result, NotifyFunc notify) {
+ ProcessCaptureResultFunc process_capture_result, NotifyFunc notify,
+ const StreamConfiguration& stream_config, std::string_view name) {
ATRACE_CALL();
- auto dispatcher = std::unique_ptr<ResultDispatcher>(new ResultDispatcher(
- partial_result_count, process_capture_result, notify));
+ auto dispatcher = std::unique_ptr<ResultDispatcher>(
+ new ResultDispatcher(partial_result_count, process_capture_result, notify,
+ stream_config, name));
if (dispatcher == nullptr) {
- ALOGE("%s: Creating ResultDispatcher failed.", __FUNCTION__);
+ ALOGE("[%s] %s: Creating ResultDispatcher failed.",
+ std::string(name).c_str(), __FUNCTION__);
return nullptr;
}
@@ -44,8 +51,10 @@ std::unique_ptr<ResultDispatcher> ResultDispatcher::Create(
ResultDispatcher::ResultDispatcher(
uint32_t partial_result_count,
- ProcessCaptureResultFunc process_capture_result, NotifyFunc notify)
+ ProcessCaptureResultFunc process_capture_result, NotifyFunc notify,
+ const StreamConfiguration& stream_config, std::string_view name)
: kPartialResultCount(partial_result_count),
+ name_(name),
process_capture_result_(process_capture_result),
notify_(notify) {
ATRACE_CALL();
@@ -56,11 +65,21 @@ ResultDispatcher::ResultDispatcher(
status_t res =
utils::SetRealtimeThread(notify_callback_thread_.native_handle());
if (res != OK) {
- ALOGE("%s: SetRealtimeThread fail", __FUNCTION__);
+ ALOGE("[%s] %s: SetRealtimeThread fail", name_.c_str(), __FUNCTION__);
} else {
- ALOGI("%s: SetRealtimeThread OK", __FUNCTION__);
+ ALOGI("[%s] %s: SetRealtimeThread OK", name_.c_str(), __FUNCTION__);
+ }
+ } else {
+ // Assign higher priority to reduce the preemption when CPU usage is high
+ int32_t res = setpriority(
+ PRIO_PROCESS,
+ pthread_gettid_np(notify_callback_thread_.native_handle()), -20);
+ if (res != 0) {
+ ALOGE("[%s] %s: Set thread priority fail with error: %s", name_.c_str(),
+ __FUNCTION__, strerror(errno));
}
}
+ InitializeGroupStreamIdsMap(stream_config);
}
ResultDispatcher::~ResultDispatcher() {
@@ -87,8 +106,8 @@ status_t ResultDispatcher::AddPendingRequest(
status_t res = AddPendingRequestLocked(pending_request);
if (res != OK) {
- ALOGE("%s: Adding a pending request failed: %s(%d).", __FUNCTION__,
- strerror(-res), res);
+ ALOGE("[%s] %s: Adding a pending request failed: %s(%d).", name_.c_str(),
+ __FUNCTION__, strerror(-res), res);
RemovePendingRequestLocked(pending_request.frame_number);
return res;
}
@@ -103,23 +122,23 @@ status_t ResultDispatcher::AddPendingRequestLocked(
status_t res = AddPendingShutterLocked(frame_number);
if (res != OK) {
- ALOGE("%s: Adding pending shutter for frame %u failed: %s(%d)",
- __FUNCTION__, frame_number, strerror(-res), res);
+ ALOGE("[%s] %s: Adding pending shutter for frame %u failed: %s(%d)",
+ name_.c_str(), __FUNCTION__, frame_number, strerror(-res), res);
return res;
}
res = AddPendingFinalResultMetadataLocked(frame_number);
if (res != OK) {
- ALOGE("%s: Adding pending result metadata for frame %u failed: %s(%d)",
- __FUNCTION__, frame_number, strerror(-res), res);
+ ALOGE("[%s] %s: Adding pending result metadata for frame %u failed: %s(%d)",
+ name_.c_str(), __FUNCTION__, frame_number, strerror(-res), res);
return res;
}
for (auto& buffer : pending_request.input_buffers) {
res = AddPendingBufferLocked(frame_number, buffer, /*is_input=*/true);
if (res != OK) {
- ALOGE("%s: Adding pending input buffer for frame %u failed: %s(%d)",
- __FUNCTION__, frame_number, strerror(-res), res);
+ ALOGE("[%s] %s: Adding pending input buffer for frame %u failed: %s(%d)",
+ name_.c_str(), __FUNCTION__, frame_number, strerror(-res), res);
return res;
}
}
@@ -127,8 +146,8 @@ status_t ResultDispatcher::AddPendingRequestLocked(
for (auto& buffer : pending_request.output_buffers) {
res = AddPendingBufferLocked(frame_number, buffer, /*is_input=*/false);
if (res != OK) {
- ALOGE("%s: Adding pending output buffer for frame %u failed: %s(%d)",
- __FUNCTION__, frame_number, strerror(-res), res);
+ ALOGE("[%s] %s: Adding pending output buffer for frame %u failed: %s(%d)",
+ name_.c_str(), __FUNCTION__, frame_number, strerror(-res), res);
return res;
}
}
@@ -139,8 +158,8 @@ status_t ResultDispatcher::AddPendingRequestLocked(
status_t ResultDispatcher::AddPendingShutterLocked(uint32_t frame_number) {
ATRACE_CALL();
if (pending_shutters_.find(frame_number) != pending_shutters_.end()) {
- ALOGE("%s: Pending shutter for frame %u already exists.", __FUNCTION__,
- frame_number);
+ ALOGE("[%s] %s: Pending shutter for frame %u already exists.",
+ name_.c_str(), __FUNCTION__, frame_number);
return ALREADY_EXISTS;
}
@@ -153,8 +172,8 @@ status_t ResultDispatcher::AddPendingFinalResultMetadataLocked(
ATRACE_CALL();
if (pending_final_metadata_.find(frame_number) !=
pending_final_metadata_.end()) {
- ALOGE("%s: Pending final result metadata for frame %u already exists.",
- __FUNCTION__, frame_number);
+ ALOGE("[%s] %s: Pending final result metadata for frame %u already exists.",
+ name_.c_str(), __FUNCTION__, frame_number);
return ALREADY_EXISTS;
}
@@ -166,21 +185,23 @@ status_t ResultDispatcher::AddPendingBufferLocked(uint32_t frame_number,
const StreamBuffer& buffer,
bool is_input) {
ATRACE_CALL();
- uint32_t stream_id = buffer.stream_id;
- if (stream_pending_buffers_map_.find(stream_id) ==
+ StreamKey stream_key = CreateStreamKey(buffer.stream_id);
+ if (stream_pending_buffers_map_.find(stream_key) ==
stream_pending_buffers_map_.end()) {
- stream_pending_buffers_map_[stream_id] = std::map<uint32_t, PendingBuffer>();
+ stream_pending_buffers_map_[stream_key] =
+ std::map<uint32_t, PendingBuffer>();
}
- if (stream_pending_buffers_map_[stream_id].find(frame_number) !=
- stream_pending_buffers_map_[stream_id].end()) {
- ALOGE("%s: Pending buffer of stream %u for frame %u already exists.",
- __FUNCTION__, stream_id, frame_number);
+ if (stream_pending_buffers_map_[stream_key].find(frame_number) !=
+ stream_pending_buffers_map_[stream_key].end()) {
+ ALOGE("[%s] %s: Pending buffer of stream %s for frame %u already exists.",
+ name_.c_str(), __FUNCTION__, DumpStreamKey(stream_key).c_str(),
+ frame_number);
return ALREADY_EXISTS;
}
PendingBuffer pending_buffer = {.is_input = is_input};
- stream_pending_buffers_map_[stream_id][frame_number] = pending_buffer;
+ stream_pending_buffers_map_[stream_key][frame_number] = pending_buffer;
return OK;
}
@@ -205,8 +226,8 @@ status_t ResultDispatcher::AddResult(std::unique_ptr<CaptureResult> result) {
std::move(result->physical_metadata),
result->partial_result);
if (res != OK) {
- ALOGE("%s: Adding result metadata failed: %s (%d)", __FUNCTION__,
- strerror(-res), res);
+ ALOGE("[%s] %s: Adding result metadata failed: %s (%d)", name_.c_str(),
+ __FUNCTION__, strerror(-res), res);
failed = true;
}
}
@@ -214,8 +235,8 @@ status_t ResultDispatcher::AddResult(std::unique_ptr<CaptureResult> result) {
for (auto& buffer : result->output_buffers) {
res = AddBuffer(frame_number, buffer);
if (res != OK) {
- ALOGE("%s: Adding an output buffer failed: %s (%d)", __FUNCTION__,
- strerror(-res), res);
+ ALOGE("[%s] %s: Adding an output buffer failed: %s (%d)", name_.c_str(),
+ __FUNCTION__, strerror(-res), res);
failed = true;
}
}
@@ -223,8 +244,8 @@ status_t ResultDispatcher::AddResult(std::unique_ptr<CaptureResult> result) {
for (auto& buffer : result->input_buffers) {
res = AddBuffer(frame_number, buffer);
if (res != OK) {
- ALOGE("%s: Adding an input buffer failed: %s (%d)", __FUNCTION__,
- strerror(-res), res);
+ ALOGE("[%s] %s: Adding an input buffer failed: %s (%d)", name_.c_str(),
+ __FUNCTION__, strerror(-res), res);
failed = true;
}
}
@@ -245,17 +266,16 @@ status_t ResultDispatcher::AddShutter(uint32_t frame_number,
auto shutter_it = pending_shutters_.find(frame_number);
if (shutter_it == pending_shutters_.end()) {
- ALOGE("%s: Cannot find the pending shutter for frame %u", __FUNCTION__,
- frame_number);
+ ALOGE("[%s] %s: Cannot find the pending shutter for frame %u",
+ name_.c_str(), __FUNCTION__, frame_number);
return NAME_NOT_FOUND;
}
if (shutter_it->second.ready) {
- ALOGE("%s: Already received shutter (%" PRId64
- ") for frame %u. New "
- "timestamp %" PRId64,
- __FUNCTION__, shutter_it->second.timestamp_ns, frame_number,
- timestamp_ns);
+ ALOGE("[%s] %s: Already received shutter (%" PRId64
+ ") for frame %u. New timestamp %" PRId64,
+ name_.c_str(), __FUNCTION__, shutter_it->second.timestamp_ns,
+ frame_number, timestamp_ns);
return ALREADY_EXISTS;
}
@@ -288,8 +308,8 @@ status_t ResultDispatcher::AddError(const ErrorMessage& error) {
}
NotifyMessage message = {.type = MessageType::kError, .message.error = error};
- ALOGV("%s: Notify error %u for frame %u stream %d", __FUNCTION__,
- error.error_code, frame_number, error.error_stream_id);
+ ALOGV("[%s] %s: Notify error %u for frame %u stream %d", name_.c_str(),
+ __FUNCTION__, error.error_code, frame_number, error.error_stream_id);
notify_(message);
return OK;
@@ -318,14 +338,14 @@ status_t ResultDispatcher::AddFinalResultMetadata(
auto metadata_it = pending_final_metadata_.find(frame_number);
if (metadata_it == pending_final_metadata_.end()) {
- ALOGE("%s: Cannot find the pending result metadata for frame %u",
- __FUNCTION__, frame_number);
+ ALOGE("[%s] %s: Cannot find the pending result metadata for frame %u",
+ name_.c_str(), __FUNCTION__, frame_number);
return NAME_NOT_FOUND;
}
if (metadata_it->second.ready) {
- ALOGE("%s: Already received final result metadata for frame %u.",
- __FUNCTION__, frame_number);
+ ALOGE("[%s] %s: Already received final result metadata for frame %u.",
+ name_.c_str(), __FUNCTION__, frame_number);
return ALREADY_EXISTS;
}
@@ -341,13 +361,15 @@ status_t ResultDispatcher::AddResultMetadata(
uint32_t partial_result) {
ATRACE_CALL();
if (metadata == nullptr) {
- ALOGE("%s: metadata is nullptr.", __FUNCTION__);
+ ALOGE("[%s] %s: metadata is nullptr.", name_.c_str(), __FUNCTION__);
return BAD_VALUE;
}
if (partial_result > kPartialResultCount) {
- ALOGE("%s: partial_result %u cannot be larger than partial result count %u",
- __FUNCTION__, partial_result, kPartialResultCount);
+ ALOGE(
+ "[%s] %s: partial_result %u cannot be larger than partial result count "
+ "%u",
+ name_.c_str(), __FUNCTION__, partial_result, kPartialResultCount);
return BAD_VALUE;
}
@@ -367,24 +389,26 @@ status_t ResultDispatcher::AddBuffer(uint32_t frame_number,
ATRACE_CALL();
std::lock_guard<std::mutex> lock(result_lock_);
- uint32_t stream_id = buffer.stream_id;
- auto pending_buffers_it = stream_pending_buffers_map_.find(stream_id);
+ StreamKey stream_key = CreateStreamKey(buffer.stream_id);
+ auto pending_buffers_it = stream_pending_buffers_map_.find(stream_key);
if (pending_buffers_it == stream_pending_buffers_map_.end()) {
- ALOGE("%s: Cannot find the pending buffer for stream %u", __FUNCTION__,
- stream_id);
+ ALOGE("[%s] %s: Cannot find the pending buffer for stream %s",
+ name_.c_str(), __FUNCTION__, DumpStreamKey(stream_key).c_str());
return NAME_NOT_FOUND;
}
auto pending_buffer_it = pending_buffers_it->second.find(frame_number);
if (pending_buffer_it == pending_buffers_it->second.end()) {
- ALOGE("%s: Cannot find the pending buffer for stream %u for frame %u",
- __FUNCTION__, stream_id, frame_number);
+ ALOGE("[%s] %s: Cannot find the pending buffer for stream %s for frame %u",
+ name_.c_str(), __FUNCTION__, DumpStreamKey(stream_key).c_str(),
+ frame_number);
return NAME_NOT_FOUND;
}
if (pending_buffer_it->second.ready) {
- ALOGE("%s: Already received a buffer for stream %u for frame %u",
- __FUNCTION__, stream_id, frame_number);
+ ALOGE("[%s] %s: Already received a buffer for stream %s for frame %u",
+ name_.c_str(), __FUNCTION__, DumpStreamKey(stream_key).c_str(),
+ frame_number);
return ALREADY_EXISTS;
}
@@ -395,8 +419,11 @@ status_t ResultDispatcher::AddBuffer(uint32_t frame_number,
}
void ResultDispatcher::NotifyCallbackThreadLoop() {
- // max thread name len = 16
- pthread_setname_np(pthread_self(), "ResDispatcher");
+ // '\0' counts toward the 16-character restriction.
+ constexpr int kPthreadNameLenMinusOne = 16 - 1;
+ pthread_setname_np(
+ pthread_self(),
+ name_.substr(/*pos=*/0, /*count=*/kPthreadNameLenMinusOne).c_str());
while (1) {
NotifyShutters();
@@ -405,7 +432,8 @@ void ResultDispatcher::NotifyCallbackThreadLoop() {
std::unique_lock<std::mutex> lock(notify_callback_lock_);
if (notify_callback_thread_exiting_) {
- ALOGV("%s: NotifyCallbackThreadLoop exits.", __FUNCTION__);
+ ALOGV("[%s] %s: NotifyCallbackThreadLoop exits.", name_.c_str(),
+ __FUNCTION__);
return;
}
if (!is_result_shutter_updated_) {
@@ -422,27 +450,59 @@ void ResultDispatcher::NotifyCallbackThreadLoop() {
void ResultDispatcher::PrintTimeoutMessages() {
std::lock_guard<std::mutex> lock(result_lock_);
for (auto& [frame_number, shutter] : pending_shutters_) {
- ALOGW("%s: pending shutter for frame %u ready %d", __FUNCTION__,
- frame_number, shutter.ready);
+ ALOGW("[%s] %s: pending shutter for frame %u ready %d", name_.c_str(),
+ __FUNCTION__, frame_number, shutter.ready);
}
for (auto& [frame_number, final_metadata] : pending_final_metadata_) {
- ALOGW("%s: pending final result metadaata for frame %u ready %d",
- __FUNCTION__, frame_number, final_metadata.ready);
+ ALOGW("[%s] %s: pending final result metadaata for frame %u ready %d",
+ name_.c_str(), __FUNCTION__, frame_number, final_metadata.ready);
}
- for (auto& [stream_id, pending_buffers] : stream_pending_buffers_map_) {
+ for (auto& [stream_key, pending_buffers] : stream_pending_buffers_map_) {
for (auto& [frame_number, pending_buffer] : pending_buffers) {
- ALOGW("%s: pending buffer of stream %d for frame %u ready %d",
- __FUNCTION__, stream_id, frame_number, pending_buffer.ready);
+ ALOGW("[%s] %s: pending buffer of stream %s for frame %u ready %d",
+ name_.c_str(), __FUNCTION__, DumpStreamKey(stream_key).c_str(),
+ frame_number, pending_buffer.ready);
}
}
}
+void ResultDispatcher::InitializeGroupStreamIdsMap(
+ const StreamConfiguration& stream_config) {
+ std::lock_guard<std::mutex> lock(result_lock_);
+ for (const auto& stream : stream_config.streams) {
+ if (stream.group_id != -1) {
+ group_stream_map_[stream.id] = stream.group_id;
+ }
+ }
+}
+
+ResultDispatcher::StreamKey ResultDispatcher::CreateStreamKey(
+ int32_t stream_id) const {
+ if (group_stream_map_.count(stream_id) == 0) {
+ return StreamKey(stream_id, StreamKeyType::kSingleStream);
+ } else {
+ return StreamKey(group_stream_map_.at(stream_id),
+ StreamKeyType::kGroupStream);
+ }
+}
+
+std::string ResultDispatcher::DumpStreamKey(const StreamKey& stream_key) const {
+ switch (stream_key.second) {
+ case StreamKeyType::kSingleStream:
+ return std::to_string(stream_key.first);
+ case StreamKeyType::kGroupStream:
+ return "group " + std::to_string(stream_key.first);
+ default:
+ return "Invalid stream key type";
+ }
+}
+
status_t ResultDispatcher::GetReadyShutterMessage(NotifyMessage* message) {
ATRACE_CALL();
if (message == nullptr) {
- ALOGE("%s: message is nullptr", __FUNCTION__);
+ ALOGE("[%s] %s: message is nullptr", name_.c_str(), __FUNCTION__);
return BAD_VALUE;
}
@@ -470,9 +530,9 @@ void ResultDispatcher::NotifyShutters() {
if (GetReadyShutterMessage(&message) != OK) {
break;
}
- ALOGV("%s: Notify shutter for frame %u timestamp %" PRIu64
+ ALOGV("[%s] %s: Notify shutter for frame %u timestamp %" PRIu64
" readout_timestamp %" PRIu64,
- __FUNCTION__, message.message.shutter.frame_number,
+ name_.c_str(), __FUNCTION__, message.message.shutter.frame_number,
message.message.shutter.timestamp_ns,
message.message.shutter.readout_timestamp_ns);
notify_(message);
@@ -484,8 +544,8 @@ status_t ResultDispatcher::GetReadyFinalMetadata(
std::vector<PhysicalCameraMetadata>* physical_metadata) {
ATRACE_CALL();
if (final_metadata == nullptr || frame_number == nullptr) {
- ALOGE("%s: final_metadata (%p) or frame_number (%p) is nullptr",
- __FUNCTION__, final_metadata, frame_number);
+ ALOGE("[%s] %s: final_metadata (%p) or frame_number (%p) is nullptr",
+ name_.c_str(), __FUNCTION__, final_metadata, frame_number);
return BAD_VALUE;
}
@@ -514,7 +574,8 @@ void ResultDispatcher::NotifyFinalResultMetadata() {
while (GetReadyFinalMetadata(&frame_number, &final_metadata,
&physical_metadata) == OK) {
- ALOGV("%s: Notify final metadata for frame %u", __FUNCTION__, frame_number);
+ ALOGV("[%s] %s: Notify final metadata for frame %u", name_.c_str(),
+ __FUNCTION__, frame_number);
NotifyResultMetadata(frame_number, std::move(final_metadata),
std::move(physical_metadata), kPartialResultCount);
}
@@ -525,7 +586,7 @@ status_t ResultDispatcher::GetReadyBufferResult(
ATRACE_CALL();
std::lock_guard<std::mutex> lock(result_lock_);
if (result == nullptr) {
- ALOGE("%s: result is nullptr.", __FUNCTION__);
+ ALOGE("[%s] %s: result is nullptr.", name_.c_str(), __FUNCTION__);
return BAD_VALUE;
}
@@ -563,7 +624,7 @@ void ResultDispatcher::NotifyBuffers() {
while (GetReadyBufferResult(&result) == OK) {
if (result == nullptr) {
- ALOGE("%s: result is nullptr", __FUNCTION__);
+ ALOGE("[%s] %s: result is nullptr", name_.c_str(), __FUNCTION__);
return;
}
std::lock_guard<std::mutex> lock(process_capture_result_lock_);
diff --git a/common/hal/utils/result_dispatcher.h b/common/hal/utils/result_dispatcher.h
index 19e7c9e..f677e30 100644
--- a/common/hal/utils/result_dispatcher.h
+++ b/common/hal/utils/result_dispatcher.h
@@ -18,6 +18,8 @@
#define HARDWARE_GOOGLE_CAMERA_HAL_UTILS_RESULT_DISPATCHER_H_
#include <map>
+#include <string>
+#include <string_view>
#include <thread>
#include "hal_types.h"
@@ -37,10 +39,13 @@ class ResultDispatcher {
// Create a ResultDispatcher.
// partial_result_count is the partial result count.
// process_capture_result is the function to notify capture results.
+ // stream_config is the session stream configuration
// notify is the function to notify shutter messages.
static std::unique_ptr<ResultDispatcher> Create(
uint32_t partial_result_count,
- ProcessCaptureResultFunc process_capture_result, NotifyFunc notify);
+ ProcessCaptureResultFunc process_capture_result, NotifyFunc notify,
+ const StreamConfiguration& stream_config,
+ std::string_view name = "ResultDispatcher");
virtual ~ResultDispatcher();
@@ -68,12 +73,29 @@ class ResultDispatcher {
ResultDispatcher(uint32_t partial_result_count,
ProcessCaptureResultFunc process_capture_result,
- NotifyFunc notify);
+ NotifyFunc notify, const StreamConfiguration& stream_config,
+ std::string_view name = "ResultDispatcher");
private:
static constexpr uint32_t kCallbackThreadTimeoutMs = 500;
const uint32_t kPartialResultCount;
+ // Define the stream key types. Single stream type is for normal streams.
+ // Group stream type is for the group streams of multi-resolution streams.
+ enum class StreamKeyType : uint32_t {
+ kSingleStream = 0,
+ kGroupStream,
+ };
+
+ // The key of the stream_pending_buffers_map_, which has different types.
+ // Type kSingleStream indicates the StreamKey represents a single stream, and
+ // the id will be the stream id.
+ // Type kGroupStream indicates the StreamKey represents a stream group, and
+ // the id will be the stream group id. All of the buffers of certain stream
+ // group will be tracked together, as there's only one buffer from the group
+ // streams should be returned each request.
+ typedef std::pair</*id=*/int32_t, StreamKeyType> StreamKey;
+
// Define a pending shutter that will be ready later when AddShutter() is
// called.
struct PendingShutter {
@@ -160,15 +182,32 @@ class ResultDispatcher {
void PrintTimeoutMessages();
+ // Initialize the group stream ids map if needed. Must be protected with result_lock_.
+ void InitializeGroupStreamIdsMap(const StreamConfiguration& stream_config);
+
+ // Name used for debugging purpose to disambiguate multiple ResultDispatchers.
+ std::string name_;
+
std::mutex result_lock_;
// Maps from frame numbers to pending shutters.
// Protected by result_lock_.
std::map<uint32_t, PendingShutter> pending_shutters_;
- // Maps from a stream ID to "a map from a frame number to a pending buffer."
- // Protected by result_lock_.
- std::map<uint32_t, std::map<uint32_t, PendingBuffer>> stream_pending_buffers_map_;
+ // Create a StreamKey for a stream
+ inline StreamKey CreateStreamKey(int32_t stream_id) const;
+
+ // Dump a StreamKey to a debug string
+ inline std::string DumpStreamKey(const StreamKey& stream_key) const;
+
+ // Maps from a stream or a stream group to "a map from a frame number to a
+ // pending buffer". Protected by result_lock_.
+ // For single streams, pending buffers would be tracked by streams.
+ // For multi-resolution streams, camera HAL can return only one stream buffer
+ // within the same stream group each request. So all of the buffers of certain
+ // stream group will be tracked together via a single map.
+ std::map<StreamKey, std::map<uint32_t, PendingBuffer>>
+ stream_pending_buffers_map_;
// Maps from a stream ID to pending result metadata.
// Protected by result_lock_.
@@ -191,6 +230,9 @@ class ResultDispatcher {
// State of callback thread is notified or not.
volatile bool is_result_shutter_updated_ = false;
+
+ // A map of group streams only, from stream ID to the group ID it belongs.
+ std::map</*stream id=*/int32_t, /*group id=*/int32_t> group_stream_map_;
};
} // namespace google_camera_hal
diff --git a/common/hal/utils/stream_buffer_cache_manager.cc b/common/hal/utils/stream_buffer_cache_manager.cc
index f0f9bea..2333a9d 100644
--- a/common/hal/utils/stream_buffer_cache_manager.cc
+++ b/common/hal/utils/stream_buffer_cache_manager.cc
@@ -223,7 +223,7 @@ status_t StreamBufferCacheManager::AddStreamBufferCacheLocked(
}
void StreamBufferCacheManager::WorkloadThreadLoop() {
- if (property_get_bool(kRaiseBufAllocationPriority, false)) {
+ if (property_get_bool(kRaiseBufAllocationPriority, true)) {
pid_t tid = gettid();
setpriority(PRIO_PROCESS, tid, -20);
}
diff --git a/common/hal/utils/utils.cc b/common/hal/utils/utils.cc
index 6e0ba2f..6bc5867 100644
--- a/common/hal/utils/utils.cc
+++ b/common/hal/utils/utils.cc
@@ -375,9 +375,34 @@ bool IsSessionParameterCompatible(const HalCameraMetadata* old_session,
int32_t old_max_fps = old_entry.data.i32[1];
int32_t new_min_fps = new_entry.data.i32[0];
int32_t new_max_fps = new_entry.data.i32[1];
- if (old_max_fps == new_max_fps) {
- ALOGI("%s: Ignore fps (%d, %d) to (%d, %d)", __FUNCTION__, old_min_fps,
- old_max_fps, new_min_fps, new_max_fps);
+ // Do not reconfigure session if max FPS hasn't changed or in
+ // the special case that AE FPS is throttling [60, 60] to [30, 30] or
+ // restored from [30, 30] to [60, 60] from GCA side when session parameter
+ // kVideo60to30FPSThermalThrottle is enabled.
+ uint8_t video_60_to_30fps_thermal_throttle = 0;
+ camera_metadata_ro_entry_t video_60_to_30fps_throttle_entry;
+ if (new_session->Get(kVideo60to30FPSThermalThrottle,
+ &video_60_to_30fps_throttle_entry) == OK) {
+ video_60_to_30fps_thermal_throttle =
+ video_60_to_30fps_throttle_entry.data.u8[0];
+ }
+
+ bool ignore_fps_range_diff = false;
+ if (video_60_to_30fps_thermal_throttle) {
+ if (((old_min_fps == 60) && (old_max_fps == 60) &&
+ (new_min_fps == 30) && (new_max_fps == 30)) ||
+ ((old_min_fps == 30) && (old_max_fps == 30) &&
+ (new_min_fps == 60) && (new_max_fps == 60))) {
+ ignore_fps_range_diff = true;
+ }
+ }
+
+ if (old_max_fps == new_max_fps || ignore_fps_range_diff) {
+ ALOGI(
+ "%s: Ignore fps (%d, %d) to (%d, %d). "
+ "video_60_to_30fps_thermal_throttle: %u",
+ __FUNCTION__, old_min_fps, old_max_fps, new_min_fps, new_max_fps,
+ video_60_to_30fps_thermal_throttle);
continue;
}
@@ -520,6 +545,22 @@ status_t GetStreamUseCases(const HalCameraMetadata* static_metadata,
return OK;
}
+bool IsSecuredStream(const Stream& stream) {
+ return (stream.usage & GRALLOC_USAGE_PROTECTED) != 0u;
+}
+
+bool IsStreamUseCasesVideoCall(const Stream& stream) {
+ return (stream.use_case ==
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL)
+ ? true
+ : 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 699be9d..16a60d2 100644
--- a/common/hal/utils/utils.h
+++ b/common/hal/utils/utils.h
@@ -38,6 +38,9 @@ bool IsYUVSnapshotStream(const Stream& stream);
bool IsDepthStream(const Stream& stream);
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);
diff --git a/common/hal/utils/zsl_result_dispatcher.cc b/common/hal/utils/zsl_result_dispatcher.cc
index e74d803..41e1b4c 100644
--- a/common/hal/utils/zsl_result_dispatcher.cc
+++ b/common/hal/utils/zsl_result_dispatcher.cc
@@ -30,7 +30,8 @@ namespace google_camera_hal {
std::unique_ptr<ZslResultDispatcher> ZslResultDispatcher::Create(
uint32_t partial_result_count,
- ProcessCaptureResultFunc process_capture_result, NotifyFunc notify) {
+ ProcessCaptureResultFunc process_capture_result, NotifyFunc notify,
+ const StreamConfiguration& stream_config) {
ATRACE_CALL();
auto dispatcher = std::unique_ptr<ZslResultDispatcher>(
new ZslResultDispatcher(process_capture_result, notify));
@@ -39,7 +40,7 @@ std::unique_ptr<ZslResultDispatcher> ZslResultDispatcher::Create(
return nullptr;
}
- status_t res = dispatcher->Initialize(partial_result_count);
+ status_t res = dispatcher->Initialize(partial_result_count, stream_config);
if (res != OK) {
ALOGE("%s: Initialize failed.", __FUNCTION__);
return nullptr;
@@ -54,7 +55,8 @@ ZslResultDispatcher::ZslResultDispatcher(
device_session_notify_(notify) {
}
-status_t ZslResultDispatcher::Initialize(uint32_t partial_result_count) {
+status_t ZslResultDispatcher::Initialize(
+ uint32_t partial_result_count, const StreamConfiguration& stream_config) {
ATRACE_CALL();
process_capture_result_ =
ProcessCaptureResultFunc([this](std::unique_ptr<CaptureResult> result) {
@@ -63,17 +65,17 @@ status_t ZslResultDispatcher::Initialize(uint32_t partial_result_count) {
notify_ = NotifyFunc(
[this](const NotifyMessage& message) { NotifyHalMessage(message); });
- normal_result_dispatcher_ =
- std::unique_ptr<ResultDispatcher>(new ResultDispatcher(
- partial_result_count, process_capture_result_, notify_));
+ normal_result_dispatcher_ = std::unique_ptr<ResultDispatcher>(
+ new ResultDispatcher(partial_result_count, process_capture_result_,
+ notify_, stream_config, "ZslNormalDispatcher"));
if (normal_result_dispatcher_ == nullptr) {
ALOGE("%s: Creating normal_result_dispatcher_ failed.", __FUNCTION__);
return BAD_VALUE;
}
- zsl_result_dispatcher_ =
- std::unique_ptr<ResultDispatcher>(new ResultDispatcher(
- partial_result_count, process_capture_result_, notify_));
+ zsl_result_dispatcher_ = std::unique_ptr<ResultDispatcher>(
+ new ResultDispatcher(partial_result_count, process_capture_result_,
+ notify_, stream_config, "ZslZslDispatcher"));
if (zsl_result_dispatcher_ == nullptr) {
ALOGE("%s: Creating zsl_result_dispatcher_ failed.", __FUNCTION__);
return BAD_VALUE;
diff --git a/common/hal/utils/zsl_result_dispatcher.h b/common/hal/utils/zsl_result_dispatcher.h
index 562ba38..f75e216 100644
--- a/common/hal/utils/zsl_result_dispatcher.h
+++ b/common/hal/utils/zsl_result_dispatcher.h
@@ -43,9 +43,11 @@ class ZslResultDispatcher {
// Treat ZSL requests and normal requests separately.
// For ZSL requests, it returns zsl shutter and zsl results in order
// and is not blocked by normal shutter and results.
+ // stream_config is the session stream configuration.
static std::unique_ptr<ZslResultDispatcher> Create(
uint32_t partial_result_count,
- ProcessCaptureResultFunc process_capture_result, NotifyFunc notify);
+ ProcessCaptureResultFunc process_capture_result, NotifyFunc notify,
+ const StreamConfiguration& stream_config);
virtual ~ZslResultDispatcher() = default;
@@ -78,7 +80,8 @@ class ZslResultDispatcher {
NotifyFunc notify);
private:
- status_t Initialize(uint32_t partial_result_count);
+ status_t Initialize(uint32_t partial_result_count,
+ const StreamConfiguration& stream_config);
// Invoked when receiving a result from ResultDispatcher class.
void ProcessCaptureResult(std::unique_ptr<CaptureResult> result);
diff --git a/common/sensor_listener/goog_sensor_motion.cc b/common/sensor_listener/goog_sensor_motion.cc
index f312ced..b12ea8e 100644
--- a/common/sensor_listener/goog_sensor_motion.cc
+++ b/common/sensor_listener/goog_sensor_motion.cc
@@ -147,6 +147,13 @@ void GoogSensorMotion::QuerySensorEventsBetweenTimestamps(
event_arrival_timestamps->clear();
std::lock_guard<std::mutex> l(event_buffer_lock_);
+
+ event_timestamps->reserve(event_buffer_.size());
+ motion_vector_x->reserve(event_buffer_.size());
+ motion_vector_y->reserve(event_buffer_.size());
+ motion_vector_z->reserve(event_buffer_.size());
+ event_arrival_timestamps->reserve(event_buffer_.size());
+
for (const auto& event : event_buffer_) {
int64_t event_time = event.sensor_event.timestamp;
if (event_time <= start_time || event_time > end_time) {
diff --git a/devices/EmulatedCamera/hwl/Base.h b/devices/EmulatedCamera/hwl/Base.h
index c6722a5..bb7fb81 100644
--- a/devices/EmulatedCamera/hwl/Base.h
+++ b/devices/EmulatedCamera/hwl/Base.h
@@ -53,6 +53,8 @@ struct SensorBuffer {
uint32_t camera_id;
PixelFormat format;
android_dataspace_t dataSpace;
+ int32_t color_space;
+ int32_t use_case;
StreamBuffer stream_buffer;
HwlPipelineCallback callback;
int acquire_fence_fd;
@@ -72,6 +74,9 @@ struct SensorBuffer {
camera_id(0),
format(PixelFormat::RGBA_8888),
dataSpace(HAL_DATASPACE_UNKNOWN),
+ color_space(
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED),
+ use_case(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT),
acquire_fence_fd(-1),
is_input(false),
is_failed_request(false),
diff --git a/devices/EmulatedCamera/hwl/EmulatedCameraDeviceSessionHWLImpl.cpp b/devices/EmulatedCamera/hwl/EmulatedCameraDeviceSessionHWLImpl.cpp
index fb46544..93cbe57 100644
--- a/devices/EmulatedCamera/hwl/EmulatedCameraDeviceSessionHWLImpl.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedCameraDeviceSessionHWLImpl.cpp
@@ -283,7 +283,8 @@ status_t EmulatedCameraDeviceSessionHwlImpl::ConfigurePipeline(
: EmulatedSensor::OverrideFormat(
stream.format, stream.dynamic_profile),
.producer_usage = is_input ? 0
- : GRALLOC_USAGE_HW_CAMERA_WRITE |
+ : GRALLOC_USAGE_SW_WRITE_OFTEN |
+ GRALLOC_USAGE_HW_CAMERA_WRITE |
GRALLOC_USAGE_HW_CAMERA_READ,
.consumer_usage = 0,
.max_buffers = max_pipeline_depth_,
@@ -302,7 +303,8 @@ status_t EmulatedCameraDeviceSessionHwlImpl::ConfigurePipeline(
.buffer_size = stream.buffer_size,
.is_input = is_input,
.group_id = stream.group_id,
- .use_case = stream.use_case}));
+ .use_case = stream.use_case,
+ .color_space = stream.color_space}));
if (stream.group_id != -1 && stream.is_physical_camera_stream) {
// TODO: For quad bayer camera, the logical camera id should be used if
diff --git a/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.cpp b/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.cpp
index 765e6a7..0195c95 100644
--- a/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.cpp
@@ -124,6 +124,7 @@ EmulatedLogicalRequestState::InitializeLogicalResult(uint32_t pipeline_id,
status_t EmulatedLogicalRequestState::InitializeLogicalSettings(
std::unique_ptr<HalCameraMetadata> request_settings,
std::unique_ptr<std::set<uint32_t>> physical_camera_output_ids,
+ uint32_t override_frame_number,
EmulatedSensor::LogicalCameraSettings* logical_settings /*out*/) {
if (logical_settings == nullptr) {
return BAD_VALUE;
@@ -148,7 +149,7 @@ status_t EmulatedLogicalRequestState::InitializeLogicalSettings(
EmulatedSensor::SensorSettings physical_sensor_settings;
auto ret = physical_request_state.second->InitializeSensorSettings(
HalCameraMetadata::Clone(request_settings.get()),
- &physical_sensor_settings);
+ override_frame_number, &physical_sensor_settings);
if (ret != OK) {
ALOGE(
"%s: Initialization of physical sensor settings for device id: %u "
@@ -170,7 +171,7 @@ status_t EmulatedLogicalRequestState::InitializeLogicalSettings(
EmulatedSensor::SensorSettings sensor_settings;
auto ret = logical_request_state_->InitializeSensorSettings(
- std::move(request_settings), &sensor_settings);
+ std::move(request_settings), override_frame_number, &sensor_settings);
logical_settings->emplace(logical_camera_id_, sensor_settings);
if (max_frame_duration < sensor_settings.exposure_time) {
max_frame_duration = sensor_settings.exposure_time;
diff --git a/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h b/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h
index adedc21..dcf1595 100644
--- a/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h
+++ b/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h
@@ -33,6 +33,7 @@ struct EmulatedStream : public HalStream {
bool is_input;
int32_t group_id;
int64_t use_case;
+ int32_t color_space;
};
struct EmulatedPipeline {
@@ -72,6 +73,7 @@ class EmulatedLogicalRequestState {
status_t InitializeLogicalSettings(
std::unique_ptr<HalCameraMetadata> request_settings,
std::unique_ptr<std::set<uint32_t>> physical_camera_output_ids,
+ uint32_t frame_number,
EmulatedSensor::LogicalCameraSettings* logical_settings /*out*/);
static std::unique_ptr<HalCameraMetadata> AdaptLogicalCharacteristics(
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp b/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp
index 05f3263..ef57437 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp
@@ -122,8 +122,26 @@ status_t EmulatedRequestProcessor::ProcessPipelineRequests(
pipelines[request.pipeline_id].cb, request.input_width,
request.input_height);
+ // Check if there are any settings that need to be overridden.
+ camera_metadata_ro_entry_t entry;
+ if (request.settings.get() != nullptr) {
+ auto ret = request.settings.get()->Get(ANDROID_CONTROL_SETTINGS_OVERRIDE,
+ &entry);
+ if ((ret == OK) && (entry.count == 1)) {
+ std::unique_ptr<HalCameraMetadata> override_setting =
+ HalCameraMetadata::Clone(request.settings.get());
+ override_settings_.push({.settings = std::move(override_setting),
+ .frame_number = frame_number});
+ }
+ } else {
+ override_settings_.push(
+ {.settings = nullptr, .frame_number = frame_number});
+ }
pending_requests_.push(
- {.settings = HalCameraMetadata::Clone(request.settings.get()),
+ {.frame_number = frame_number,
+ .pipeline_id = request.pipeline_id,
+ .callback = pipelines[request.pipeline_id].cb,
+ .settings = HalCameraMetadata::Clone(request.settings.get()),
.input_buffers = std::move(input_buffers),
.output_buffers = std::move(output_buffers)});
}
@@ -174,7 +192,7 @@ std::unique_ptr<Buffers> EmulatedRequestProcessor::CreateSensorBuffers(
if (session_callback_.return_stream_buffers != nullptr) {
session_callback_.return_stream_buffers(requested_buffers);
}
- return nullptr;
+ requested_buffers.clear();
}
auto sensor_buffers = std::make_unique<Buffers>();
@@ -192,21 +210,20 @@ std::unique_ptr<Buffers> EmulatedRequestProcessor::CreateSensorBuffers(
}
void EmulatedRequestProcessor::NotifyFailedRequest(const PendingRequest& request) {
- if (request.output_buffers->at(0)->callback.notify != nullptr) {
+ if (request.output_buffers != nullptr) {
// Mark all output buffers for this request in order not to send
// ERROR_BUFFER for them.
for (auto& output_buffer : *(request.output_buffers)) {
output_buffer->is_failed_request = true;
}
-
- auto output_buffer = std::move(request.output_buffers->at(0));
- NotifyMessage msg = {
- .type = MessageType::kError,
- .message.error = {.frame_number = output_buffer->frame_number,
- .error_stream_id = -1,
- .error_code = ErrorCode::kErrorRequest}};
- output_buffer->callback.notify(output_buffer->pipeline_id, msg);
}
+
+ NotifyMessage msg = {
+ .type = MessageType::kError,
+ .message.error = {.frame_number = request.frame_number,
+ .error_stream_id = -1,
+ .error_code = ErrorCode::kErrorRequest}};
+ request.callback.notify(request.pipeline_id, msg);
}
status_t EmulatedRequestProcessor::Flush() {
@@ -276,7 +293,7 @@ status_t EmulatedRequestProcessor::LockSensorBuffer(
return BAD_VALUE;
}
- auto usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN;
+ auto usage = GRALLOC_USAGE_SW_WRITE_OFTEN;
bool isYUV_420_888 = stream.override_format == HAL_PIXEL_FORMAT_YCBCR_420_888;
bool isP010 = static_cast<android_pixel_format_v1_1_t>(
stream.override_format) == HAL_PIXEL_FORMAT_YCBCR_P010;
@@ -359,6 +376,8 @@ std::unique_ptr<SensorBuffer> EmulatedRequestProcessor::CreateSensorBuffer(
}
buffer->format = static_cast<PixelFormat>(stream.override_format);
buffer->dataSpace = stream.override_data_space;
+ buffer->color_space = stream.color_space;
+ buffer->use_case = stream.use_case;
buffer->stream_buffer = stream_buffer;
buffer->pipeline_id = pipeline_id;
buffer->callback = callback;
@@ -374,7 +393,7 @@ std::unique_ptr<SensorBuffer> EmulatedRequestProcessor::CreateSensorBuffer(
auto ret = LockSensorBuffer(stream, buffer->stream_buffer.buffer,
buffer->width, buffer->height, buffer.get());
if (ret != OK) {
- buffer.release();
+ buffer->is_failed_request = true;
buffer = nullptr;
}
}
@@ -384,7 +403,7 @@ std::unique_ptr<SensorBuffer> EmulatedRequestProcessor::CreateSensorBuffer(
buffer->acquire_fence_fd);
if (!fence_status) {
ALOGE("%s: Failed importing acquire fence!", __FUNCTION__);
- buffer.release();
+ buffer->is_failed_request = true;
buffer = nullptr;
}
}
@@ -432,13 +451,13 @@ void EmulatedRequestProcessor::RequestProcessorLoop() {
if (!pending_requests_.empty()) {
status_t ret;
const auto& request = pending_requests_.front();
- auto frame_number = request.output_buffers->at(0)->frame_number;
- auto notify_callback = request.output_buffers->at(0)->callback;
- auto pipeline_id = request.output_buffers->at(0)->pipeline_id;
+ auto frame_number = request.frame_number;
+ auto notify_callback = request.callback;
+ auto pipeline_id = request.pipeline_id;
auto output_buffers = AcquireBuffers(request.output_buffers.get());
auto input_buffers = AcquireBuffers(request.input_buffers.get());
- if (!output_buffers->empty()) {
+ if ((output_buffers != nullptr) && !output_buffers->empty()) {
std::unique_ptr<EmulatedSensor::LogicalCameraSettings> logical_settings =
std::make_unique<EmulatedSensor::LogicalCameraSettings>();
@@ -456,14 +475,20 @@ void EmulatedRequestProcessor::RequestProcessorLoop() {
// last valid values.
// TODO: Add support for individual physical camera requests.
if (request.settings.get() != nullptr) {
+ auto override_frame_number =
+ ApplyOverrideSettings(frame_number, request.settings);
ret = request_state_->InitializeLogicalSettings(
HalCameraMetadata::Clone(request.settings.get()),
- std::move(physical_camera_output_ids), logical_settings.get());
+ std::move(physical_camera_output_ids), override_frame_number,
+ logical_settings.get());
last_settings_ = HalCameraMetadata::Clone(request.settings.get());
} else {
+ auto override_frame_number =
+ ApplyOverrideSettings(frame_number, last_settings_);
ret = request_state_->InitializeLogicalSettings(
HalCameraMetadata::Clone(last_settings_.get()),
- std::move(physical_camera_output_ids), logical_settings.get());
+ std::move(physical_camera_output_ids), override_frame_number,
+ logical_settings.get());
}
if (ret == OK) {
@@ -532,6 +557,75 @@ status_t EmulatedRequestProcessor::GetDefaultRequest(
return request_state_->GetDefaultRequest(type, default_settings);
}
+uint32_t EmulatedRequestProcessor::ApplyOverrideSettings(
+ uint32_t frame_number,
+ const std::unique_ptr<HalCameraMetadata>& request_settings) {
+ while (!override_settings_.empty() && request_settings.get() != nullptr) {
+ auto override_frame_number = override_settings_.front().frame_number;
+ bool repeatingOverride = (override_settings_.front().settings == nullptr);
+ const auto& override_setting = repeatingOverride
+ ? last_override_settings_
+ : override_settings_.front().settings;
+
+ camera_metadata_ro_entry_t entry;
+ status_t ret =
+ override_setting->Get(ANDROID_CONTROL_SETTINGS_OVERRIDE, &entry);
+ bool overriding = false;
+ if ((ret == OK) && (entry.count == 1) &&
+ (entry.data.i32[0] == ANDROID_CONTROL_SETTINGS_OVERRIDE_ZOOM)) {
+ ApplyOverrideZoom(override_setting, request_settings,
+ ANDROID_CONTROL_SETTINGS_OVERRIDE);
+ ApplyOverrideZoom(override_setting, request_settings,
+ ANDROID_CONTROL_ZOOM_RATIO);
+ ApplyOverrideZoom(override_setting, request_settings,
+ ANDROID_SCALER_CROP_REGION);
+ ApplyOverrideZoom(override_setting, request_settings,
+ ANDROID_CONTROL_AE_REGIONS);
+ ApplyOverrideZoom(override_setting, request_settings,
+ ANDROID_CONTROL_AWB_REGIONS);
+ ApplyOverrideZoom(override_setting, request_settings,
+ ANDROID_CONTROL_AF_REGIONS);
+ overriding = true;
+ }
+ if (!repeatingOverride) {
+ last_override_settings_ = HalCameraMetadata::Clone(override_setting.get());
+ }
+
+ override_settings_.pop();
+ // If there are multiple queued override settings, skip until the speed-up
+ // is at least 2 frames.
+ if (override_frame_number - frame_number >= kZoomSpeedup) {
+ // If the request's settings override isn't ON, do not return
+ // override_frame_number. Return 0 to indicate there is no
+ // override happening.
+ return overriding ? override_frame_number : 0;
+ }
+ }
+ return 0;
+}
+
+void EmulatedRequestProcessor::ApplyOverrideZoom(
+ const std::unique_ptr<HalCameraMetadata>& override_setting,
+ const std::unique_ptr<HalCameraMetadata>& request_settings,
+ camera_metadata_tag tag) {
+ status_t ret;
+ camera_metadata_ro_entry_t entry;
+ ret = override_setting->Get(tag, &entry);
+ if (ret == OK) {
+ if (entry.type == TYPE_INT32) {
+ request_settings->Set(tag, entry.data.i32, entry.count);
+ } else if (entry.type == TYPE_FLOAT) {
+ request_settings->Set(tag, entry.data.f, entry.count);
+ } else {
+ ALOGE("%s: Unsupported override key %d", __FUNCTION__, tag);
+ }
+ } else {
+ auto missing_tag = get_camera_metadata_tag_name(tag);
+ ALOGE("%s: %s needs to be specified for overriding zoom", __func__,
+ missing_tag);
+ }
+}
+
Return<void> EmulatedRequestProcessor::SensorHandler::onEvent(const Event& e) {
auto processor = processor_.lock();
if (processor.get() == nullptr) {
@@ -548,6 +642,11 @@ Return<void> EmulatedRequestProcessor::SensorHandler::onEvent(const Event& e) {
const uint32_t earth_accel = 9; // Switch threshold [m/s^2]
uint32_t x_accel = e.u.vec3.x;
uint32_t y_accel = e.u.vec3.y;
+ uint32_t z_accel = abs(e.u.vec3.z);
+ if (z_accel == earth_accel) {
+ return Void();
+ }
+
if (x_accel == earth_accel) {
processor->screen_rotation_ = 270;
} else if (x_accel == -earth_accel) {
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.h b/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.h
index f931e35..0907fdb 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.h
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.h
@@ -45,11 +45,19 @@ using google_camera_hal::RequestTemplate;
using google_camera_hal::StreamBuffer;
struct PendingRequest {
+ uint32_t frame_number;
+ uint32_t pipeline_id;
+ HwlPipelineCallback callback;
std::unique_ptr<HalCameraMetadata> settings;
std::unique_ptr<Buffers> input_buffers;
std::unique_ptr<Buffers> output_buffers;
};
+struct OverrideRequest {
+ uint32_t frame_number;
+ std::unique_ptr<HalCameraMetadata> settings;
+};
+
class EmulatedRequestProcessor {
public:
EmulatedRequestProcessor(uint32_t camera_id, sp<EmulatedSensor> sensor,
@@ -99,6 +107,9 @@ class EmulatedRequestProcessor {
std::thread request_thread_;
std::atomic_bool processor_done_ = false;
+ // Speed up zoom by 2 frames using settings override
+ const static uint32_t kZoomSpeedup = 2;
+
// helper methods
static uint32_t inline AlignTo(uint32_t value, uint32_t alignment) {
uint32_t delta = value % alignment;
@@ -123,16 +134,25 @@ class EmulatedRequestProcessor {
int32_t override_width, int32_t override_height);
std::unique_ptr<Buffers> AcquireBuffers(Buffers* buffers);
void NotifyFailedRequest(const PendingRequest& request);
+ uint32_t ApplyOverrideSettings(
+ uint32_t frame_number,
+ const std::unique_ptr<HalCameraMetadata>& request_settings);
+ void ApplyOverrideZoom(
+ const std::unique_ptr<HalCameraMetadata>& override_setting,
+ const std::unique_ptr<HalCameraMetadata>& request_settings,
+ camera_metadata_tag tag);
std::mutex process_mutex_;
std::condition_variable request_condition_;
std::queue<PendingRequest> pending_requests_;
+ std::queue<OverrideRequest> override_settings_;
uint32_t camera_id_;
sp<EmulatedSensor> sensor_;
HwlSessionCallback session_callback_;
std::unique_ptr<EmulatedLogicalRequestState>
request_state_; // Stores and handles 3A and related camera states.
std::unique_ptr<HalCameraMetadata> last_settings_;
+ std::unique_ptr<HalCameraMetadata> last_override_settings_;
std::shared_ptr<HandleImporter> importer_;
EmulatedRequestProcessor(const EmulatedRequestProcessor&) = delete;
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp b/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp
index f5f1f2b..b79f8fa 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp
@@ -43,7 +43,8 @@ const std::set<uint8_t> EmulatedRequestState::kSupportedCapabilites = {
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE};
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES};
const std::set<uint8_t> EmulatedRequestState::kSupportedHWLevels = {
ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
@@ -615,6 +616,7 @@ status_t EmulatedRequestState::ProcessAE() {
status_t EmulatedRequestState::InitializeSensorSettings(
std::unique_ptr<HalCameraMetadata> request_settings,
+ uint32_t override_frame_number,
EmulatedSensor::SensorSettings* sensor_settings /*out*/) {
if ((sensor_settings == nullptr) || (request_settings.get() == nullptr)) {
return BAD_VALUE;
@@ -686,6 +688,17 @@ status_t EmulatedRequestState::InitializeSensorSettings(
zoom_ratio_ = std::min(std::max(entry.data.f[0], min_zoom), max_zoom);
}
+ // Check settings override
+ ret = request_settings_->Get(ANDROID_CONTROL_SETTINGS_OVERRIDE, &entry);
+ if ((ret == OK) && (entry.count == 1)) {
+ settings_override_ = entry.data.i32[0];
+ }
+
+ // Store settings override frame number
+ if (override_frame_number != 0) {
+ settings_overriding_frame_number_ = override_frame_number;
+ }
+
// Check rotate_and_crop setting
ret = request_settings_->Get(ANDROID_SCALER_ROTATE_AND_CROP, &entry);
if ((ret == OK) && (entry.count == 1)) {
@@ -711,6 +724,17 @@ status_t EmulatedRequestState::InitializeSensorSettings(
}
}
+ // Check autoframing
+ ret = request_settings_->Get(ANDROID_CONTROL_AUTOFRAMING, &entry);
+ if ((ret == OK) && (entry.count == 1)) {
+ autoframing_ = entry.data.i32[0];
+ if (autoframing_ == ANDROID_CONTROL_AUTOFRAMING_ON) {
+ // Set zoom_ratio to be a hard-coded value to test autoframing.
+ zoom_ratio_ = 1.7f;
+ vstab_mode = ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF;
+ }
+ }
+
// Check video stabilization parameter
uint8_t edge_mode = ANDROID_EDGE_MODE_OFF;
ret = request_settings_->Get(ANDROID_EDGE_MODE, &entry);
@@ -869,6 +893,26 @@ std::unique_ptr<HwlPipelineResult> EmulatedRequestState::InitializeResult(
result->result_metadata->Set(ANDROID_CONTROL_AWB_STATE, &awb_state_, 1);
result->result_metadata->Set(ANDROID_CONTROL_AE_MODE, &ae_mode_, 1);
result->result_metadata->Set(ANDROID_CONTROL_AE_STATE, &ae_state_, 1);
+ // If the overriding frame number isn't larger than current frame number,
+ // use 0.
+ int32_t settings_override = settings_override_;
+ uint32_t overriding_frame_number = settings_overriding_frame_number_;
+ if (overriding_frame_number <= frame_number) {
+ overriding_frame_number = frame_number;
+ settings_override = ANDROID_CONTROL_SETTINGS_OVERRIDE_OFF;
+ }
+ result->result_metadata->Set(ANDROID_CONTROL_SETTINGS_OVERRIDE,
+ &settings_override, 1);
+ result->result_metadata->Set(ANDROID_CONTROL_SETTINGS_OVERRIDING_FRAME_NUMBER,
+ (int32_t*)&overriding_frame_number, 1);
+ result->result_metadata->Set(ANDROID_CONTROL_AUTOFRAMING, &autoframing_, 1);
+ uint8_t autoframing_state = ANDROID_CONTROL_AUTOFRAMING_STATE_INACTIVE;
+ if (autoframing_ == ANDROID_CONTROL_AUTOFRAMING_ON) {
+ autoframing_state = ANDROID_CONTROL_AUTOFRAMING_STATE_CONVERGED;
+ }
+ result->result_metadata->Set(ANDROID_CONTROL_AUTOFRAMING_STATE,
+ &autoframing_state, 1);
+
int32_t fps_range[] = {ae_target_fps_.min_fps, ae_target_fps_.max_fps};
result->result_metadata->Set(ANDROID_CONTROL_AE_TARGET_FPS_RANGE, fps_range,
ARRAY_SIZE(fps_range));
@@ -936,12 +980,9 @@ std::unique_ptr<HwlPipelineResult> EmulatedRequestState::InitializeResult(
1);
}
if (report_focus_range_) {
- float focus_range[2] = {0.f};
- if (minimum_focus_distance_ > .0f) {
- focus_range[0] = 1 / minimum_focus_distance_;
- }
- result->result_metadata->Set(ANDROID_LENS_FOCUS_RANGE, focus_range,
- ARRAY_SIZE(focus_range));
+ float focus_range[2] = {};
+ focus_range[0] = focus_distance_;
+ result->result_metadata->Set(ANDROID_LENS_FOCUS_RANGE, focus_range, ARRAY_SIZE(focus_range));
}
if (report_filter_density_) {
result->result_metadata->Set(ANDROID_LENS_FILTER_DENSITY, &filter_density_,
@@ -2084,6 +2125,10 @@ status_t EmulatedRequestState::InitializeControlDefaults() {
default_requests_[idx]->Set(ANDROID_CONTROL_AF_TRIGGER, &af_trigger, 1);
}
}
+
+ int32_t settings_override = ANDROID_CONTROL_SETTINGS_OVERRIDE_OFF;
+ default_requests_[idx]->Set(ANDROID_CONTROL_SETTINGS_OVERRIDE,
+ &settings_override, 1);
}
return InitializeHotPixelDefaults();
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestState.h b/devices/EmulatedCamera/hwl/EmulatedRequestState.h
index 8bf5408..3af793e 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestState.h
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestState.h
@@ -51,6 +51,7 @@ class EmulatedRequestState {
status_t InitializeSensorSettings(
std::unique_ptr<HalCameraMetadata> request_settings,
+ uint32_t override_frame_number,
EmulatedSensor::SensorSettings* sensor_settings /*out*/);
private:
@@ -206,6 +207,7 @@ class EmulatedRequestState {
uint8_t af_state_ = ANDROID_CONTROL_AF_STATE_INACTIVE;
uint8_t af_trigger_ = ANDROID_CONTROL_AF_TRIGGER_IDLE;
uint8_t ae_trigger_ = ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE;
+ uint8_t autoframing_ = ANDROID_CONTROL_AUTOFRAMING_OFF;
FPSRange ae_target_fps_ = {0, 0};
float zoom_ratio_ = 1.0f;
uint8_t extended_scene_mode_ = ANDROID_CONTROL_EXTENDED_SCENE_MODE_DISABLED;
@@ -237,6 +239,8 @@ class EmulatedRequestState {
bool af_supported_ = false;
bool picture_caf_supported_ = false;
bool video_caf_supported_ = false;
+ int32_t settings_override_ = ANDROID_CONTROL_SETTINGS_OVERRIDE_OFF;
+ uint32_t settings_overriding_frame_number_ = 0;
// android.flash.*
bool is_flash_supported_ = false;
diff --git a/devices/EmulatedCamera/hwl/EmulatedSensor.cpp b/devices/EmulatedCamera/hwl/EmulatedSensor.cpp
index 7d93ded..29953e6 100644
--- a/devices/EmulatedCamera/hwl/EmulatedSensor.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedSensor.cpp
@@ -51,6 +51,26 @@ using google_camera_hal::NotifyMessage;
using android::hardware::graphics::common::V1_2::Dataspace;
+// Copied from ColorSpace.java (see Named)
+enum ColorSpaceNamed {
+ SRGB,
+ LINEAR_SRGB,
+ EXTENDED_SRGB,
+ LINEAR_EXTENDED_SRGB,
+ BT709,
+ BT2020,
+ DCI_P3,
+ DISPLAY_P3,
+ NTSC_1953,
+ SMPTE_C,
+ ADOBE_RGB,
+ PRO_PHOTO_RGB,
+ ACES,
+ ACESCG,
+ CIE_XYZ,
+ CIE_LAB
+};
+
const uint32_t EmulatedSensor::kRegularSceneHandshake = 1; // Scene handshake divider
const uint32_t EmulatedSensor::kReducedSceneHandshake = 2; // Scene handshake divider
@@ -123,6 +143,38 @@ const float EmulatedSensor::kDefaultToneMapCurveRed[4] = {.0f, .0f, 1.f, 1.f};
const float EmulatedSensor::kDefaultToneMapCurveGreen[4] = {.0f, .0f, 1.f, 1.f};
const float EmulatedSensor::kDefaultToneMapCurveBlue[4] = {.0f, .0f, 1.f, 1.f};
+// All XY matrix coefficients sourced from
+// https://developer.android.com/reference/kotlin/android/graphics/ColorSpace.Named
+// and XYZ coefficients calculated using the method found in
+// ColorSpace.Rgb.computeXyzMatrix
+struct XyzMatrix {
+ float xR = 3.2406f;
+ float yR = -1.5372f;
+ float zR = -0.4986f;
+ float xG = -0.9689f;
+ float yG = 1.8758f;
+ float zG = 0.0415f;
+ float xB = 0.0557f;
+ float yB = -0.2040f;
+ float zB = 1.0570f;
+};
+
+static const XyzMatrix kSrgbXyzMatrix = {3.2406f, -1.5372f, -0.4986f,
+ -0.9689f, 1.8758f, 0.0415f,
+ 0.0557f, -0.2040f, 1.0570f};
+
+static const XyzMatrix kDisplayP3Matrix = {2.4931f, -0.9316f, -0.4023f,
+ -0.8291f, 1.7627f, 0.0234f,
+ 0.0361f, -0.0761f, 0.9570f};
+
+static const XyzMatrix kBt709Matrix = {3.2410f, -1.5374f, -0.4986f,
+ -0.9692f, 1.8760f, 0.0416f,
+ 0.0556f, -0.2040f, 1.0570f};
+
+static const XyzMatrix kBt2020Matrix = {1.7167f, -0.3556f, -0.2534f,
+ -0.6666f, 1.6164f, 0.0158f,
+ 0.0177f, -0.0428f, 0.9421f};
+
/** A few utility functions for math, normal distributions */
// Take advantage of IEEE floating-point format to calculate an approximate
@@ -141,9 +193,13 @@ float sqrtf_approx(float r) {
}
EmulatedSensor::EmulatedSensor() : Thread(false), got_vsync_(false) {
- gamma_table_.resize(kSaturationPoint + 1);
+ gamma_table_sRGB_.resize(kSaturationPoint + 1);
+ gamma_table_smpte170m_.resize(kSaturationPoint + 1);
+ gamma_table_hlg_.resize(kSaturationPoint + 1);
for (int32_t i = 0; i <= kSaturationPoint; i++) {
- gamma_table_[i] = ApplysRGBGamma(i, kSaturationPoint);
+ gamma_table_sRGB_[i] = ApplysRGBGamma(i, kSaturationPoint);
+ gamma_table_smpte170m_[i] = ApplySMPTE170MGamma(i, kSaturationPoint);
+ gamma_table_hlg_[i] = ApplyHLGGamma(i, kSaturationPoint);
}
}
@@ -283,10 +339,10 @@ static void SplitStreamCombination(
input_stream_config->streams.push_back(stream);
continue;
}
- if (stream.used_in_default_resolution_mode) {
+ if (stream.intended_for_default_resolution_mode) {
default_mode_config->streams.push_back(stream);
}
- if (stream.used_in_max_resolution_mode) {
+ if (stream.intended_for_max_resolution_mode) {
max_resolution_mode_config->streams.push_back(stream);
}
}
@@ -492,7 +548,7 @@ bool EmulatedSensor::IsStreamCombinationSupported(
return false;
}
} else if (stream.use_case >
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL) {
+ sensor_chars.at(logical_id).end_valid_stream_use_case) {
ALOGE("%s: Stream with use case %d is not supported!", __FUNCTION__,
stream.use_case);
return false;
@@ -506,8 +562,21 @@ bool EmulatedSensor::IsStreamCombinationSupported(
__FUNCTION__, stream.use_case, stream.format);
return false;
}
+ } else if ((stream.format == HAL_PIXEL_FORMAT_RAW16) ^
+ (stream.use_case ==
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW)) {
+ // Either both stream use case == CROPPED_RAW and format == RAW16, or
+ // stream use case != CROPPED_RAW and format != RAW16 for the
+ // combination to be valid.
+ ALOGE(
+ "%s: Stream with use case CROPPED_RAW isn't compatible with non "
+ "RAW_SENSOR formats",
+ __FUNCTION__);
+ return false;
+
} else if (stream.format != HAL_PIXEL_FORMAT_YCBCR_420_888 &&
- stream.format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
+ stream.format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED &&
+ stream.format != HAL_PIXEL_FORMAT_RAW16) {
ALOGE("%s: Stream with use case %d isn't compatible with format %d",
__FUNCTION__, stream.use_case, stream.format);
return false;
@@ -832,6 +901,13 @@ bool EmulatedSensor::threadLoop() {
switch ((*b)->format) {
case PixelFormat::RAW16:
sensor_binning_factor_info_[(*b)->camera_id].has_raw_stream = true;
+ if (!sensor_binning_factor_info_[(*b)->camera_id]
+ .has_cropped_raw_stream &&
+ (*b)->use_case ==
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW) {
+ sensor_binning_factor_info_[(*b)->camera_id].has_cropped_raw_stream =
+ true;
+ }
break;
default:
sensor_binning_factor_info_[(*b)->camera_id].has_non_raw_stream = true;
@@ -844,6 +920,11 @@ bool EmulatedSensor::threadLoop() {
? false
: reprocess_request;
+ if ((*b)->color_space !=
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED) {
+ CalculateRgbRgbMatrix((*b)->color_space, device_chars->second);
+ }
+
switch ((*b)->format) {
case PixelFormat::RAW16:
if (!reprocess_request) {
@@ -878,9 +959,20 @@ bool EmulatedSensor::threadLoop() {
break;
}
if (default_mode_for_qb) {
- CaptureRawBinned(
- (*b)->plane.img.img, (*b)->plane.img.stride_in_bytes,
- device_settings->second.gain, device_chars->second);
+ if (device_settings->second.zoom_ratio > 2.0f &&
+ ((*b)->use_case ==
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW)) {
+ sensor_binning_factor_info_[(*b)->camera_id]
+ .raw_in_sensor_zoom_applied = true;
+ CaptureRawInSensorZoom(
+ (*b)->plane.img.img, (*b)->plane.img.stride_in_bytes,
+ device_settings->second.gain, device_chars->second);
+
+ } else {
+ CaptureRawBinned(
+ (*b)->plane.img.img, (*b)->plane.img.stride_in_bytes,
+ device_settings->second.gain, device_chars->second);
+ }
} else {
CaptureRawFullRes(
(*b)->plane.img.img, (*b)->plane.img.stride_in_bytes,
@@ -917,7 +1009,8 @@ bool EmulatedSensor::threadLoop() {
if (!reprocess_request) {
CaptureRGB((*b)->plane.img.img, (*b)->width, (*b)->height,
(*b)->plane.img.stride_in_bytes, RGBLayout::RGB,
- device_settings->second.gain, device_chars->second);
+ device_settings->second.gain, (*b)->color_space,
+ device_chars->second);
} else {
ALOGE("%s: Reprocess requests with output format %x no supported!",
__FUNCTION__, (*b)->format);
@@ -928,7 +1021,8 @@ bool EmulatedSensor::threadLoop() {
if (!reprocess_request) {
CaptureRGB((*b)->plane.img.img, (*b)->width, (*b)->height,
(*b)->plane.img.stride_in_bytes, RGBLayout::RGBA,
- device_settings->second.gain, device_chars->second);
+ device_settings->second.gain, (*b)->color_space,
+ device_chars->second);
} else {
ALOGE("%s: Reprocess requests with output format %x no supported!",
__FUNCTION__, (*b)->format);
@@ -950,6 +1044,7 @@ bool EmulatedSensor::threadLoop() {
auto jpeg_input = std::make_unique<JpegYUV420Input>();
jpeg_input->width = (*b)->width;
jpeg_input->height = (*b)->height;
+ jpeg_input->color_space = (*b)->color_space;
auto img =
new uint8_t[(jpeg_input->width * jpeg_input->height * 3) / 2];
jpeg_input->yuv_planes = {
@@ -972,10 +1067,10 @@ bool EmulatedSensor::threadLoop() {
ANDROID_EDGE_MODE_HIGH_QUALITY)
? HIGH_QUALITY
: REGULAR;
- auto ret = ProcessYUV420(
- yuv_input, yuv_output, device_settings->second.gain,
- process_type, device_settings->second.zoom_ratio,
- rotate, device_chars->second);
+ auto ret = ProcessYUV420(yuv_input, yuv_output,
+ device_settings->second.gain, process_type,
+ device_settings->second.zoom_ratio, rotate,
+ (*b)->color_space, device_chars->second);
if (ret != 0) {
(*b)->stream_buffer.status = BufferStatus::kError;
break;
@@ -1021,10 +1116,10 @@ bool EmulatedSensor::threadLoop() {
ANDROID_EDGE_MODE_HIGH_QUALITY)
? HIGH_QUALITY
: REGULAR;
- auto ret = ProcessYUV420(
- yuv_input, yuv_output, device_settings->second.gain,
- process_type, device_settings->second.zoom_ratio,
- rotate, device_chars->second);
+ auto ret =
+ ProcessYUV420(yuv_input, yuv_output, device_settings->second.gain,
+ process_type, device_settings->second.zoom_ratio,
+ rotate, (*b)->color_space, device_chars->second);
if (ret != 0) {
(*b)->stream_buffer.status = BufferStatus::kError;
}
@@ -1054,7 +1149,7 @@ bool EmulatedSensor::threadLoop() {
CaptureYUV420((*b)->plane.img_y_crcb, (*b)->width, (*b)->height,
device_settings->second.gain,
device_settings->second.zoom_ratio, rotate,
- device_chars->second);
+ (*b)->color_space, device_chars->second);
} else {
ALOGE(
"%s: Reprocess requests with output format %x no supported!",
@@ -1149,6 +1244,18 @@ void EmulatedSensor::ReturnResults(
}
result->result_metadata->Set(ANDROID_SENSOR_RAW_BINNING_FACTOR_USED,
&raw_binned_factor_used, 1);
+ if (info.has_cropped_raw_stream) {
+ if (info.raw_in_sensor_zoom_applied) {
+ result->result_metadata->Set(
+ ANDROID_SCALER_RAW_CROP_REGION,
+ device_chars->second.raw_crop_region_zoomed, 4);
+
+ } else {
+ result->result_metadata->Set(
+ ANDROID_SCALER_RAW_CROP_REGION,
+ device_chars->second.raw_crop_region_unzoomed, 4);
+ }
+ }
}
if (logical_settings->second.lens_shading_map_mode ==
ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_ON) {
@@ -1324,66 +1431,37 @@ status_t EmulatedSensor::RemosaicRAW16Image(uint16_t* img_in, uint16_t* img_out,
void EmulatedSensor::CaptureRawBinned(uint8_t* img, size_t row_stride_in_bytes,
uint32_t gain,
const SensorCharacteristics& chars) {
- ATRACE_CALL();
- // inc = how many pixels to skip while reading every next pixel
- float total_gain = gain / 100.0 * GetBaseGainFactor(chars.max_raw_value);
- float noise_var_gain = total_gain * total_gain;
- float read_noise_var =
- kReadNoiseVarBeforeGain * noise_var_gain + kReadNoiseVarAfterGain;
- int bayer_select[4] = {EmulatedScene::R, EmulatedScene::Gr, EmulatedScene::Gb,
- EmulatedScene::B};
- scene_->SetReadoutPixel(0, 0);
- for (unsigned int out_y = 0; out_y < chars.height; out_y++) {
- // Stride still stays width since the buffer is binned size.
- int* bayer_row = bayer_select + (out_y & 0x1) * 2;
- uint16_t* px = (uint16_t*)img + out_y * (row_stride_in_bytes / 2);
- for (unsigned int out_x = 0; out_x < chars.width; out_x++) {
- int color_idx = bayer_row[out_x & 0x1];
- uint16_t raw_count = 0;
- // Color filter will be the same for each quad.
- uint32_t electron_count = 0;
- int x, y;
- float norm_x = (float)out_x / chars.width;
- float norm_y = (float)out_y / chars.height;
- x = static_cast<int>(chars.full_res_width * norm_x);
- y = static_cast<int>(chars.full_res_height * norm_y);
-
- x = std::min(std::max(x, 0), (int)chars.full_res_width - 1);
- y = std::min(std::max(y, 0), (int)chars.full_res_height - 1);
-
- scene_->SetReadoutPixel(x, y);
-
- const uint32_t* pixel = scene_->GetPixelElectrons();
- electron_count = pixel[color_idx];
- // TODO: Better pixel saturation curve?
- electron_count = (electron_count < kSaturationElectrons)
- ? electron_count
- : kSaturationElectrons;
-
- // TODO: Better A/D saturation curve?
- raw_count = electron_count * total_gain;
- raw_count =
- (raw_count < chars.max_raw_value) ? raw_count : chars.max_raw_value;
-
- // Calculate noise value
- // TODO: Use more-correct Gaussian instead of uniform noise
- float photon_noise_var = electron_count * noise_var_gain;
- float noise_stddev = sqrtf_approx(read_noise_var + photon_noise_var);
- // Scaled to roughly match gaussian/uniform noise stddev
- float noise_sample = rand_r(&rand_seed_) * (2.5 / (1.0 + RAND_MAX)) - 1.25;
+ CaptureRaw(img, row_stride_in_bytes, gain, chars, /*in_sensor_zoom*/ false,
+ /*binned*/ true);
+ return;
+}
- raw_count += chars.black_level_pattern[color_idx];
- raw_count += noise_stddev * noise_sample;
- *px++ = raw_count;
- }
- }
- ALOGVV("Binned RAW sensor image captured");
+void EmulatedSensor::CaptureRawInSensorZoom(uint8_t* img,
+ size_t row_stride_in_bytes,
+ uint32_t gain,
+ const SensorCharacteristics& chars) {
+ CaptureRaw(img, row_stride_in_bytes, gain, chars, /*in_sensor_zoom*/ true,
+ /*binned*/ false);
+ return;
}
void EmulatedSensor::CaptureRawFullRes(uint8_t* img, size_t row_stride_in_bytes,
uint32_t gain,
const SensorCharacteristics& chars) {
+ CaptureRaw(img, row_stride_in_bytes, gain, chars, /*inSensorZoom*/ false,
+ /*binned*/ false);
+ return;
+}
+
+void EmulatedSensor::CaptureRaw(uint8_t* img, size_t row_stride_in_bytes,
+ uint32_t gain,
+ const SensorCharacteristics& chars,
+ bool in_sensor_zoom, bool binned) {
ATRACE_CALL();
+ if (in_sensor_zoom && binned) {
+ ALOGE("%s: Can't perform in-sensor zoom in binned mode", __FUNCTION__);
+ return;
+ }
float total_gain = gain / 100.0 * GetBaseGainFactor(chars.max_raw_value);
float noise_var_gain = total_gain * total_gain;
float read_noise_var =
@@ -1393,14 +1471,30 @@ void EmulatedSensor::CaptureRawFullRes(uint8_t* img, size_t row_stride_in_bytes,
// RGGB
int bayer_select[4] = {EmulatedScene::R, EmulatedScene::Gr, EmulatedScene::Gb,
EmulatedScene::B};
+ const float raw_zoom_ratio = in_sensor_zoom ? 2.0f : 1.0f;
+ unsigned int image_width =
+ in_sensor_zoom || binned ? chars.width : chars.full_res_width;
+ unsigned int image_height =
+ in_sensor_zoom || binned ? chars.height : chars.full_res_height;
+ const float norm_left_top = 0.5f - 0.5f / raw_zoom_ratio;
+ for (unsigned int out_y = 0; out_y < image_height; out_y++) {
+ int* bayer_row = bayer_select + (out_y & 0x1) * 2;
+ uint16_t* px = (uint16_t*)img + out_y * (row_stride_in_bytes / 2);
+
+ float norm_y = out_y / (image_height * raw_zoom_ratio);
+ int y = static_cast<int>(chars.full_res_height * (norm_left_top + norm_y));
+ y = std::min(std::max(y, 0), (int)chars.full_res_height - 1);
+
+ for (unsigned int out_x = 0; out_x < image_width; out_x++) {
+ int color_idx = chars.quad_bayer_sensor && !(in_sensor_zoom || binned)
+ ? GetQuadBayerColor(out_x, out_y)
+ : bayer_row[out_x & 0x1];
+ float norm_x = out_x / (image_width * raw_zoom_ratio);
+ int x = static_cast<int>(chars.full_res_width * (norm_left_top + norm_x));
+ x = std::min(std::max(x, 0), (int)chars.full_res_width - 1);
- for (unsigned int y = 0; y < chars.full_res_height; y++) {
- int* bayer_row = bayer_select + (y & 0x1) * 2;
- uint16_t* px = (uint16_t*)img + y * (row_stride_in_bytes / 2);
- for (unsigned int x = 0; x < chars.full_res_width; x++) {
- int color_idx = chars.quad_bayer_sensor ? GetQuadBayerColor(x, y)
- : bayer_row[x & 0x1];
uint32_t electron_count;
+ scene_->SetReadoutPixel(x, y);
electron_count = scene_->GetPixelElectrons()[color_idx];
// TODO: Better pixel saturation curve?
@@ -1432,7 +1526,8 @@ void EmulatedSensor::CaptureRawFullRes(uint8_t* img, size_t row_stride_in_bytes,
}
void EmulatedSensor::CaptureRGB(uint8_t* img, uint32_t width, uint32_t height,
- uint32_t stride, RGBLayout layout, uint32_t gain,
+ uint32_t stride, RGBLayout layout,
+ uint32_t gain, int32_t color_space,
const SensorCharacteristics& chars) {
ATRACE_CALL();
float total_gain = gain / 100.0 * GetBaseGainFactor(chars.max_raw_value);
@@ -1453,6 +1548,11 @@ void EmulatedSensor::CaptureRGB(uint8_t* img, uint32_t width, uint32_t height,
g_count = pixel[EmulatedScene::Gr] * scale64x;
b_count = pixel[EmulatedScene::B] * scale64x;
+ if (color_space !=
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED) {
+ RgbToRgb(&r_count, &g_count, &b_count);
+ }
+
uint8_t r = r_count < 255 * 64 ? r_count / 64 : 255;
uint8_t g = g_count < 255 * 64 ? g_count / 64 : 255;
uint8_t b = b_count < 255 * 64 ? b_count / 64 : 255;
@@ -1487,6 +1587,7 @@ void EmulatedSensor::CaptureRGB(uint8_t* img, uint32_t width, uint32_t height,
void EmulatedSensor::CaptureYUV420(YCbCrPlanes yuv_layout, uint32_t width,
uint32_t height, uint32_t gain,
float zoom_ratio, bool rotate,
+ int32_t color_space,
const SensorCharacteristics& chars) {
ATRACE_CALL();
float total_gain = gain / 100.0 * GetBaseGainFactor(chars.max_raw_value);
@@ -1538,21 +1639,27 @@ void EmulatedSensor::CaptureYUV420(YCbCrPlanes yuv_layout, uint32_t width,
y = std::min(std::max(y, 0), (int)chars.full_res_height - 1);
scene_->SetReadoutPixel(x, y);
- int32_t r_count, g_count, b_count;
+ uint32_t r_count, g_count, b_count;
// TODO: Perfect demosaicing is a cheat
const uint32_t* pixel = rotate ? scene_->GetPixelElectronsColumn()
: scene_->GetPixelElectrons();
r_count = pixel[EmulatedScene::R] * scale64x;
- r_count = r_count < kSaturationPoint ? r_count : kSaturationPoint;
g_count = pixel[EmulatedScene::Gr] * scale64x;
- g_count = g_count < kSaturationPoint ? g_count : kSaturationPoint;
b_count = pixel[EmulatedScene::B] * scale64x;
+
+ if (color_space !=
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED) {
+ RgbToRgb(&r_count, &g_count, &b_count);
+ }
+
+ r_count = r_count < kSaturationPoint ? r_count : kSaturationPoint;
+ g_count = g_count < kSaturationPoint ? g_count : kSaturationPoint;
b_count = b_count < kSaturationPoint ? b_count : kSaturationPoint;
// Gamma correction
- r_count = gamma_table_[r_count];
- g_count = gamma_table_[g_count];
- b_count = gamma_table_[b_count];
+ r_count = GammaTable(r_count, color_space);
+ g_count = GammaTable(g_count, color_space);
+ b_count = GammaTable(b_count, color_space);
uint8_t y8 = (rgb_to_y[0] * r_count + rgb_to_y[1] * g_count +
rgb_to_y[2] * b_count) /
@@ -1626,8 +1733,9 @@ void EmulatedSensor::CaptureDepth(uint8_t* img, uint32_t gain, uint32_t width,
status_t EmulatedSensor::ProcessYUV420(const YUV420Frame& input,
const YUV420Frame& output, uint32_t gain,
- ProcessType process_type, float zoom_ratio,
- bool rotate_and_crop,
+ ProcessType process_type,
+ float zoom_ratio, bool rotate_and_crop,
+ int32_t color_space,
const SensorCharacteristics& chars) {
ATRACE_CALL();
size_t input_width, input_height;
@@ -1643,8 +1751,8 @@ status_t EmulatedSensor::ProcessYUV420(const YUV420Frame& input,
switch (process_type) {
case HIGH_QUALITY:
- CaptureYUV420(output.planes, output.width, output.height, gain, zoom_ratio,
- rotate_and_crop, chars);
+ CaptureYUV420(output.planes, output.width, output.height, gain,
+ zoom_ratio, rotate_and_crop, color_space, chars);
return OK;
case REPROCESS:
input_width = input.width;
@@ -1690,7 +1798,7 @@ status_t EmulatedSensor::ProcessYUV420(const YUV420Frame& input,
.cbcr_stride = static_cast<uint32_t>(input_width) / 2,
.cbcr_step = 1};
CaptureYUV420(input_planes, input_width, input_height, gain, zoom_ratio,
- rotate_and_crop, chars);
+ rotate_and_crop, color_space, chars);
}
output_planes = output.planes;
@@ -1743,4 +1851,109 @@ int32_t EmulatedSensor::ApplysRGBGamma(int32_t value, int32_t saturation) {
return n_value * saturation;
}
+int32_t EmulatedSensor::ApplySMPTE170MGamma(int32_t value, int32_t saturation) {
+ float n_value = (static_cast<float>(value) / saturation);
+ n_value = (n_value <= 0.018f) ? n_value * 4.5f
+ : 1.099f * pow(n_value, 0.45f) - 0.099f;
+ return n_value * saturation;
+}
+
+int32_t EmulatedSensor::ApplyST2084Gamma(int32_t value, int32_t saturation) {
+ float n_value = (static_cast<float>(value) / saturation);
+ float c2 = 32.f * 2413.f / 4096.f;
+ float c3 = 32.f * 2392.f / 4096.f;
+ float c1 = c3 - c2 + 1.f;
+ float m = 128.f * 2523.f / 4096.f;
+ float n = 0.25f * 2610.f / 4096.f;
+ n_value = pow((c1 + c2 * pow(n_value, n)) / (1 + c3 * pow(n_value, n)), m);
+ return n_value * saturation;
+}
+
+int32_t EmulatedSensor::ApplyHLGGamma(int32_t value, int32_t saturation) {
+ float n_value = (static_cast<float>(value) / saturation);
+ // The full HLG gamma curve has additional parameters for n_value > 1, but n_value
+ // in the emulated camera is always <= 1 due to lack of HDR display features.
+ n_value = 0.5f * pow(n_value, 0.5f);
+ return n_value * saturation;
+}
+
+int32_t EmulatedSensor::GammaTable(int32_t value, int32_t color_space) {
+ switch (color_space) {
+ case ColorSpaceNamed::BT709:
+ return gamma_table_smpte170m_[value];
+ case ColorSpaceNamed::BT2020:
+ return gamma_table_hlg_[value]; // Assume HLG
+ case ColorSpaceNamed::DISPLAY_P3:
+ case ColorSpaceNamed::SRGB:
+ default:
+ return gamma_table_sRGB_[value];
+ }
+
+ return 0;
+}
+
+void EmulatedSensor::RgbToRgb(uint32_t* r_count, uint32_t* g_count,
+ uint32_t* b_count) {
+ uint32_t r = *r_count;
+ uint32_t g = *g_count;
+ uint32_t b = *b_count;
+ *r_count = (uint32_t)std::max(
+ r * rgb_rgb_matrix_.rR + g * rgb_rgb_matrix_.gR + b * rgb_rgb_matrix_.bR,
+ 0.0f);
+ *g_count = (uint32_t)std::max(
+ r * rgb_rgb_matrix_.rG + g * rgb_rgb_matrix_.gG + b * rgb_rgb_matrix_.bG,
+ 0.0f);
+ *b_count = (uint32_t)std::max(
+ r * rgb_rgb_matrix_.rB + g * rgb_rgb_matrix_.gB + b * rgb_rgb_matrix_.bB,
+ 0.0f);
+}
+
+void EmulatedSensor::CalculateRgbRgbMatrix(int32_t color_space,
+ const SensorCharacteristics& chars) {
+ const XyzMatrix* xyzMatrix;
+ switch (color_space) {
+ case ColorSpaceNamed::DISPLAY_P3:
+ xyzMatrix = &kDisplayP3Matrix;
+ break;
+ case ColorSpaceNamed::BT709:
+ xyzMatrix = &kBt709Matrix;
+ break;
+ case ColorSpaceNamed::BT2020:
+ xyzMatrix = &kBt2020Matrix;
+ break;
+ case ColorSpaceNamed::SRGB:
+ default:
+ xyzMatrix = &kSrgbXyzMatrix;
+ break;
+ }
+
+ rgb_rgb_matrix_.rR = xyzMatrix->xR * chars.forward_matrix.rX +
+ xyzMatrix->yR * chars.forward_matrix.rY +
+ xyzMatrix->zR * chars.forward_matrix.rZ;
+ rgb_rgb_matrix_.gR = xyzMatrix->xR * chars.forward_matrix.gX +
+ xyzMatrix->yR * chars.forward_matrix.gY +
+ xyzMatrix->zR * chars.forward_matrix.gZ;
+ rgb_rgb_matrix_.bR = xyzMatrix->xR * chars.forward_matrix.bX +
+ xyzMatrix->yR * chars.forward_matrix.bY +
+ xyzMatrix->zR * chars.forward_matrix.bZ;
+ rgb_rgb_matrix_.rG = xyzMatrix->xG * chars.forward_matrix.rX +
+ xyzMatrix->yG * chars.forward_matrix.rY +
+ xyzMatrix->zG * chars.forward_matrix.rZ;
+ rgb_rgb_matrix_.gG = xyzMatrix->xG * chars.forward_matrix.gX +
+ xyzMatrix->yG * chars.forward_matrix.gY +
+ xyzMatrix->zG * chars.forward_matrix.gZ;
+ rgb_rgb_matrix_.bG = xyzMatrix->xG * chars.forward_matrix.bX +
+ xyzMatrix->yG * chars.forward_matrix.bY +
+ xyzMatrix->zG * chars.forward_matrix.bZ;
+ rgb_rgb_matrix_.rB = xyzMatrix->xB * chars.forward_matrix.rX +
+ xyzMatrix->yB * chars.forward_matrix.rY +
+ xyzMatrix->zB * chars.forward_matrix.rZ;
+ rgb_rgb_matrix_.gB = xyzMatrix->xB * chars.forward_matrix.gX +
+ xyzMatrix->yB * chars.forward_matrix.gY +
+ xyzMatrix->zB * chars.forward_matrix.gZ;
+ rgb_rgb_matrix_.bB = xyzMatrix->xB * chars.forward_matrix.bX +
+ xyzMatrix->yB * chars.forward_matrix.bY +
+ xyzMatrix->zB * chars.forward_matrix.bZ;
+}
+
} // namespace android
diff --git a/devices/EmulatedCamera/hwl/EmulatedSensor.h b/devices/EmulatedCamera/hwl/EmulatedSensor.h
index 8c63ae4..192cadd 100644
--- a/devices/EmulatedCamera/hwl/EmulatedSensor.h
+++ b/devices/EmulatedCamera/hwl/EmulatedSensor.h
@@ -75,6 +75,7 @@
#ifndef HW_EMULATOR_CAMERA2_SENSOR_H
#define HW_EMULATOR_CAMERA2_SENSOR_H
+#include <android/hardware/graphics/common/1.2/types.h>
#include <hwl_types.h>
#include <algorithm>
@@ -90,10 +91,14 @@
namespace android {
+using google_camera_hal::ColorSpaceProfile;
+using google_camera_hal::DynamicRangeProfile;
using google_camera_hal::HwlPipelineCallback;
using google_camera_hal::HwlPipelineResult;
using google_camera_hal::StreamConfiguration;
+using hardware::graphics::common::V1_2::Dataspace;
+
/*
* Default to sRGB with D65 white point
*/
@@ -112,11 +117,38 @@ struct ColorFilterXYZ {
float bZ = 1.0570f;
};
+struct ForwardMatrix {
+ float rX = 0.4355f;
+ float gX = 0.3848f;
+ float bX = 0.1425f;
+ float rY = 0.2216f;
+ float gY = 0.7168f;
+ float bY = 0.0605f;
+ float rZ = 0.0137f;
+ float gZ = 0.0967f;
+ float bZ = 0.7139f;
+};
+
+struct RgbRgbMatrix {
+ float rR;
+ float gR;
+ float bR;
+ float rG;
+ float gG;
+ float bG;
+ float rB;
+ float gB;
+ float bB;
+};
+
+typedef std::unordered_map<DynamicRangeProfile,
+ std::unordered_set<DynamicRangeProfile>>
+ DynamicRangeProfileMap;
+
typedef std::unordered_map<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map,
- std::unordered_set<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map>>
- ProfileMap;
+ ColorSpaceProfile,
+ std::unordered_map<int, std::unordered_set<DynamicRangeProfile>>>
+ ColorSpaceProfileMap;
struct SensorCharacteristics {
size_t width = 0;
@@ -129,6 +161,7 @@ struct SensorCharacteristics {
camera_metadata_enum_android_sensor_info_color_filter_arrangement
color_arangement = ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB;
ColorFilterXYZ color_filter;
+ ForwardMatrix forward_matrix;
uint32_t max_raw_value = 0;
uint32_t black_level_pattern[4] = {0};
uint32_t max_raw_streams = 0;
@@ -143,8 +176,14 @@ struct SensorCharacteristics {
bool is_front_facing = false;
bool quad_bayer_sensor = false;
bool is_10bit_dynamic_range_capable = false;
- ProfileMap dynamic_range_profiles;
+ DynamicRangeProfileMap dynamic_range_profiles;
bool support_stream_use_case = false;
+ int64_t end_valid_stream_use_case =
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL;
+ bool support_color_space_profiles = false;
+ ColorSpaceProfileMap color_space_profiles;
+ int32_t raw_crop_region_zoomed[4] = {0};
+ int32_t raw_crop_region_unzoomed[4] = {0};
};
// Maps logical/physical camera ids to sensor characteristics
@@ -156,10 +195,8 @@ class EmulatedSensor : private Thread, public virtual RefBase {
~EmulatedSensor();
static android_pixel_format_t OverrideFormat(
- android_pixel_format_t format,
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map
- profile) {
- switch (profile) {
+ android_pixel_format_t format, DynamicRangeProfile dynamic_range_profile) {
+ switch (dynamic_range_profile) {
case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD:
if (format == HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
return HAL_PIXEL_FORMAT_YCBCR_420_888;
@@ -173,7 +210,7 @@ class EmulatedSensor : private Thread, public virtual RefBase {
break;
default:
ALOGE("%s: Unsupported dynamic range profile 0x%x", __FUNCTION__,
- profile);
+ dynamic_range_profile);
}
return format;
@@ -315,7 +352,9 @@ class EmulatedSensor : private Thread, public virtual RefBase {
static const int32_t kFixedBitPrecision;
static const int32_t kSaturationPoint;
- std::vector<int32_t> gamma_table_;
+ std::vector<int32_t> gamma_table_sRGB_;
+ std::vector<int32_t> gamma_table_smpte170m_;
+ std::vector<int32_t> gamma_table_hlg_;
Mutex control_mutex_; // Lock before accessing control parameters
// Start of control parameters
@@ -345,12 +384,16 @@ class EmulatedSensor : private Thread, public virtual RefBase {
bool has_non_raw_stream = false;
bool quad_bayer_sensor = false;
bool max_res_request = false;
+ bool has_cropped_raw_stream = false;
+ bool raw_in_sensor_zoom_applied = false;
};
std::map<uint32_t, SensorBinningFactorInfo> sensor_binning_factor_info_;
std::unique_ptr<EmulatedScene> scene_;
+ RgbRgbMatrix rgb_rgb_matrix_;
+
static EmulatedScene::ColorChannels GetQuadBayerColor(uint32_t x, uint32_t y);
static void RemosaicQuadBayerBlock(uint16_t* img_in, uint16_t* img_out,
@@ -366,16 +409,24 @@ class EmulatedSensor : private Thread, public virtual RefBase {
void CaptureRawFullRes(uint8_t* img, size_t row_stride_in_bytes,
uint32_t gain, const SensorCharacteristics& chars);
+ void CaptureRawInSensorZoom(uint8_t* img, size_t row_stride_in_bytes,
+ uint32_t gain, const SensorCharacteristics& chars);
+ void CaptureRaw(uint8_t* img, size_t row_stride_in_bytes, uint32_t gain,
+ const SensorCharacteristics& chars, bool in_sensor_zoom,
+ bool binned);
enum RGBLayout { RGB, RGBA, ARGB };
void CaptureRGB(uint8_t* img, uint32_t width, uint32_t height,
uint32_t stride, RGBLayout layout, uint32_t gain,
- const SensorCharacteristics& chars);
+ int32_t color_space, const SensorCharacteristics& chars);
void CaptureYUV420(YCbCrPlanes yuv_layout, uint32_t width, uint32_t height,
uint32_t gain, float zoom_ratio, bool rotate,
- const SensorCharacteristics& chars);
+ int32_t color_space, const SensorCharacteristics& chars);
void CaptureDepth(uint8_t* img, uint32_t gain, uint32_t width, uint32_t height,
uint32_t stride, const SensorCharacteristics& chars);
+ void RgbToRgb(uint32_t* r_count, uint32_t* g_count, uint32_t* b_count);
+ void CalculateRgbRgbMatrix(int32_t color_space,
+ const SensorCharacteristics& chars);
struct YUV420Frame {
uint32_t width = 0;
@@ -387,9 +438,14 @@ class EmulatedSensor : private Thread, public virtual RefBase {
status_t ProcessYUV420(const YUV420Frame& input, const YUV420Frame& output,
uint32_t gain, ProcessType process_type,
float zoom_ratio, bool rotate_and_crop,
+ int32_t color_space,
const SensorCharacteristics& chars);
inline int32_t ApplysRGBGamma(int32_t value, int32_t saturation);
+ inline int32_t ApplySMPTE170MGamma(int32_t value, int32_t saturation);
+ inline int32_t ApplyST2084Gamma(int32_t value, int32_t saturation);
+ inline int32_t ApplyHLGGamma(int32_t value, int32_t saturation);
+ inline int32_t GammaTable(int32_t value, int32_t color_space);
bool WaitForVSyncLocked(nsecs_t reltime);
void CalculateAndAppendNoiseProfile(float gain /*in ISO*/,
diff --git a/devices/EmulatedCamera/hwl/JpegCompressor.cpp b/devices/EmulatedCamera/hwl/JpegCompressor.cpp
index 582c92f..c727864 100644
--- a/devices/EmulatedCamera/hwl/JpegCompressor.cpp
+++ b/devices/EmulatedCamera/hwl/JpegCompressor.cpp
@@ -33,6 +33,132 @@ using google_camera_hal::ErrorCode;
using google_camera_hal::MessageType;
using google_camera_hal::NotifyMessage;
+// All ICC profile data sourced from https://github.com/saucecontrol/Compact-ICC-Profiles
+static constexpr uint8_t kIccProfileDisplayP3[] = {
+ 0x00, 0x00, 0x01, 0xe0, 0x6c, 0x63, 0x6d, 0x73, 0x04, 0x20, 0x00, 0x00,
+ 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
+ 0x07, 0xe2, 0x00, 0x03, 0x00, 0x14, 0x00, 0x09, 0x00, 0x0e, 0x00, 0x1d,
+ 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00,
+ 0x73, 0x61, 0x77, 0x73, 0x63, 0x74, 0x72, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x68, 0x61, 0x6e, 0x64,
+ 0x51, 0xb1, 0x0e, 0x57, 0x9c, 0x0c, 0x00, 0x19, 0x38, 0xb9, 0x93, 0x88,
+ 0x06, 0x61, 0xb8, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,
+ 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x22,
+ 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x22,
+ 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0x44, 0x00, 0x00, 0x00, 0x14,
+ 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x2c,
+ 0x72, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x14,
+ 0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x14,
+ 0x62, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0xac, 0x00, 0x00, 0x00, 0x14,
+ 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x20,
+ 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x20,
+ 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x20,
+ 0x6d, 0x6c, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0c, 0x65, 0x6e, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x73, 0x00, 0x50, 0x00, 0x33, 0x00, 0x00,
+ 0x6d, 0x6c, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0c, 0x65, 0x6e, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x43, 0x00, 0x43, 0x00, 0x30, 0x00, 0x21,
+ 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x73, 0x66, 0x33, 0x32,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0c, 0x42, 0x00, 0x00, 0x05, 0xde,
+ 0xff, 0xff, 0xf3, 0x25, 0x00, 0x00, 0x07, 0x93, 0x00, 0x00, 0xfd, 0x90,
+ 0xff, 0xff, 0xfb, 0xa1, 0xff, 0xff, 0xfd, 0xa2, 0x00, 0x00, 0x03, 0xdc,
+ 0x00, 0x00, 0xc0, 0x6e, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x83, 0xdf, 0x00, 0x00, 0x3d, 0xbf, 0xff, 0xff, 0xff, 0xbb,
+ 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xbf,
+ 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, 0x0a, 0xb9, 0x58, 0x59, 0x5a, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x38, 0x00, 0x00, 0x11, 0x0a,
+ 0x00, 0x00, 0xc8, 0xb9, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x66, 0x69, 0x00, 0x00, 0xf2, 0xa7,
+ 0x00, 0x00, 0x0d, 0x59, 0x00, 0x00, 0x13, 0xd0, 0x00, 0x00, 0x0a, 0x5b};
+
+static constexpr uint8_t kIccProfileDciP3[] = {
+ 0x00, 0x00, 0x01, 0xd0, 0x6c, 0x63, 0x6d, 0x73, 0x04, 0x20, 0x00, 0x00,
+ 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
+ 0x07, 0xe5, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x00,
+ 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00,
+ 0x73, 0x61, 0x77, 0x73, 0x63, 0x74, 0x72, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x68, 0x61, 0x6e, 0x64,
+ 0x79, 0xb3, 0x51, 0x32, 0xc4, 0xd7, 0x5b, 0x84, 0xf1, 0xbb, 0xcb, 0x58,
+ 0x53, 0xb0, 0xfa, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,
+ 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x22,
+ 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x22,
+ 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0x44, 0x00, 0x00, 0x00, 0x14,
+ 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x2c,
+ 0x72, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x14,
+ 0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x14,
+ 0x62, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0xac, 0x00, 0x00, 0x00, 0x14,
+ 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x10,
+ 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x10,
+ 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x10,
+ 0x6d, 0x6c, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0c, 0x65, 0x6e, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x54, 0x00, 0x50, 0x00, 0x33, 0x00, 0x00,
+ 0x6d, 0x6c, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0c, 0x65, 0x6e, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x43, 0x00, 0x43, 0x00, 0x30, 0x00, 0x21,
+ 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x73, 0x66, 0x33, 0x32,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x12, 0xe6, 0x00, 0x00, 0x09, 0xef,
+ 0xff, 0xff, 0xf6, 0x8d, 0x00, 0x00, 0x0e, 0x3a, 0x00, 0x00, 0xf6, 0xc8,
+ 0xff, 0xff, 0xfc, 0x53, 0xff, 0xff, 0xfe, 0xe7, 0x00, 0x00, 0x01, 0x5b,
+ 0x00, 0x00, 0xdc, 0xdf, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0x75, 0x00, 0x00, 0x3a, 0x08, 0xff, 0xff, 0xff, 0xcc,
+ 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0xe8,
+ 0x00, 0x00, 0xb5, 0xd8, 0x00, 0x00, 0x0b, 0x11, 0x58, 0x59, 0x5a, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x79, 0x00, 0x00, 0x10, 0x20,
+ 0x00, 0x00, 0xc8, 0x50, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x99, 0x9a};
+
+static constexpr uint8_t kIccProfileSrgb[] = {
+ 0x00, 0x00, 0x01, 0xe0, 0x6c, 0x63, 0x6d, 0x73, 0x04, 0x20, 0x00, 0x00,
+ 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
+ 0x07, 0xe2, 0x00, 0x03, 0x00, 0x14, 0x00, 0x09, 0x00, 0x0e, 0x00, 0x1d,
+ 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00,
+ 0x73, 0x61, 0x77, 0x73, 0x63, 0x74, 0x72, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x68, 0x61, 0x6e, 0x64,
+ 0xa3, 0xb2, 0xab, 0xdf, 0x5c, 0xa7, 0x03, 0x12, 0xa8, 0x55, 0xa4, 0xec,
+ 0x35, 0x7a, 0xd1, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,
+ 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x24,
+ 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x22,
+ 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0x44, 0x00, 0x00, 0x00, 0x14,
+ 0x63, 0x68, 0x61, 0x64, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x2c,
+ 0x72, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x14,
+ 0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x14,
+ 0x62, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x01, 0xac, 0x00, 0x00, 0x00, 0x14,
+ 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x20,
+ 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x20,
+ 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x20,
+ 0x6d, 0x6c, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0c, 0x65, 0x6e, 0x55, 0x53, 0x00, 0x00, 0x00, 0x08,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x73, 0x00, 0x52, 0x00, 0x47, 0x00, 0x42,
+ 0x6d, 0x6c, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x0c, 0x65, 0x6e, 0x55, 0x53, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x43, 0x00, 0x43, 0x00, 0x30, 0x00, 0x21,
+ 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x73, 0x66, 0x33, 0x32,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0c, 0x3f, 0x00, 0x00, 0x05, 0xdd,
+ 0xff, 0xff, 0xf3, 0x26, 0x00, 0x00, 0x07, 0x90, 0x00, 0x00, 0xfd, 0x92,
+ 0xff, 0xff, 0xfb, 0xa1, 0xff, 0xff, 0xfd, 0xa2, 0x00, 0x00, 0x03, 0xdc,
+ 0x00, 0x00, 0xc0, 0x71, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x6f, 0xa0, 0x00, 0x00, 0x38, 0xf2, 0x00, 0x00, 0x03, 0x8f,
+ 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x96,
+ 0x00, 0x00, 0xb7, 0x89, 0x00, 0x00, 0x18, 0xda, 0x58, 0x59, 0x5a, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xa0, 0x00, 0x00, 0x0f, 0x85,
+ 0x00, 0x00, 0xb6, 0xc4, 0x70, 0x61, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x66, 0x69, 0x00, 0x00, 0xf2, 0xa7,
+ 0x00, 0x00, 0x0d, 0x59, 0x00, 0x00, 0x13, 0xd0, 0x00, 0x00, 0x0a, 0x5b};
+
JpegCompressor::JpegCompressor() {
ATRACE_CALL();
char value[PROPERTY_VALUE_MAX];
@@ -162,7 +288,8 @@ void JpegCompressor::CompressYUV420(std::unique_ptr<JpegYUV420Job> job) {
.width = thumbnail_width,
.height = thumbnail_height,
.app1_buffer = nullptr,
- .app1_buffer_size = 0});
+ .app1_buffer_size = 0,
+ .color_space = job->input->color_space});
if (encoded_thumbnail_size > 0) {
job->output->stream_buffer.status = BufferStatus::kOk;
} else {
@@ -173,6 +300,7 @@ void JpegCompressor::CompressYUV420(std::unique_ptr<JpegYUV420Job> job) {
job->exif_utils->SetMake(exif_make_);
job->exif_utils->SetModel(exif_model_);
+ job->exif_utils->SetColorSpace(COLOR_SPACE_ICC_PROFILE);
if (job->exif_utils->GenerateApp1(thumbnail_jpeg_buffer.empty()
? nullptr
: thumbnail_jpeg_buffer.data(),
@@ -197,7 +325,8 @@ void JpegCompressor::CompressYUV420(std::unique_ptr<JpegYUV420Job> job) {
.width = job->input->width,
.height = job->input->height,
.app1_buffer = app1_buffer,
- .app1_buffer_size = app1_buffer_size});
+ .app1_buffer_size = app1_buffer_size,
+ .color_space = job->input->color_space});
if (encoded_size > 0) {
job->output->stream_buffer.status = BufferStatus::kOk;
} else {
@@ -318,6 +447,28 @@ size_t JpegCompressor::CompressYUV420Frame(YUV420Frame frame) {
frame.app1_buffer_size);
}
+ const uint8_t* icc_profile = nullptr;
+ size_t icc_profile_size = 0;
+ switch (frame.color_space) {
+ case 0: // sRGB
+ icc_profile = kIccProfileSrgb;
+ icc_profile_size = std::size(kIccProfileSrgb);
+ break;
+ case 7: // DISPLAY_P3
+ icc_profile = kIccProfileDisplayP3;
+ icc_profile_size = std::size(kIccProfileDisplayP3);
+ break;
+ case 6: // DCI_P3
+ icc_profile = kIccProfileDciP3;
+ icc_profile_size = std::size(kIccProfileDciP3);
+ break;
+ }
+
+ if (icc_profile != nullptr && icc_profile_size > 0) {
+ jpeg_write_icc_profile(cinfo.get(), static_cast<const JOCTET*>(icc_profile),
+ icc_profile_size);
+ }
+
// Compute our macroblock height, so we can pad our input to be vertically
// macroblock aligned.
diff --git a/devices/EmulatedCamera/hwl/JpegCompressor.h b/devices/EmulatedCamera/hwl/JpegCompressor.h
index f7379e7..c373621 100644
--- a/devices/EmulatedCamera/hwl/JpegCompressor.h
+++ b/devices/EmulatedCamera/hwl/JpegCompressor.h
@@ -42,6 +42,7 @@ struct JpegYUV420Input {
uint32_t width, height;
bool buffer_owner;
YCbCrPlanes yuv_planes;
+ int32_t color_space;
JpegYUV420Input() : width(0), height(0), buffer_owner(false) {
}
@@ -89,6 +90,7 @@ class JpegCompressor {
size_t height;
const uint8_t* app1_buffer;
size_t app1_buffer_size;
+ int32_t color_space;
};
size_t CompressYUV420Frame(YUV420Frame frame);
void ThreadLoop();
diff --git a/devices/EmulatedCamera/hwl/apex/Android.bp b/devices/EmulatedCamera/hwl/apex/Android.bp
index 30f80e3..55f492b 100644
--- a/devices/EmulatedCamera/hwl/apex/Android.bp
+++ b/devices/EmulatedCamera/hwl/apex/Android.bp
@@ -33,6 +33,13 @@ prebuilt_etc {
installable: false,
}
+prebuilt_etc {
+ name: "com.google.emulated.camera.provider.hal.xml",
+ src: ":android.hardware.camera.provider@2.7-service-google.xml",
+ sub_dir: "vintf",
+ installable: false,
+}
+
apex_defaults {
name: "com.google.emulated.camera.provider.hal.defaults",
manifest: "apex_manifest.json",
@@ -54,6 +61,7 @@ apex_defaults {
],
prebuilts: [
"com.google.emulated.camera.provider.hal.rc",
+ "com.google.emulated.camera.provider.hal.xml", // vintf fragment
"android.hardware.camera.concurrent.prebuilt.xml",
"android.hardware.camera.flash-autofocus.prebuilt.xml",
"android.hardware.camera.front.prebuilt.xml",
@@ -63,7 +71,6 @@ apex_defaults {
"emu_camera_depth.json",
"emu_camera_front.json",
],
- vintf_fragments: [":android.hardware.camera.provider@2.7-service-google.xml"],
}
apex {
@@ -76,5 +83,4 @@ apex {
name: "com.google.emulated.camera.provider.hal.fastscenecycle",
defaults: ["com.google.emulated.camera.provider.hal.defaults"],
native_shared_libs: ["libgooglecamerahwl_impl_fast_scene_cycle"],
- multi_install_skip_symbol_files: true,
}
diff --git a/devices/EmulatedCamera/hwl/apex/apex_manifest.json b/devices/EmulatedCamera/hwl/apex/apex_manifest.json
index 50c09a8..719c4ef 100644
--- a/devices/EmulatedCamera/hwl/apex/apex_manifest.json
+++ b/devices/EmulatedCamera/hwl/apex/apex_manifest.json
@@ -1,4 +1,5 @@
{
"name": "com.google.emulated.camera.provider.hal",
- "version": 1
+ "version": 1,
+ "supportsRebootlessUpdate": true
}
diff --git a/devices/EmulatedCamera/hwl/apex/com.google.emulated.camera.provider.hal.rc b/devices/EmulatedCamera/hwl/apex/com.google.emulated.camera.provider.hal.rc
index 134cd8f..165c36f 100644
--- a/devices/EmulatedCamera/hwl/apex/com.google.emulated.camera.provider.hal.rc
+++ b/devices/EmulatedCamera/hwl/apex/com.google.emulated.camera.provider.hal.rc
@@ -1,3 +1,7 @@
+# Re-start the service on rebootless-update
+on property:apex.com.google.emulated.camera.provider.hal.ready=true
+ start vendor.camera-provider-2-7-google
+
service vendor.camera-provider-2-7-google /apex/com.google.emulated.camera.provider.hal/bin/hw/android.hardware.camera.provider@2.7-service-google
class hal
user system
diff --git a/devices/EmulatedCamera/hwl/apex/file_contexts b/devices/EmulatedCamera/hwl/apex/file_contexts
index 2f0ab85..62bb905 100644
--- a/devices/EmulatedCamera/hwl/apex/file_contexts
+++ b/devices/EmulatedCamera/hwl/apex/file_contexts
@@ -1,5 +1,5 @@
(/.*)? u:object_r:vendor_file:s0
-# Permission XMLs
-/etc/permissions(/.*)? u:object_r:vendor_configs_file:s0
+# Configs (e.g. vintf, permissions)
+/etc(/.*)? u:object_r:vendor_configs_file:s0
# Service binary
/bin/hw/android\.hardware\.camera\.provider@2\.7-service-google u:object_r:hal_camera_default_exec:s0
diff --git a/devices/EmulatedCamera/hwl/configs/Android.bp b/devices/EmulatedCamera/hwl/configs/Android.bp
index 25690de..1c74d1d 100644
--- a/devices/EmulatedCamera/hwl/configs/Android.bp
+++ b/devices/EmulatedCamera/hwl/configs/Android.bp
@@ -42,4 +42,4 @@ prebuilt_etc {
name: "emu_camera_front.json",
src: "emu_camera_front.json",
defaults: ["emu_camera_config_defaults"],
-}
+} \ No newline at end of file
diff --git a/devices/EmulatedCamera/hwl/configs/emu_camera_back.json b/devices/EmulatedCamera/hwl/configs/emu_camera_back.json
index 97318f8..a873bea 100644
--- a/devices/EmulatedCamera/hwl/configs/emu_camera_back.json
+++ b/devices/EmulatedCamera/hwl/configs/emu_camera_back.json
@@ -1,116 +1,123 @@
{
"android.colorCorrection.availableAberrationModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.control.aeAvailableAntibandingModes": [
- "0",
+ "0",
"3"
- ],
+ ],
"android.control.aeAvailableModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3"
- ],
+ ],
"android.control.aeAvailableTargetFpsRanges": [
- "15",
- "15",
- "5",
- "30",
- "15",
- "30",
- "30",
+ "15",
+ "15",
+ "5",
+ "30",
+ "15",
+ "30",
+ "30",
"30"
- ],
+ ],
"android.control.aeCompensationRange": [
- "-9",
+ "-9",
"9"
- ],
+ ],
"android.control.aeCompensationStep": [
- "1",
+ "1",
"3"
- ],
+ ],
"android.control.aeLockAvailable": [
"TRUE"
- ],
+ ],
"android.control.afAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.availableExtendedSceneModeMaxSizes": [
- "0",
- "0",
- "0",
- "1",
- "1856",
- "1392",
- "64",
- "1856",
- "1392"
- ],
+ "0",
+ "0",
+ "0",
+ "1",
+ "1856",
+ "1392",
+ "64",
+ "1856",
+ "1392"
+ ],
"android.control.availableExtendedSceneModeZoomRatioRanges": [
- "1.0",
- "4.0",
- "1.0",
- "4.0"
- ],
+ "1.0",
+ "4.0",
+ "1.0",
+ "4.0"
+ ],
"android.control.availableEffects": [
"0"
- ],
+ ],
"android.control.availableModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"4"
- ],
+ ],
"android.control.availableSceneModes": [
"1"
- ],
+ ],
+ "android.control.availableSettingsOverrides": [
+ "0",
+ "1"
+ ],
"android.control.availableVideoStabilizationModes": [
- "0",
+ "0",
"1",
"2"
- ],
+ ],
"android.control.awbAvailableModes": [
- "0",
- "1",
- "2",
- "3",
- "5",
+ "0",
+ "1",
+ "2",
+ "3",
+ "5",
"8"
- ],
+ ],
"android.control.awbLockAvailable": [
"TRUE"
- ],
+ ],
+ "android.control.autoframingAvailable": [
+ "FALSE"
+ ],
"android.control.maxRegions": [
- "1",
- "0",
+ "1",
+ "0",
"1"
- ],
+ ],
"android.control.postRawSensitivityBoostRange": [
- "100",
+ "100",
"100"
- ],
+ ],
"android.control.sceneModeOverrides": [
- "1",
- "1",
+ "1",
+ "1",
"1"
- ],
+ ],
"android.control.zoomRatioRange": [
- "1.0",
- "10.0"
- ],
+ "1.0",
+ "10.0"
+ ],
"android.edge.availableEdgeModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3"
- ],
+ ],
"android.flash.info.available": [
"TRUE"
],
@@ -121,98 +128,125 @@
"3"
],
"android.hotPixel.availableHotPixelModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.info.supportedHardwareLevel": [
"3"
- ],
+ ],
"android.jpeg.availableThumbnailSizes": [
- "0",
- "0",
- "160",
- "120",
- "320",
+ "0",
+ "0",
+ "160",
+ "120",
+ "320",
"240"
- ],
+ ],
"android.jpeg.maxSize": [
"300000"
- ],
+ ],
"android.lens.facing": [
"BACK"
- ],
+ ],
"android.lens.info.availableApertures": [
"2.79999995"
- ],
+ ],
"android.lens.info.availableFilterDensities": [
"0.00000000"
- ],
+ ],
"android.lens.info.availableFocalLengths": [
"3.29999995"
- ],
+ ],
"android.lens.info.availableOpticalStabilization": [
"0"
- ],
+ ],
"android.lens.info.focusDistanceCalibration": [
"APPROXIMATE"
- ],
+ ],
"android.lens.info.hyperfocalDistance": [
"0.20000000"
- ],
+ ],
"android.lens.info.minimumFocusDistance": [
"20.00000000"
- ],
+ ],
"android.lens.info.shadingMapSize": [
- "17",
+ "17",
"13"
- ],
+ ],
"android.noiseReduction.availableNoiseReductionModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"4"
- ],
+ ],
"android.request.availableCapabilities": [
- "BACKWARD_COMPATIBLE",
- "MANUAL_SENSOR",
- "MANUAL_POST_PROCESSING",
- "READ_SENSOR_SETTINGS",
- "BURST_CAPTURE",
- "PRIVATE_REPROCESSING",
- "YUV_REPROCESSING",
- "RAW",
+ "BACKWARD_COMPATIBLE",
+ "MANUAL_SENSOR",
+ "MANUAL_POST_PROCESSING",
+ "READ_SENSOR_SETTINGS",
+ "BURST_CAPTURE",
+ "PRIVATE_REPROCESSING",
+ "YUV_REPROCESSING",
+ "RAW",
"DYNAMIC_RANGE_TEN_BIT",
- "STREAM_USE_CASE"
- ],
+ "STREAM_USE_CASE",
+ "COLOR_SPACE_PROFILES"
+ ],
"android.sensor.referenceIlluminant1": [
"D50"
],
"android.statistics.info.availableHotPixelMapModes": [
- "0",
+ "0",
"1"
- ],
+ ],
"android.request.maxNumInputStreams": [
"1"
- ],
+ ],
"android.request.availableDynamicRangeProfilesMap": [
- "2",
- "3",
+ "2",
+ "3",
"0"
- ],
+ ],
+ "android.request.availableColorSpaceProfilesMap": [
+ "0",
+ "35",
+ "1",
+ "16",
+ "54",
+ "2",
+ "7",
+ "35",
+ "1",
+ "0",
+ "34",
+ "1",
+ "16",
+ "34",
+ "2",
+ "7",
+ "34",
+ "1",
+ "0",
+ "256",
+ "1",
+ "7",
+ "256",
+ "1"
+ ],
"android.request.recommendedTenBitDynamicRangeProfile": [
"2"
- ],
+ ],
"android.scaler.availableInputOutputFormatsMap": [
- "34",
- "2",
- "33",
- "35",
- "35",
- "2",
- "33",
+ "34",
+ "2",
+ "33",
+ "35",
+ "35",
+ "2",
+ "33",
"35"
- ],
+ ],
"android.scaler.availableStreamUseCases": [
"0",
"1",
@@ -223,247 +257,252 @@
],
"android.reprocess.maxCaptureStall": [
"2"
- ],
+ ],
"android.request.availableCharacteristicsKeys": [
- "983043",
- "983044",
- "983041",
- "917517",
- "983045",
- "983046",
- "983040",
- "917518",
- "983048",
- "983042",
- "983047",
- "917516",
- "917529",
- "589826",
- "589829",
- "589828",
- "589824",
- "589825",
- "589827",
- "589830",
- "589831",
- "524293",
- "327680",
- "1245188",
- "1245189",
- "851978",
- "851979",
- "851980",
- "851981",
- "851972",
- "458759",
- "458760",
- "1179648",
- "1179650",
- "1179655",
- "1507329",
- "65574",
- "65561",
- "65560",
- "65564",
- "65555",
- "65558",
- "65557",
- "65556",
- "65554",
- "65572",
- "65563",
- "65573",
- "65559",
- "65562",
- "4",
- "196610",
- "1376256",
- "655362",
- "1048578",
- "786438",
- "786442",
- "786443",
- "786444",
- "786445",
- "786446",
- "786447",
- "65575",
- "65579",
- "65580",
- "65582",
- "983050",
- "393217",
- "1572865",
- "786440",
- "851977",
- "917507",
- "917509",
- "917511",
- "917513",
+ "983043",
+ "983044",
+ "983041",
+ "917517",
+ "983045",
+ "983046",
+ "983040",
+ "917518",
+ "983048",
+ "983042",
+ "983047",
+ "917516",
+ "917529",
+ "589826",
+ "589829",
+ "589828",
+ "589824",
+ "589825",
+ "589827",
+ "589830",
+ "589831",
+ "524293",
+ "327680",
+ "1245188",
+ "1245189",
+ "851978",
+ "851979",
+ "851980",
+ "851981",
+ "851972",
+ "458759",
+ "458760",
+ "1179648",
+ "1179650",
+ "1179655",
+ "1507329",
+ "65589",
+ "65574",
+ "65561",
+ "65560",
+ "65564",
+ "65555",
+ "65558",
+ "65557",
+ "65556",
+ "65554",
+ "65572",
+ "65563",
+ "65573",
+ "65559",
+ "65562",
+ "4",
+ "196610",
+ "1376256",
+ "655362",
+ "1048578",
+ "786438",
+ "786442",
+ "786443",
+ "786444",
+ "786445",
+ "786446",
+ "786447",
+ "65575",
+ "65579",
+ "65580",
+ "65582",
+ "65592",
+ "983050",
+ "393217",
+ "1572865",
+ "786440",
+ "851977",
+ "917507",
+ "917509",
+ "917511",
+ "917513",
"1179654",
"851984",
"-2080374781"
- ],
+ ],
"android.request.availableRequestKeys": [
- "786435",
- "786433",
- "786432",
- "524290",
- "524291",
- "524288",
- "524289",
- "524292",
- "917504",
- "917505",
- "917506",
- "262146",
- "262144",
- "262145",
- "393216",
- "131072",
- "655360",
- "1048576",
- "0",
- "1245187",
- "196608",
- "1",
- "2",
- "1245186",
- "1245185",
- "1245184",
- "851968",
- "458756",
- "458758",
- "458757",
- "458752",
- "458753",
- "458754",
- "458755",
- "1114112",
- "1114115",
- "65549",
- "65551",
- "65541",
- "65550",
- "65552",
- "65539",
- "65538",
- "65540",
- "65537",
- "65536",
- "65542",
- "65547",
- "65546",
- "65543",
- "65544",
- "65545",
- "65553",
- "1441792",
- "1114128",
- "3",
- "917528",
- "65576",
- "65581",
+ "786435",
+ "786433",
+ "786432",
+ "524290",
+ "524291",
+ "524288",
+ "524289",
+ "524292",
+ "917504",
+ "917505",
+ "917506",
+ "262146",
+ "262144",
+ "262145",
+ "393216",
+ "131072",
+ "655360",
+ "1048576",
+ "0",
+ "1245187",
+ "196608",
+ "1",
+ "2",
+ "1245186",
+ "1245185",
+ "1245184",
+ "851968",
+ "458756",
+ "458758",
+ "458757",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "1114112",
+ "1114115",
+ "65549",
+ "65551",
+ "65541",
+ "65550",
+ "65552",
+ "65539",
+ "65538",
+ "65540",
+ "65537",
+ "65536",
+ "65542",
+ "65547",
+ "65546",
+ "65543",
+ "65544",
+ "65545",
+ "65553",
+ "65588",
+ "1441792",
+ "1114128",
+ "3",
+ "917528",
+ "65576",
+ "65581",
"65583",
"851985",
- "-2080374783",
- "-2080374782",
+ "-2080374783",
+ "-2080374782",
"-2080374780"
- ],
+ ],
"android.request.availableResultKeys": [
- "786435",
- "786433",
- "786432",
- "524290",
- "524291",
- "524288",
- "524289",
- "524292",
- "917504",
- "917505",
- "917506",
- "262146",
- "262144",
- "262145",
- "393216",
- "131072",
- "655360",
- "1048576",
- "0",
- "1245187",
- "196608",
- "1",
- "2",
- "1245186",
- "1245185",
- "1245184",
- "851968",
- "458756",
- "458758",
- "458757",
- "458752",
- "458753",
- "458754",
- "458755",
- "1114112",
- "1114115",
- "65549",
- "65551",
- "65541",
- "65550",
- "65552",
- "65539",
- "65538",
- "65540",
- "65537",
- "65536",
- "65542",
- "65547",
- "65546",
- "65543",
- "65544",
- "65545",
- "65553",
- "1441792",
- "1114128",
- "3",
- "917528",
- "65567",
- "65568",
- "65570",
- "262149",
- "524297",
- "524296",
- "917530",
- "1114126",
- "1114123",
- "786441",
- "917520",
- "917522",
- "65576",
- "65581",
- "65583",
- "917523",
+ "786435",
+ "786433",
+ "786432",
+ "524290",
+ "524291",
+ "524288",
+ "524289",
+ "524292",
+ "917504",
+ "917505",
+ "917506",
+ "262146",
+ "262144",
+ "262145",
+ "393216",
+ "131072",
+ "655360",
+ "1048576",
+ "0",
+ "1245187",
+ "196608",
+ "1",
+ "2",
+ "1245186",
+ "1245185",
+ "1245184",
+ "851968",
+ "458756",
+ "458758",
+ "458757",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "1114112",
+ "1114115",
+ "65549",
+ "65551",
+ "65541",
+ "65550",
+ "65552",
+ "65539",
+ "65538",
+ "65540",
+ "65537",
+ "65536",
+ "65542",
+ "65547",
+ "65546",
+ "65543",
+ "65544",
+ "65545",
+ "65553",
+ "65588",
+ "65590",
+ "1441792",
+ "1114128",
+ "3",
+ "917528",
+ "65567",
+ "65568",
+ "65570",
+ "262149",
+ "524297",
+ "524296",
+ "917530",
+ "1114126",
+ "1114123",
+ "786441",
+ "917520",
+ "917522",
+ "65576",
+ "65581",
+ "65583",
+ "917523",
"917526",
"851985",
- "-2080374783",
+ "-2080374783",
"-2080374782"
- ],
+ ],
"android.request.availableSessionKeys": [
- "786435",
+ "786435",
"-2080374782"
- ],
+ ],
"android.request.maxNumOutputStreams": [
- "1",
- "3",
+ "1",
+ "3",
"1"
- ],
+ ],
"android.request.partialResultCount": [
"1"
- ],
+ ],
"android.request.pipelineMaxDepth": [
"8"
- ],
+ ],
"android.scaler.availableMaxDigitalZoom": [
"10.00000000"
],
@@ -473,492 +512,512 @@
"4"
],
"android.scaler.availableMinFrameDurations": [
- "32",
- "1856",
- "1392",
- "33331760",
- "33",
- "1856",
- "1392",
- "33331760",
- "54",
- "1856",
- "1392",
- "33331760",
- "33",
- "1280",
- "720",
- "33331760",
- "54",
- "1280",
- "720",
- "33331760",
- "34",
- "160",
- "120",
- "33331760",
- "54",
- "160",
- "120",
- "33331760",
- "34",
- "320",
- "240",
- "33331760",
- "54",
- "320",
- "240",
- "33331760",
- "35",
- "160",
- "120",
- "33331760",
- "35",
- "320",
- "240",
- "33331760",
- "33",
- "320",
- "240",
- "33331760",
- "34",
- "640",
- "480",
- "33331760",
- "35",
- "640",
- "480",
- "33331760",
- "33",
- "640",
- "480",
- "33331760",
- "54",
- "640",
- "480",
- "33331760",
- "34",
- "1280",
- "720",
- "33331760",
- "34",
- "1856",
- "1392",
- "33331760",
- "35",
- "1280",
- "720",
- "33331760",
- "35",
- "1856",
- "1392",
- "33331760",
- "1",
- "1600",
- "1200",
- "33331760",
- "34",
- "176",
- "144",
- "33331760",
- "35",
- "176",
- "144",
- "33331760",
- "33",
- "176",
- "144",
- "33331760",
- "54",
- "176",
- "144",
- "33331760",
- "34",
- "1024",
- "768",
- "33331760",
- "35",
- "1024",
- "768",
- "33331760",
- "33",
- "1024",
- "768",
- "33331760",
- "54",
- "1024",
- "768",
+ "32",
+ "1856",
+ "1392",
+ "33331760",
+ "33",
+ "1856",
+ "1392",
+ "33331760",
+ "54",
+ "1856",
+ "1392",
+ "33331760",
+ "33",
+ "1280",
+ "720",
+ "33331760",
+ "54",
+ "1280",
+ "720",
+ "33331760",
+ "34",
+ "160",
+ "120",
+ "33331760",
+ "54",
+ "160",
+ "120",
+ "33331760",
+ "34",
+ "320",
+ "240",
+ "33331760",
+ "54",
+ "320",
+ "240",
+ "33331760",
+ "35",
+ "160",
+ "120",
+ "33331760",
+ "33",
+ "160",
+ "120",
+ "33331760",
+ "35",
+ "320",
+ "240",
+ "33331760",
+ "33",
+ "320",
+ "240",
+ "33331760",
+ "34",
+ "640",
+ "480",
+ "33331760",
+ "35",
+ "640",
+ "480",
+ "33331760",
+ "33",
+ "640",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "480",
+ "33331760",
+ "34",
+ "1280",
+ "720",
+ "33331760",
+ "34",
+ "1856",
+ "1392",
+ "33331760",
+ "35",
+ "1280",
+ "720",
+ "33331760",
+ "35",
+ "1856",
+ "1392",
+ "33331760",
+ "1",
+ "1600",
+ "1200",
+ "33331760",
+ "34",
+ "176",
+ "144",
+ "33331760",
+ "35",
+ "176",
+ "144",
+ "33331760",
+ "33",
+ "176",
+ "144",
+ "33331760",
+ "54",
+ "176",
+ "144",
+ "33331760",
+ "34",
+ "1024",
+ "768",
+ "33331760",
+ "35",
+ "1024",
+ "768",
+ "33331760",
+ "33",
+ "1024",
+ "768",
+ "33331760",
+ "54",
+ "1024",
+ "768",
"33331760"
- ],
+ ],
"android.scaler.availableStallDurations": [
- "32",
- "1856",
- "1392",
- "33331760",
- "33",
- "1856",
- "1392",
- "33331760",
- "33",
- "1280",
- "720",
- "33331760",
- "33",
- "1024",
- "768",
- "33331760",
- "54",
- "1024",
- "768",
- "0",
- "34",
- "160",
- "120",
- "0",
- "34",
- "320",
- "240",
- "0",
- "35",
- "160",
- "120",
- "0",
- "54",
- "160",
- "120",
- "0",
- "35",
- "320",
- "240",
- "0",
- "1",
- "320",
- "240",
- "0",
- "54",
- "320",
- "240",
- "0",
- "34",
- "640",
- "480",
- "0",
- "35",
- "640",
- "480",
- "0",
- "33",
- "640",
- "480",
- "33331760",
- "54",
- "640",
- "480",
- "0",
- "34",
- "1280",
- "720",
- "0",
- "34",
- "1856",
- "1392",
- "0",
- "35",
- "1280",
- "720",
- "0",
- "54",
- "1280",
- "720",
- "0",
- "35",
- "1856",
- "1392",
- "0",
- "54",
- "1856",
- "1392",
- "0",
- "1",
- "1600",
- "1200",
- "0",
- "54",
- "1024",
- "768",
- "0"
- ],
+ "32",
+ "1856",
+ "1392",
+ "33331760",
+ "33",
+ "1856",
+ "1392",
+ "33331760",
+ "33",
+ "1280",
+ "720",
+ "33331760",
+ "33",
+ "1024",
+ "768",
+ "33331760",
+ "54",
+ "1024",
+ "768",
+ "0",
+ "34",
+ "160",
+ "120",
+ "0",
+ "34",
+ "320",
+ "240",
+ "0",
+ "35",
+ "160",
+ "120",
+ "0",
+ "54",
+ "160",
+ "120",
+ "0",
+ "35",
+ "320",
+ "240",
+ "0",
+ "1",
+ "320",
+ "240",
+ "0",
+ "54",
+ "320",
+ "240",
+ "0",
+ "34",
+ "640",
+ "480",
+ "0",
+ "35",
+ "640",
+ "480",
+ "0",
+ "33",
+ "640",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "480",
+ "0",
+ "34",
+ "1280",
+ "720",
+ "0",
+ "34",
+ "1856",
+ "1392",
+ "0",
+ "35",
+ "1280",
+ "720",
+ "0",
+ "54",
+ "1280",
+ "720",
+ "0",
+ "35",
+ "1856",
+ "1392",
+ "0",
+ "54",
+ "1856",
+ "1392",
+ "0",
+ "1",
+ "1600",
+ "1200",
+ "0",
+ "54",
+ "1024",
+ "768",
+ "0",
+ "33",
+ "160",
+ "120",
+ "33331760",
+ "33",
+ "320",
+ "240",
+ "33331760",
+ "33",
+ "176",
+ "144",
+ "33331760"
+ ],
"android.scaler.availableStreamConfigurations": [
- "35",
- "1856",
- "1392",
- "INPUT",
- "33",
- "1856",
- "1392",
- "OUTPUT",
- "33",
- "1280",
- "720",
- "OUTPUT",
- "34",
- "160",
- "120",
- "OUTPUT",
- "54",
- "160",
- "120",
- "OUTPUT",
- "34",
- "320",
- "240",
- "OUTPUT",
- "54",
- "320",
- "240",
- "OUTPUT",
- "35",
- "160",
- "120",
- "OUTPUT",
- "35",
- "320",
- "240",
- "OUTPUT",
- "33",
- "320",
- "240",
- "OUTPUT",
- "34",
- "640",
- "480",
- "OUTPUT",
- "35",
- "640",
- "480",
- "OUTPUT",
- "33",
- "640",
- "480",
- "OUTPUT",
- "54",
- "640",
- "480",
- "OUTPUT",
- "34",
- "1280",
- "720",
- "OUTPUT",
- "34",
- "1856",
- "1392",
- "INPUT",
- "34",
- "1856",
- "1392",
- "OUTPUT",
- "35",
- "1280",
- "720",
- "OUTPUT",
- "54",
- "1280",
- "720",
- "OUTPUT",
- "35",
- "1856",
- "1392",
- "OUTPUT",
- "32",
- "1856",
- "1392",
- "OUTPUT",
- "54",
- "1856",
- "1392",
- "OUTPUT",
- "INPUT",
- "1600",
- "1200",
- "OUTPUT",
- "34",
- "176",
- "144",
- "OUTPUT",
- "35",
- "176",
- "144",
- "OUTPUT",
- "33",
- "176",
- "144",
- "OUTPUT",
- "54",
- "176",
- "144",
- "OUTPUT",
- "34",
- "1024",
- "768",
- "OUTPUT",
- "35",
- "1024",
- "768",
- "OUTPUT",
- "33",
- "1024",
- "768",
- "OUTPUT",
- "54",
- "1024",
- "768",
+ "35",
+ "1856",
+ "1392",
+ "INPUT",
+ "33",
+ "1856",
+ "1392",
+ "OUTPUT",
+ "33",
+ "1280",
+ "720",
+ "OUTPUT",
+ "34",
+ "160",
+ "120",
+ "OUTPUT",
+ "33",
+ "160",
+ "120",
+ "OUTPUT",
+ "54",
+ "160",
+ "120",
+ "OUTPUT",
+ "34",
+ "320",
+ "240",
+ "OUTPUT",
+ "54",
+ "320",
+ "240",
+ "OUTPUT",
+ "35",
+ "160",
+ "120",
+ "OUTPUT",
+ "35",
+ "320",
+ "240",
+ "OUTPUT",
+ "33",
+ "320",
+ "240",
+ "OUTPUT",
+ "34",
+ "640",
+ "480",
+ "OUTPUT",
+ "35",
+ "640",
+ "480",
+ "OUTPUT",
+ "33",
+ "640",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "480",
+ "OUTPUT",
+ "34",
+ "1280",
+ "720",
+ "OUTPUT",
+ "34",
+ "1856",
+ "1392",
+ "INPUT",
+ "34",
+ "1856",
+ "1392",
+ "OUTPUT",
+ "35",
+ "1280",
+ "720",
+ "OUTPUT",
+ "54",
+ "1280",
+ "720",
+ "OUTPUT",
+ "35",
+ "1856",
+ "1392",
+ "OUTPUT",
+ "32",
+ "1856",
+ "1392",
+ "OUTPUT",
+ "54",
+ "1856",
+ "1392",
+ "OUTPUT",
+ "INPUT",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "34",
+ "176",
+ "144",
+ "OUTPUT",
+ "35",
+ "176",
+ "144",
+ "OUTPUT",
+ "33",
+ "176",
+ "144",
+ "OUTPUT",
+ "54",
+ "176",
+ "144",
+ "OUTPUT",
+ "34",
+ "1024",
+ "768",
+ "OUTPUT",
+ "35",
+ "1024",
+ "768",
+ "OUTPUT",
+ "33",
+ "1024",
+ "768",
+ "OUTPUT",
+ "54",
+ "1024",
+ "768",
"OUTPUT"
- ],
+ ],
"android.scaler.croppingType": [
"CENTER_ONLY"
- ],
+ ],
"android.sensor.calibrationTransform1": [
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
"128"
- ],
+ ],
"android.sensor.colorTransform1": [
- "3209",
- "1024",
- "-1655",
- "1024",
- "-502",
- "1024",
- "-1002",
- "1024",
- "1962",
- "1024",
- "34",
- "1024",
- "73",
- "1024",
- "-234",
- "1024",
- "1438",
+ "3209",
+ "1024",
+ "-1655",
+ "1024",
+ "-502",
+ "1024",
+ "-1002",
+ "1024",
+ "1962",
+ "1024",
+ "34",
+ "1024",
+ "73",
+ "1024",
+ "-234",
+ "1024",
+ "1438",
"1024"
- ],
+ ],
"android.sensor.forwardMatrix1": [
- "446",
- "1024",
- "394",
- "1024",
- "146",
- "1024",
- "227",
- "1024",
- "734",
- "1024",
- "62",
- "1024",
- "14",
- "1024",
- "99",
- "1024",
- "731",
+ "446",
+ "1024",
+ "394",
+ "1024",
+ "146",
+ "1024",
+ "227",
+ "1024",
+ "734",
+ "1024",
+ "62",
+ "1024",
+ "14",
+ "1024",
+ "99",
+ "1024",
+ "731",
"1024"
- ],
+ ],
"android.sensor.availableTestPatternModes": [
- "0",
- "1",
+ "0",
+ "1",
"5"
- ],
+ ],
"android.sensor.blackLevelPattern": [
- "64",
- "64",
- "64",
+ "64",
+ "64",
+ "64",
"64"
- ],
+ ],
"android.sensor.info.activeArraySize": [
- "0",
- "0",
- "1856",
+ "0",
+ "0",
+ "1856",
"1392"
- ],
+ ],
"android.sensor.info.colorFilterArrangement": [
"RGGB"
- ],
+ ],
"android.sensor.info.exposureTimeRange": [
- "1000",
+ "1000",
"300000000"
- ],
+ ],
"android.sensor.info.maxFrameDuration": [
"300000000"
- ],
+ ],
"android.sensor.info.physicalSize": [
- "3.20000005",
+ "3.20000005",
"2.40000010"
- ],
+ ],
"android.sensor.info.pixelArraySize": [
- "1856",
+ "1856",
"1392"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySize": [
- "0",
- "0",
- "1856",
+ "0",
+ "0",
+ "1856",
"1392"
- ],
+ ],
"android.sensor.info.sensitivityRange": [
- "100",
+ "100",
"1600"
- ],
+ ],
"android.sensor.info.timestampSource": [
"REALTIME"
- ],
+ ],
"android.sensor.info.whiteLevel": [
"4000"
- ],
+ ],
"android.sensor.maxAnalogSensitivity": [
"1600"
- ],
+ ],
"android.sensor.orientation": [
"90"
- ],
+ ],
"android.shading.availableModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableFaceDetectModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableLensShadingMapModes": [
- "0",
+ "0",
"1"
- ],
+ ],
"android.statistics.info.maxFaceCount": [
"8"
- ],
+ ],
"android.sync.maxLatency": [
"PER_FRAME_CONTROL"
- ],
+ ],
"android.tonemap.availableToneMapModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.tonemap.maxCurvePoints": [
"128"
]
diff --git a/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json b/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json
index e5909a7..8497e86 100644
--- a/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json
+++ b/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json
@@ -1,527 +1,531 @@
{
"android.colorCorrection.availableAberrationModes": [
"0"
- ],
+ ],
"android.control.aeAvailableAntibandingModes": [
"0"
- ],
+ ],
"android.control.aeAvailableTargetFpsRanges": [
- "5",
- "20",
- "20",
+ "5",
+ "20",
+ "20",
"20"
- ],
+ ],
"android.control.aeCompensationRange": [
- "0",
+ "0",
"0"
- ],
+ ],
"android.control.aeCompensationStep": [
- "0",
+ "0",
"10"
- ],
+ ],
"android.control.aeLockAvailable": [
"FALSE"
- ],
+ ],
"android.control.afAvailableModes": [
"0"
- ],
+ ],
"android.control.availableEffects": [
"0"
- ],
+ ],
"android.control.availableModes": [
- "0",
+ "0",
"1"
- ],
+ ],
"android.control.availableSceneModes": [
"0"
- ],
+ ],
"android.control.availableVideoStabilizationModes": [
"0"
- ],
+ ],
"android.control.awbAvailableModes": [
"0"
- ],
+ ],
"android.control.awbLockAvailable": [
"FALSE"
- ],
+ ],
+ "android.control.autoframingAvailable": [
+ "FALSE"
+ ],
"android.control.maxRegions": [
- "0",
- "0",
+ "0",
+ "0",
"0"
- ],
+ ],
"android.control.sceneModeOverrides": [
- "0",
- "0",
+ "0",
+ "0",
"0"
- ],
+ ],
"android.depth.availableDepthMinFrameDurations": [
- "540422489",
- "240",
- "180",
+ "540422489",
+ "240",
+ "180",
"50000000"
- ],
+ ],
"android.depth.availableDepthStallDurations": [
- "540422489",
- "240",
- "180",
+ "540422489",
+ "240",
+ "180",
"50000000"
- ],
+ ],
"android.depth.availableDepthStreamConfigurations": [
- "540422489",
- "240",
- "180",
+ "540422489",
+ "240",
+ "180",
"OUTPUT"
- ],
+ ],
"android.depth.depthIsExclusive": [
"TRUE"
- ],
+ ],
"android.depth.maxDepthSamples": [
"43200"
- ],
+ ],
"android.flash.info.available": [
"FALSE"
- ],
+ ],
"android.hotPixel.availableHotPixelModes": [
"0"
- ],
+ ],
"android.info.supportedHardwareLevel": [
"LIMITED"
- ],
+ ],
"android.jpeg.maxSize": [
"29942792"
- ],
+ ],
"android.lens.distortion": [
- "-0.02708390",
- "0.25425965",
- "-0.53240901",
- "0.00000000",
+ "-0.02708390",
+ "0.25425965",
+ "-0.53240901",
+ "0.00000000",
"0.00000000"
- ],
+ ],
"android.lens.facing": [
"BACK"
- ],
+ ],
"android.lens.info.availableApertures": [
"1.70000005"
- ],
+ ],
"android.lens.info.availableFilterDensities": [
"0.00000000"
- ],
+ ],
"android.lens.info.availableFocalLengths": [
"3.25999999"
- ],
+ ],
"android.lens.info.availableOpticalStabilization": [
"0"
- ],
+ ],
"android.lens.info.focusDistanceCalibration": [
"APPROXIMATE"
- ],
+ ],
"android.lens.info.hyperfocalDistance": [
"0.44789043"
- ],
+ ],
"android.lens.info.minimumFocusDistance": [
"0.00000000"
- ],
+ ],
"android.lens.intrinsicCalibration": [
- "212.91796875",
- "213.16793823",
- "118.33354950",
- "91.61108398",
+ "212.91796875",
+ "213.16793823",
+ "118.33354950",
+ "91.61108398",
"0.00000000"
- ],
+ ],
"android.lens.poseReference": [
"PRIMARY_CAMERA"
- ],
+ ],
"android.lens.poseRotation": [
- "0.71329737",
- "-0.70067680",
- "0.00672206",
+ "0.71329737",
+ "-0.70067680",
+ "0.00672206",
"0.01461948"
- ],
+ ],
"android.lens.poseTranslation": [
- "-0.01890985",
- "-0.00000000",
+ "-0.01890985",
+ "-0.00000000",
"-0.00000000"
- ],
+ ],
"android.noiseReduction.availableNoiseReductionModes": [
"0"
- ],
+ ],
"android.reprocess.maxCaptureStall": [
"2"
- ],
+ ],
"android.request.availableCapabilities": [
"DEPTH_OUTPUT"
- ],
+ ],
"android.request.availableCharacteristicsKeys": [
- "4",
- "65554",
- "65555",
- "65556",
- "65557",
- "65558",
- "65559",
- "65560",
- "65561",
- "65562",
- "65563",
- "65564",
- "65565",
- "65571",
- "65572",
- "65573",
- "65574",
- "65575",
- "1638402",
- "1638401",
- "1638403",
- "327680",
- "393217",
- "458759",
- "458760",
- "589824",
- "589825",
- "589826",
- "589827",
- "589828",
- "589829",
- "589830",
- "589831",
- "524293",
- "1703936",
- "786438",
- "786440",
- "786442",
- "786443",
- "786444",
- "786445",
- "786446",
- "786447",
- "786448",
- "851972",
- "851977",
- "851978",
- "851979",
- "851980",
- "851981",
- "983040",
- "917526",
- "917523",
- "917534",
- "983041",
- "983042",
- "983043",
- "983044",
- "983045",
- "983046",
- "983047",
- "983048",
- "983049",
- "983050",
- "917507",
- "917508",
- "917509",
- "917510",
- "917511",
- "917512",
- "917513",
- "917514",
- "917516",
- "917517",
- "917518",
- "917519",
- "917529",
- "1048578",
- "1179648",
- "1179650",
- "1179654",
- "1179655",
- "1245188",
- "1245189",
- "1376256",
- "1507329",
- "1572865",
- "1638404",
- "524298",
- "524294",
- "524295",
- "524300",
- "524301",
+ "4",
+ "65554",
+ "65555",
+ "65556",
+ "65557",
+ "65558",
+ "65559",
+ "65560",
+ "65561",
+ "65562",
+ "65563",
+ "65564",
+ "65565",
+ "65571",
+ "65572",
+ "65573",
+ "65574",
+ "65575",
+ "65592",
+ "1638402",
+ "1638401",
+ "1638403",
+ "327680",
+ "393217",
+ "458759",
+ "458760",
+ "589824",
+ "589825",
+ "589826",
+ "589827",
+ "589828",
+ "589829",
+ "589830",
+ "589831",
+ "524293",
+ "1703936",
+ "786438",
+ "786440",
+ "786442",
+ "786443",
+ "786444",
+ "786445",
+ "786446",
+ "786447",
+ "786448",
+ "851972",
+ "851977",
+ "851978",
+ "851979",
+ "851980",
+ "851981",
+ "983040",
+ "917526",
+ "917523",
+ "917534",
+ "983041",
+ "983042",
+ "983043",
+ "983044",
+ "983045",
+ "983046",
+ "983047",
+ "983048",
+ "983049",
+ "983050",
+ "917507",
+ "917508",
+ "917509",
+ "917510",
+ "917511",
+ "917512",
+ "917513",
+ "917514",
+ "917516",
+ "917517",
+ "917518",
+ "917519",
+ "917529",
+ "1048578",
+ "1179648",
+ "1179650",
+ "1179654",
+ "1179655",
+ "1245188",
+ "1245189",
+ "1376256",
+ "1507329",
+ "1572865",
+ "1638404",
+ "524298",
+ "524294",
+ "524295",
+ "524300",
+ "524301",
"1638400"
- ],
+ ],
"android.request.availableRequestKeys": [
- "3",
- "65542",
- "65576",
- "393216",
- "458752",
- "458753",
- "458754",
- "524288",
- "524289",
- "524290",
- "524291",
- "524292",
- "786433",
- "917520",
- "1114115",
- "1245184",
- "1245185",
+ "3",
+ "65542",
+ "65576",
+ "393216",
+ "458752",
+ "458753",
+ "458754",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524292",
+ "786433",
+ "917520",
+ "1114115",
+ "1245184",
+ "1245185",
"1245186",
"65541",
"65549"
- ],
+ ],
"android.request.availableResultKeys": [
- "65567",
- "524294",
- "524295",
- "524298",
- "524301",
- "65570",
- "65576",
- "262149",
- "458752",
- "458753",
- "458754",
- "524288",
- "524289",
- "524290",
- "524291",
- "524296",
- "524297",
- "524292",
- "786433",
- "917526",
- "917523",
- "917520",
- "917522",
- "917525",
- "1114121",
- "1114124",
- "1114125",
- "1114126",
- "1114118",
- "1114119",
- "1245184",
- "1245185",
+ "65567",
+ "524294",
+ "524295",
+ "524298",
+ "524301",
+ "65570",
+ "65576",
+ "262149",
+ "458752",
+ "458753",
+ "458754",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524296",
+ "524297",
+ "524292",
+ "786433",
+ "917526",
+ "917523",
+ "917520",
+ "917522",
+ "917525",
+ "1114121",
+ "1114124",
+ "1114125",
+ "1114126",
+ "1114118",
+ "1114119",
+ "1245184",
+ "1245185",
"1245186",
"65541",
"65549"
- ],
+ ],
"android.request.maxNumInputStreams": [
"0"
- ],
+ ],
"android.request.maxNumOutputStreams": [
- "1",
- "3",
+ "1",
+ "3",
"2"
- ],
+ ],
"android.request.partialResultCount": [
"0"
- ],
+ ],
"android.request.pipelineMaxDepth": [
"8"
- ],
+ ],
"android.scaler.availableMaxDigitalZoom": [
"1.00000000"
- ],
+ ],
"android.scaler.croppingType": [
"CENTER_ONLY"
- ],
+ ],
"android.sensor.availableTestPatternModes": [
"0"
- ],
+ ],
"android.sensor.blackLevelPattern": [
- "64",
- "64",
- "64",
+ "64",
+ "64",
+ "64",
"64"
- ],
+ ],
"android.sensor.calibrationTransform1": [
- "1024",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "1024",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "1024",
+ "1024",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "1024",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "1024",
"1024"
- ],
+ ],
"android.sensor.calibrationTransform2": [
- "1024",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "1024",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "0",
- "1024",
- "1024",
+ "1024",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "1024",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "0",
+ "1024",
+ "1024",
"1024"
- ],
+ ],
"android.sensor.colorTransform1": [
- "698",
- "1024",
- "-90",
- "1024",
- "-120",
- "1024",
- "-603",
- "1024",
- "1517",
- "1024",
- "73",
- "1024",
- "-206",
- "1024",
- "441",
- "1024",
- "482",
+ "698",
+ "1024",
+ "-90",
+ "1024",
+ "-120",
+ "1024",
+ "-603",
+ "1024",
+ "1517",
+ "1024",
+ "73",
+ "1024",
+ "-206",
+ "1024",
+ "441",
+ "1024",
+ "482",
"1024"
- ],
+ ],
"android.sensor.colorTransform2": [
- "1395",
- "1024",
- "-636",
- "1024",
- "-181",
- "1024",
- "-462",
- "1024",
- "1542",
- "1024",
- "-29",
- "1024",
- "-61",
- "1024",
- "314",
- "1024",
- "572",
+ "1395",
+ "1024",
+ "-636",
+ "1024",
+ "-181",
+ "1024",
+ "-462",
+ "1024",
+ "1542",
+ "1024",
+ "-29",
+ "1024",
+ "-61",
+ "1024",
+ "314",
+ "1024",
+ "572",
"1024"
- ],
+ ],
"android.sensor.forwardMatrix1": [
- "730",
- "1024",
- "27",
- "1024",
- "231",
- "1024",
- "290",
- "1024",
- "718",
- "1024",
- "16",
- "1024",
- "32",
- "1024",
- "-488",
- "1024",
- "1301",
+ "730",
+ "1024",
+ "27",
+ "1024",
+ "231",
+ "1024",
+ "290",
+ "1024",
+ "718",
+ "1024",
+ "16",
+ "1024",
+ "32",
+ "1024",
+ "-488",
+ "1024",
+ "1301",
"1024"
- ],
+ ],
"android.sensor.forwardMatrix2": [
- "586",
- "1024",
- "92",
- "1024",
- "309",
- "1024",
- "147",
- "1024",
- "766",
- "1024",
- "111",
- "1024",
- "-79",
- "1024",
- "-976",
- "1024",
- "1900",
+ "586",
+ "1024",
+ "92",
+ "1024",
+ "309",
+ "1024",
+ "147",
+ "1024",
+ "766",
+ "1024",
+ "111",
+ "1024",
+ "-79",
+ "1024",
+ "-976",
+ "1024",
+ "1900",
"1024"
- ],
+ ],
"android.sensor.info.activeArraySize": [
- "0",
- "0",
+ "0",
+ "0",
"1440",
- "480"
- ],
+ "480"
+ ],
"android.sensor.info.colorFilterArrangement": [
"GRBG"
- ],
+ ],
"android.sensor.info.lensShadingApplied": [
"TRUE"
- ],
+ ],
"android.sensor.info.maxFrameDuration": [
"200000000"
- ],
+ ],
"android.sensor.info.physicalSize": [
- "0.67199999",
+ "0.67199999",
"2.01600003"
- ],
+ ],
"android.sensor.info.pixelArraySize": [
"1440",
"480"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySize": [
- "0",
- "0",
+ "0",
+ "0",
"1440",
- "480"
- ],
+ "480"
+ ],
"android.sensor.info.timestampSource": [
"REALTIME"
- ],
+ ],
"android.sensor.info.whiteLevel": [
"1023"
- ],
+ ],
"android.sensor.orientation": [
"90"
- ],
+ ],
"android.sensor.profileHueSatMapDimensions": [
- "0",
- "0",
+ "0",
+ "0",
"0"
- ],
+ ],
"android.sensor.referenceIlluminant1": [
"D55"
- ],
+ ],
"android.sensor.referenceIlluminant2": [
"17"
- ],
+ ],
"android.shading.availableModes": [
"0"
- ],
+ ],
"android.statistics.info.availableFaceDetectModes": [
"0"
- ],
+ ],
"android.statistics.info.availableHotPixelMapModes": [
"0"
- ],
+ ],
"android.statistics.info.availableLensShadingMapModes": [
"0"
- ],
+ ],
"android.statistics.info.maxFaceCount": [
"0"
- ],
+ ],
"android.sync.maxLatency": [
"PER_FRAME_CONTROL"
- ],
+ ],
"android.tonemap.maxCurvePoints": [
"0"
]
diff --git a/devices/EmulatedCamera/hwl/configs/emu_camera_front.json b/devices/EmulatedCamera/hwl/configs/emu_camera_front.json
index 88b70e0..5c4b617 100644
--- a/devices/EmulatedCamera/hwl/configs/emu_camera_front.json
+++ b/devices/EmulatedCamera/hwl/configs/emu_camera_front.json
@@ -1,187 +1,194 @@
[
{
"android.colorCorrection.availableAberrationModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.control.aeAvailableAntibandingModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3"
- ],
+ ],
"android.control.aeAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.aeAvailableTargetFpsRanges": [
- "15",
- "15",
- "7",
- "30",
- "15",
- "30",
- "30",
+ "15",
+ "15",
+ "7",
+ "30",
+ "15",
+ "30",
+ "30",
"30"
- ],
+ ],
"android.control.aeCompensationRange": [
- "-24",
+ "-24",
"24"
- ],
+ ],
"android.control.aeCompensationStep": [
- "1",
+ "1",
"6"
- ],
+ ],
"android.control.aeLockAvailable": [
"TRUE"
- ],
+ ],
"android.control.afAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.availableExtendedSceneModeMaxSizes": [
- "0",
- "0",
- "0",
- "1",
- "1920",
- "1080",
- "2",
- "1920",
- "1440"
- ],
+ "0",
+ "0",
+ "0",
+ "1",
+ "1920",
+ "1080",
+ "2",
+ "1920",
+ "1440"
+ ],
"android.control.availableExtendedSceneModeZoomRatioRanges": [
- "2.0",
- "2.0",
- "1.0",
+ "2.0",
+ "2.0",
+ "1.0",
"1.0"
- ],
+ ],
"android.control.availableEffects": [
"0"
- ],
+ ],
"android.control.availableModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"4"
- ],
+ ],
"android.control.availableSceneModes": [
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "12",
- "13",
- "14",
- "15",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "12",
+ "13",
+ "14",
+ "15",
"18"
- ],
+ ],
+ "android.control.availableSettingsOverrides": [
+ "0",
+ "1"
+ ],
"android.control.availableVideoStabilizationModes": [
"0"
- ],
+ ],
"android.control.awbAvailableModes": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
"0"
- ],
+ ],
"android.control.awbLockAvailable": [
"TRUE"
- ],
+ ],
+ "android.control.autoframingAvailable": [
+ "TRUE"
+ ],
"android.control.maxRegions": [
- "1",
- "0",
+ "1",
+ "0",
"1"
- ],
+ ],
"android.control.postRawSensitivityBoostRange": [
- "100",
+ "100",
"100"
- ],
+ ],
"android.control.sceneModeOverrides": [
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
"0"
- ],
+ ],
"android.control.zoomRatioRange": [
- "1.0",
- "8.0"
- ],
+ "1.0",
+ "8.0"
+ ],
"android.distortionCorrection.availableModes": [
"0"
- ],
+ ],
"android.edge.availableEdgeModes": [
- "1",
- "2",
+ "1",
+ "2",
"0",
"3"
- ],
+ ],
"android.flash.info.available": [
"TRUE"
- ],
+ ],
"android.flash.info.strengthMaximumLevel": [
"10"
],
@@ -189,660 +196,705 @@
"3"
],
"android.hotPixel.availableHotPixelModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.info.supportedHardwareLevel": [
"FULL"
- ],
+ ],
"android.jpeg.availableThumbnailSizes": [
- "0",
- "0",
- "176",
- "144",
- "240",
- "144",
- "256",
- "144",
- "240",
- "160",
- "256",
- "154",
- "246",
- "184",
- "240",
- "240",
- "320",
+ "0",
+ "0",
+ "176",
+ "144",
+ "240",
+ "144",
+ "256",
+ "144",
+ "240",
+ "160",
+ "256",
+ "154",
+ "246",
+ "184",
+ "240",
+ "240",
+ "320",
"240"
- ],
+ ],
"android.jpeg.maxSize": [
"3000000"
- ],
+ ],
"android.lens.distortion": [
- "0.08807813",
- "-0.22617353",
- "0.16460505",
- "0.00000000",
+ "0.08807813",
+ "-0.22617353",
+ "0.16460505",
+ "0.00000000",
"0.00000000"
- ],
+ ],
"android.lens.facing": [
"FRONT"
- ],
+ ],
"android.lens.info.availableApertures": [
"1.73000002"
- ],
+ ],
"android.lens.info.availableFilterDensities": [
"0.00000000"
- ],
+ ],
"android.lens.info.availableFocalLengths": [
"4.38000011"
- ],
+ ],
"android.lens.info.availableOpticalStabilization": [
"0"
- ],
+ ],
"android.lens.info.focusDistanceCalibration": [
"APPROXIMATE"
- ],
+ ],
"android.lens.info.hyperfocalDistance": [
"0.25249681"
- ],
+ ],
"android.lens.info.minimumFocusDistance": [
"10.20408154"
- ],
+ ],
"android.lens.info.shadingMapSize": [
- "17",
+ "17",
"13"
- ],
+ ],
"android.lens.intrinsicCalibration": [
- "3225.77416992",
- "3225.77416992",
- "960.50427246",
- "540.46704102",
+ "3225.77416992",
+ "3225.77416992",
+ "960.50427246",
+ "540.46704102",
"0.00000000"
- ],
+ ],
"android.lens.poseReference": [
"PRIMARY_CAMERA"
- ],
+ ],
"android.lens.poseRotation": [
- "0.00000000",
- "0.00000000",
- "0.00000000",
+ "0.00000000",
+ "0.00000000",
+ "0.00000000",
"1.00000000"
- ],
+ ],
"android.lens.poseTranslation": [
- "-0.00000000",
- "-0.00000000",
+ "-0.00000000",
+ "-0.00000000",
"-0.00000000"
- ],
+ ],
"android.logicalMultiCamera.physicalIds": [
- "51",
- "0",
- "52",
+ "51",
+ "0",
+ "52",
"0"
- ],
+ ],
"android.logicalMultiCamera.sensorSyncType": [
"CALIBRATED"
- ],
+ ],
"android.noiseReduction.availableNoiseReductionModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3",
"4"
- ],
+ ],
"android.request.availableCapabilities": [
- "BACKWARD_COMPATIBLE",
- "READ_SENSOR_SETTINGS",
- "MANUAL_SENSOR",
- "BURST_CAPTURE",
- "MANUAL_POST_PROCESSING",
- "LOGICAL_MULTI_CAMERA",
+ "BACKWARD_COMPATIBLE",
+ "READ_SENSOR_SETTINGS",
+ "MANUAL_SENSOR",
+ "BURST_CAPTURE",
+ "MANUAL_POST_PROCESSING",
+ "LOGICAL_MULTI_CAMERA",
"PRIVATE_REPROCESSING",
"ULTRA_HIGH_RESOLUTION_SENSOR",
- "YUV_REPROCESSING",
+ "YUV_REPROCESSING",
"RAW",
- "REMOSAIC_REPROCESSING",
- "DYNAMIC_RANGE_TEN_BIT"
- ],
+ "REMOSAIC_REPROCESSING",
+ "DYNAMIC_RANGE_TEN_BIT",
+ "STREAM_USE_CASE",
+ "COLOR_SPACE_PROFILES"
+ ],
"android.request.availableDynamicRangeProfilesMap": [
- "2",
- "2",
+ "2",
+ "2",
"0"
- ],
+ ],
+ "android.request.availableColorSpaceProfilesMap": [
+ "0",
+ "35",
+ "1",
+ "16",
+ "54",
+ "2",
+ "7",
+ "35",
+ "1",
+ "0",
+ "34",
+ "1",
+ "16",
+ "34",
+ "2",
+ "7",
+ "34",
+ "1",
+ "0",
+ "256",
+ "1",
+ "7",
+ "256",
+ "1"
+ ],
"android.request.recommendedTenBitDynamicRangeProfile": [
"2"
- ],
+ ],
"android.request.maxNumInputStreams": [
"1"
- ],
+ ],
"android.scaler.availableInputOutputFormatsMap": [
- "34",
- "2",
- "33",
- "35",
- "35",
- "2",
- "33",
+ "34",
+ "2",
+ "33",
+ "35",
+ "35",
+ "2",
+ "33",
"35"
- ],
+ ],
+ "android.scaler.availableStreamUseCases": [
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ ],
"android.scaler.availableInputOutputFormatsMapMaximumResolution" : [
"32",
"3",
"32",
"33",
"35",
- ],
+ ],
"android.reprocess.maxCaptureStall": [
"2"
- ],
+ ],
"android.request.availableCharacteristicsKeys": [
- "4",
- "65554",
- "65555",
- "65556",
- "65557",
- "65558",
- "65559",
- "65560",
- "65561",
- "65562",
- "65563",
- "65564",
- "65565",
- "65571",
- "65572",
- "65573",
- "65574",
- "65575",
- "65579",
- "65580",
- "65582",
- "1638402",
- "1638401",
- "1638403",
- "1638404",
- "1769473",
- "196610",
- "327680",
- "393217",
- "458759",
- "458760",
- "589824",
- "589825",
- "589826",
- "589827",
- "589828",
- "589829",
- "589830",
- "589831",
- "524293",
- "1703936",
- "1703937",
- "1703938",
- "655362",
- "786438",
- "786440",
- "786442",
- "786443",
- "786444",
- "786445",
- "786446",
- "786447",
- "786448",
- "851972",
- "851977",
- "851978",
- "851979",
- "851976",
- "851980",
- "851981",
- "983040",
- "917526",
- "917523",
- "917534",
- "983041",
- "983042",
- "983043",
- "983044",
- "983045",
- "983046",
- "983047",
- "983048",
- "983049",
- "983050",
- "917507",
- "917508",
- "917509",
- "917510",
- "917511",
- "917512",
- "917513",
- "917514",
- "917516",
- "917517",
- "917518",
- "917519",
- "917529",
- "1048578",
- "1179648",
- "1179650",
- "1179654",
- "1179655",
- "1179656",
- "1245188",
- "1245189",
- "1376256",
- "1507329",
- "1572865",
- "524300",
- "524301",
- "524295",
- "524294",
- "524298",
+ "4",
+ "65554",
+ "65555",
+ "65556",
+ "65557",
+ "65558",
+ "65559",
+ "65560",
+ "65561",
+ "65562",
+ "65563",
+ "65564",
+ "65565",
+ "65571",
+ "65572",
+ "65573",
+ "65574",
+ "65575",
+ "65579",
+ "65580",
+ "65582",
+ "65589",
+ "65592",
+ "1638402",
+ "1638401",
+ "1638403",
+ "1638404",
+ "1769473",
+ "196610",
+ "327680",
+ "393217",
+ "458759",
+ "458760",
+ "589824",
+ "589825",
+ "589826",
+ "589827",
+ "589828",
+ "589829",
+ "589830",
+ "589831",
+ "524293",
+ "1703936",
+ "1703937",
+ "1703938",
+ "655362",
+ "786438",
+ "786440",
+ "786442",
+ "786443",
+ "786444",
+ "786445",
+ "786446",
+ "786447",
+ "786448",
+ "851972",
+ "851977",
+ "851978",
+ "851979",
+ "851976",
+ "851980",
+ "851981",
+ "983040",
+ "917526",
+ "917523",
+ "917534",
+ "983041",
+ "983042",
+ "983043",
+ "983044",
+ "983045",
+ "983046",
+ "983047",
+ "983048",
+ "983049",
+ "983050",
+ "917507",
+ "917508",
+ "917509",
+ "917510",
+ "917511",
+ "917512",
+ "917513",
+ "917514",
+ "917516",
+ "917517",
+ "917518",
+ "917519",
+ "917529",
+ "1048578",
+ "1179648",
+ "1179650",
+ "1179654",
+ "1179655",
+ "1179656",
+ "1245188",
+ "1245189",
+ "1376256",
+ "1507329",
+ "1572865",
+ "524300",
+ "524301",
+ "524295",
+ "524294",
+ "524298",
"851984"
- ],
+ ],
"android.request.availableRequestKeys": [
- "0",
- "1",
- "2",
- "3",
- "65536",
- "65537",
- "65538",
- "65539",
- "65540",
- "65541",
- "65542",
- "65543",
- "65544",
- "65545",
- "65546",
- "65547",
- "65549",
- "65550",
- "65551",
- "65552",
- "65553",
- "65576",
- "65581",
- "65583",
- "1769472",
- "196608",
- "262146",
- "393216",
- "458752",
- "458753",
- "458754",
- "458755",
- "458756",
- "458757",
- "458758",
- "524288",
- "524289",
- "524290",
- "524291",
- "524292",
- "655360",
- "786433",
- "851968",
- "917504",
- "917505",
- "917506",
- "917520",
- "1048576",
- "1114112",
- "1114115",
- "1114128",
- "1114129",
- "1245184",
- "1245185",
- "1245186",
- "1245187",
- "1441792",
+ "0",
+ "1",
+ "2",
+ "3",
+ "65536",
+ "65537",
+ "65538",
+ "65539",
+ "65540",
+ "65541",
+ "65542",
+ "65543",
+ "65544",
+ "65545",
+ "65546",
+ "65547",
+ "65549",
+ "65550",
+ "65551",
+ "65552",
+ "65553",
+ "65576",
+ "65581",
+ "65583",
+ "65588",
+ "65591",
+ "1769472",
+ "196608",
+ "262146",
+ "393216",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "458756",
+ "458757",
+ "458758",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524292",
+ "655360",
+ "786433",
+ "851968",
+ "917504",
+ "917505",
+ "917506",
+ "917520",
+ "1048576",
+ "1114112",
+ "1114115",
+ "1114128",
+ "1114129",
+ "1245184",
+ "1245185",
+ "1245186",
+ "1245187",
+ "1441792",
"851985",
"917536"
- ],
+ ],
"android.request.availableResultKeys": [
- "0",
- "1",
- "2",
- "65537",
- "65539",
- "65540",
- "65538",
- "65567",
- "65543",
- "65544",
- "65568",
- "65547",
- "65570",
- "65551",
- "65576",
- "65581",
- "65583",
- "196608",
- "262146",
- "262149",
- "458752",
- "458753",
- "458754",
- "458755",
- "458756",
- "458757",
- "458758",
- "524288",
- "524289",
- "524290",
- "524291",
- "524296",
- "524297",
- "524294",
- "524295",
- "524298",
- "524301",
- "524292",
- "655360",
- "786433",
- "851968",
- "917526",
- "917523",
- "917504",
- "917505",
- "917506",
- "917520",
- "917522",
- "917525",
- "1048576",
- "1114112",
- "1114121",
- "1114124",
- "1114125",
- "1114126",
- "1114118",
- "1114119",
- "1114129",
- "1114130",
- "1114131",
- "1114132",
- "1245184",
- "1245185",
- "1245186",
- "1245187",
- "1441792",
- "65541",
- "65542",
- "65545",
- "65552",
+ "0",
+ "1",
+ "2",
+ "65537",
+ "65539",
+ "65540",
+ "65538",
+ "65567",
+ "65543",
+ "65544",
+ "65568",
+ "65547",
+ "65570",
+ "65551",
+ "65576",
+ "65581",
+ "65583",
+ "65588",
+ "65590",
+ "65591",
+ "65593",
+ "196608",
+ "262146",
+ "262149",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "458756",
+ "458757",
+ "458758",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524296",
+ "524297",
+ "524294",
+ "524295",
+ "524298",
+ "524301",
+ "524292",
+ "655360",
+ "786433",
+ "851968",
+ "917526",
+ "917523",
+ "917504",
+ "917505",
+ "917506",
+ "917520",
+ "917522",
+ "917525",
+ "1048576",
+ "1114112",
+ "1114121",
+ "1114124",
+ "1114125",
+ "1114126",
+ "1114118",
+ "1114119",
+ "1114129",
+ "1114130",
+ "1114131",
+ "1114132",
+ "1245184",
+ "1245185",
+ "1245186",
+ "1245187",
+ "1441792",
+ "65541",
+ "65542",
+ "65545",
+ "65552",
"1114123",
- "1703938",
- "917530",
+ "1703938",
+ "917530",
"851985",
"917536"
- ],
+ ],
"android.request.maxNumOutputStreams": [
- "1",
- "3",
+ "1",
+ "3",
"2"
- ],
+ ],
"android.scaler.availableRotateAndCropModes": [
"0"
- ],
+ ],
"android.request.partialResultCount": [
"1"
- ],
+ ],
"android.request.pipelineMaxDepth": [
"8"
- ],
+ ],
"android.scaler.availableMaxDigitalZoom": [
"8.00000000"
- ],
+ ],
"android.scaler.availableMinFrameDurations": [
- "54",
- "1920",
- "1440",
- "33331760",
- "54",
- "1920",
- "1080",
- "33331760",
- "54",
- "1920",
- "960",
- "33331760",
- "54",
- "1600",
- "1200",
- "33331760",
- "54",
- "1440",
- "1080",
- "33331760",
- "54",
- "1280",
- "960",
- "33331760",
- "54",
- "1280",
- "720",
- "33331760",
- "54",
- "1024",
- "768",
- "33331760",
- "54",
- "800",
- "600",
- "33331760",
- "54",
- "720",
- "480",
- "33331760",
- "54",
- "640",
- "480",
- "33331760",
- "54",
- "640",
- "360",
- "33331760",
- "54",
- "352",
- "288",
- "33331760",
- "54",
- "320",
- "240",
- "33331760",
- "54",
- "176",
- "144",
- "33331760",
+ "54",
+ "1920",
+ "1440",
+ "33331760",
+ "54",
+ "1920",
+ "1080",
+ "33331760",
+ "54",
+ "1920",
+ "960",
+ "33331760",
+ "54",
+ "1600",
+ "1200",
+ "33331760",
+ "54",
+ "1440",
+ "1080",
+ "33331760",
+ "54",
+ "1280",
+ "960",
+ "33331760",
+ "54",
+ "1280",
+ "720",
+ "33331760",
+ "54",
+ "1024",
+ "768",
+ "33331760",
+ "54",
+ "800",
+ "600",
+ "33331760",
+ "54",
+ "720",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "360",
+ "33331760",
+ "54",
+ "352",
+ "288",
+ "33331760",
+ "54",
+ "320",
+ "240",
+ "33331760",
+ "54",
+ "176",
+ "144",
+ "33331760",
"32",
"1920",
"1440",
"33331760",
- "34",
- "1920",
- "1440",
- "33331760",
- "35",
- "1920",
- "1440",
- "33331760",
- "33",
- "1920",
- "1440",
- "33331760",
- "34",
- "1920",
- "1080",
- "33331760",
- "35",
- "1920",
- "1080",
- "33331760",
- "33",
- "1920",
- "1080",
- "33331760",
- "34",
- "1920",
- "960",
- "33331760",
- "35",
- "1920",
- "960",
- "33331760",
- "33",
- "1920",
- "960",
- "33331760",
- "34",
- "1600",
- "1200",
- "33331760",
- "35",
- "1600",
- "1200",
- "33331760",
- "33",
- "1600",
- "1200",
- "33331760",
- "34",
- "1440",
- "1080",
- "33331760",
- "35",
- "1440",
- "1080",
- "33331760",
- "33",
- "1440",
- "1080",
- "33331760",
- "34",
- "1280",
- "960",
- "33331760",
- "35",
- "1280",
- "960",
- "33331760",
- "33",
- "1280",
- "960",
- "33331760",
- "34",
- "1280",
- "720",
- "33331760",
- "35",
- "1280",
- "720",
- "33331760",
- "33",
- "1280",
- "720",
- "33331760",
- "34",
- "1024",
- "768",
- "33331760",
- "35",
- "1024",
- "768",
- "33331760",
- "33",
- "1024",
- "768",
- "33331760",
- "34",
- "800",
- "600",
- "33331760",
- "35",
- "800",
- "600",
- "33331760",
- "33",
- "800",
- "600",
- "33331760",
- "34",
- "720",
- "480",
- "33331760",
- "35",
- "720",
- "480",
- "33331760",
- "33",
- "720",
- "480",
- "33331760",
- "34",
- "640",
- "480",
- "33331760",
- "35",
- "640",
- "480",
- "33331760",
- "33",
- "640",
- "480",
- "33331760",
- "34",
- "640",
- "360",
- "33331760",
- "35",
- "640",
- "360",
- "33331760",
- "33",
- "640",
- "360",
- "33331760",
- "34",
- "352",
- "288",
- "33331760",
- "35",
- "352",
- "288",
- "33331760",
- "33",
- "352",
- "288",
- "33331760",
- "34",
- "320",
- "240",
- "33331760",
- "35",
- "320",
- "240",
- "33331760",
- "33",
- "320",
- "240",
- "33331760",
- "34",
- "176",
- "144",
- "33331760",
- "35",
- "176",
- "144",
- "33331760",
- "33",
- "176",
- "144",
+ "34",
+ "1920",
+ "1440",
+ "33331760",
+ "35",
+ "1920",
+ "1440",
+ "33331760",
+ "33",
+ "1920",
+ "1440",
+ "33331760",
+ "34",
+ "1920",
+ "1080",
+ "33331760",
+ "35",
+ "1920",
+ "1080",
+ "33331760",
+ "33",
+ "1920",
+ "1080",
+ "33331760",
+ "34",
+ "1920",
+ "960",
+ "33331760",
+ "35",
+ "1920",
+ "960",
+ "33331760",
+ "33",
+ "1920",
+ "960",
+ "33331760",
+ "34",
+ "1600",
+ "1200",
+ "33331760",
+ "35",
+ "1600",
+ "1200",
+ "33331760",
+ "33",
+ "1600",
+ "1200",
+ "33331760",
+ "34",
+ "1440",
+ "1080",
+ "33331760",
+ "35",
+ "1440",
+ "1080",
+ "33331760",
+ "33",
+ "1440",
+ "1080",
+ "33331760",
+ "34",
+ "1280",
+ "960",
+ "33331760",
+ "35",
+ "1280",
+ "960",
+ "33331760",
+ "33",
+ "1280",
+ "960",
+ "33331760",
+ "34",
+ "1280",
+ "720",
+ "33331760",
+ "35",
+ "1280",
+ "720",
+ "33331760",
+ "33",
+ "1280",
+ "720",
+ "33331760",
+ "34",
+ "1024",
+ "768",
+ "33331760",
+ "35",
+ "1024",
+ "768",
+ "33331760",
+ "33",
+ "1024",
+ "768",
+ "33331760",
+ "34",
+ "800",
+ "600",
+ "33331760",
+ "35",
+ "800",
+ "600",
+ "33331760",
+ "33",
+ "800",
+ "600",
+ "33331760",
+ "34",
+ "720",
+ "480",
+ "33331760",
+ "35",
+ "720",
+ "480",
+ "33331760",
+ "33",
+ "720",
+ "480",
+ "33331760",
+ "34",
+ "640",
+ "480",
+ "33331760",
+ "35",
+ "640",
+ "480",
+ "33331760",
+ "33",
+ "640",
+ "480",
+ "33331760",
+ "34",
+ "640",
+ "360",
+ "33331760",
+ "35",
+ "640",
+ "360",
+ "33331760",
+ "33",
+ "640",
+ "360",
+ "33331760",
+ "34",
+ "352",
+ "288",
+ "33331760",
+ "35",
+ "352",
+ "288",
+ "33331760",
+ "33",
+ "352",
+ "288",
+ "33331760",
+ "34",
+ "320",
+ "240",
+ "33331760",
+ "35",
+ "320",
+ "240",
+ "33331760",
+ "33",
+ "320",
+ "240",
+ "33331760",
+ "34",
+ "176",
+ "144",
+ "33331760",
+ "35",
+ "176",
+ "144",
+ "33331760",
+ "33",
+ "176",
+ "144",
"33331760"
- ],
+ ],
"android.scaler.availableMinFrameDurationsMaximumResolution": [
"32",
"6048",
@@ -862,67 +914,67 @@
"1920",
"1440",
"17971200",
- "33",
- "1920",
- "1440",
- "17971200",
- "33",
- "1920",
- "1080",
- "13478400",
- "33",
- "1920",
- "960",
- "11980800",
- "33",
- "1600",
- "1200",
- "12480000",
- "33",
- "1440",
- "1080",
- "10108800",
- "33",
- "1280",
- "960",
- "7987200",
- "33",
- "1280",
- "720",
- "5990400",
- "33",
- "1024",
- "768",
- "5111808",
- "33",
- "800",
- "600",
- "3120000",
- "33",
- "720",
- "480",
- "2246400",
- "33",
- "640",
- "480",
- "1996800",
- "33",
- "640",
- "360",
- "1497600",
- "33",
- "352",
- "288",
- "658944",
- "33",
- "320",
- "240",
- "499200",
- "33",
- "176",
- "144",
+ "33",
+ "1920",
+ "1440",
+ "17971200",
+ "33",
+ "1920",
+ "1080",
+ "13478400",
+ "33",
+ "1920",
+ "960",
+ "11980800",
+ "33",
+ "1600",
+ "1200",
+ "12480000",
+ "33",
+ "1440",
+ "1080",
+ "10108800",
+ "33",
+ "1280",
+ "960",
+ "7987200",
+ "33",
+ "1280",
+ "720",
+ "5990400",
+ "33",
+ "1024",
+ "768",
+ "5111808",
+ "33",
+ "800",
+ "600",
+ "3120000",
+ "33",
+ "720",
+ "480",
+ "2246400",
+ "33",
+ "640",
+ "480",
+ "1996800",
+ "33",
+ "640",
+ "360",
+ "1497600",
+ "33",
+ "352",
+ "288",
+ "658944",
+ "33",
+ "320",
+ "240",
+ "499200",
+ "33",
+ "176",
+ "144",
"164736"
- ],
+ ],
"android.scaler.availableStallDurationsMaximumResolution": [
"32",
"6048",
@@ -934,255 +986,255 @@
"287539200"
],
"android.scaler.availableStreamConfigurations": [
- "54",
- "1920",
- "1440",
- "OUTPUT",
- "54",
- "1920",
- "1080",
- "OUTPUT",
- "54",
- "1920",
- "960",
- "OUTPUT",
- "54",
- "1600",
- "1200",
- "OUTPUT",
- "54",
- "1440",
- "1080",
- "OUTPUT",
- "54",
- "1280",
- "960",
- "OUTPUT",
- "54",
- "1280",
- "720",
- "OUTPUT",
- "54",
- "1024",
- "768",
- "OUTPUT",
- "54",
- "800",
- "600",
- "OUTPUT",
- "54",
- "720",
- "480",
- "OUTPUT",
- "54",
- "640",
- "480",
- "OUTPUT",
- "54",
- "640",
- "360",
- "OUTPUT",
- "54",
- "352",
- "288",
- "OUTPUT",
- "54",
- "320",
- "240",
- "OUTPUT",
- "54",
- "176",
- "144",
- "OUTPUT",
+ "54",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "54",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "54",
+ "1920",
+ "960",
+ "OUTPUT",
+ "54",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "54",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "54",
+ "1280",
+ "960",
+ "OUTPUT",
+ "54",
+ "1280",
+ "720",
+ "OUTPUT",
+ "54",
+ "1024",
+ "768",
+ "OUTPUT",
+ "54",
+ "800",
+ "600",
+ "OUTPUT",
+ "54",
+ "720",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "360",
+ "OUTPUT",
+ "54",
+ "352",
+ "288",
+ "OUTPUT",
+ "54",
+ "320",
+ "240",
+ "OUTPUT",
+ "54",
+ "176",
+ "144",
+ "OUTPUT",
"32",
"1920",
"1440",
"OUTPUT",
- "35",
- "1920",
- "1440",
- "INPUT",
- "35",
- "1920",
- "1440",
- "OUTPUT",
- "35",
- "1920",
- "1080",
- "OUTPUT",
- "35",
- "1920",
- "960",
- "OUTPUT",
- "35",
- "1600",
- "1200",
- "OUTPUT",
- "35",
- "1440",
- "1080",
- "OUTPUT",
- "35",
- "1280",
- "960",
- "OUTPUT",
- "35",
- "1280",
- "720",
- "OUTPUT",
- "35",
- "1024",
- "768",
- "OUTPUT",
- "35",
- "800",
- "600",
- "OUTPUT",
- "35",
- "720",
- "480",
- "OUTPUT",
- "35",
- "640",
- "480",
- "OUTPUT",
- "35",
- "640",
- "360",
- "OUTPUT",
- "35",
- "352",
- "288",
- "OUTPUT",
- "35",
- "320",
- "240",
- "OUTPUT",
- "35",
- "176",
- "144",
- "OUTPUT",
- "34",
- "1920",
- "1440",
- "INPUT",
- "34",
- "1920",
- "1440",
- "OUTPUT",
- "34",
- "1920",
- "1080",
- "OUTPUT",
- "34",
- "1920",
- "960",
- "OUTPUT",
- "34",
- "1600",
- "1200",
- "OUTPUT",
- "34",
- "1440",
- "1080",
- "OUTPUT",
- "34",
- "1280",
- "960",
- "OUTPUT",
- "34",
- "1280",
- "720",
- "OUTPUT",
- "34",
- "1024",
- "768",
- "OUTPUT",
- "34",
- "800",
- "600",
- "OUTPUT",
- "34",
- "720",
- "480",
- "OUTPUT",
- "34",
- "640",
- "480",
- "OUTPUT",
- "34",
- "640",
- "360",
- "OUTPUT",
- "34",
- "352",
- "288",
- "OUTPUT",
- "34",
- "320",
- "240",
- "OUTPUT",
- "34",
- "176",
- "144",
- "OUTPUT",
- "33",
- "1920",
- "1440",
- "OUTPUT",
- "33",
- "1920",
- "1080",
- "OUTPUT",
- "33",
- "1920",
- "960",
- "OUTPUT",
- "33",
- "1600",
- "1200",
- "OUTPUT",
- "33",
- "1440",
- "1080",
- "OUTPUT",
- "33",
- "1280",
- "960",
- "OUTPUT",
- "33",
- "1280",
- "720",
- "OUTPUT",
- "33",
- "1024",
- "768",
- "OUTPUT",
- "33",
- "800",
- "600",
- "OUTPUT",
- "33",
- "720",
- "480",
- "OUTPUT",
- "33",
- "640",
- "480",
- "OUTPUT",
- "33",
- "640",
- "360",
- "OUTPUT",
- "33",
- "352",
- "288",
- "OUTPUT",
- "33",
- "320",
- "240",
+ "35",
+ "1920",
+ "1440",
+ "INPUT",
+ "35",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "35",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "35",
+ "1920",
+ "960",
+ "OUTPUT",
+ "35",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "35",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "35",
+ "1280",
+ "960",
+ "OUTPUT",
+ "35",
+ "1280",
+ "720",
+ "OUTPUT",
+ "35",
+ "1024",
+ "768",
+ "OUTPUT",
+ "35",
+ "800",
+ "600",
+ "OUTPUT",
+ "35",
+ "720",
+ "480",
+ "OUTPUT",
+ "35",
+ "640",
+ "480",
+ "OUTPUT",
+ "35",
+ "640",
+ "360",
+ "OUTPUT",
+ "35",
+ "352",
+ "288",
+ "OUTPUT",
+ "35",
+ "320",
+ "240",
+ "OUTPUT",
+ "35",
+ "176",
+ "144",
+ "OUTPUT",
+ "34",
+ "1920",
+ "1440",
+ "INPUT",
+ "34",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "34",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "34",
+ "1920",
+ "960",
+ "OUTPUT",
+ "34",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "34",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "34",
+ "1280",
+ "960",
+ "OUTPUT",
+ "34",
+ "1280",
+ "720",
+ "OUTPUT",
+ "34",
+ "1024",
+ "768",
+ "OUTPUT",
+ "34",
+ "800",
+ "600",
+ "OUTPUT",
+ "34",
+ "720",
+ "480",
+ "OUTPUT",
+ "34",
+ "640",
+ "480",
+ "OUTPUT",
+ "34",
+ "640",
+ "360",
+ "OUTPUT",
+ "34",
+ "352",
+ "288",
+ "OUTPUT",
+ "34",
+ "320",
+ "240",
+ "OUTPUT",
+ "34",
+ "176",
+ "144",
+ "OUTPUT",
+ "33",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "33",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "33",
+ "1920",
+ "960",
+ "OUTPUT",
+ "33",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "33",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "33",
+ "1280",
+ "960",
+ "OUTPUT",
+ "33",
+ "1280",
+ "720",
+ "OUTPUT",
+ "33",
+ "1024",
+ "768",
+ "OUTPUT",
+ "33",
+ "800",
+ "600",
+ "OUTPUT",
+ "33",
+ "720",
+ "480",
+ "OUTPUT",
+ "33",
+ "640",
+ "480",
+ "OUTPUT",
+ "33",
+ "640",
+ "360",
+ "OUTPUT",
+ "33",
+ "352",
+ "288",
+ "OUTPUT",
+ "33",
+ "320",
+ "240",
"OUTPUT"
- ],
+ ],
"android.scaler.availableStreamConfigurationsMaximumResolution": [
"32",
"6048",
@@ -1192,578 +1244,582 @@
"6048",
"4024",
"OUTPUT",
- "33",
- "6048",
- "4024",
+ "33",
+ "6048",
+ "4024",
"OUTPUT",
- "35",
- "6048",
- "4024",
+ "35",
+ "6048",
+ "4024",
"OUTPUT"
],
"android.scaler.croppingType": [
"CENTER_ONLY"
- ],
+ ],
"android.scaler.multiResolutionStreamSupported": [
"TRUE"
],
"android.sensor.availableTestPatternModes": [
- "0",
+ "0",
"5"
- ],
+ ],
"android.sensor.blackLevelPattern": [
- "64",
- "64",
- "64",
+ "64",
+ "64",
+ "64",
"64"
- ],
+ ],
"android.sensor.calibrationTransform1": [
- "58",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "85",
+ "58",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "85",
"128"
- ],
+ ],
"android.sensor.calibrationTransform2": [
- "84",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "45",
+ "84",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "45",
"128"
- ],
+ ],
"android.sensor.colorTransform1": [
- "221",
- "128",
- "-105",
- "128",
- "-34",
- "128",
- "-124",
- "128",
- "240",
- "128",
- "5",
- "128",
- "5",
- "128",
- "-19",
- "128",
- "99",
+ "221",
+ "128",
+ "-105",
+ "128",
+ "-34",
+ "128",
+ "-124",
+ "128",
+ "240",
+ "128",
+ "5",
+ "128",
+ "5",
+ "128",
+ "-19",
+ "128",
+ "99",
"128"
- ],
+ ],
"android.sensor.colorTransform2": [
- "360",
- "128",
- "-249",
- "128",
- "-63",
- "128",
- "-137",
- "128",
- "279",
- "128",
- "-1",
- "128",
- "7",
- "128",
- "-18",
- "128",
- "159",
+ "360",
+ "128",
+ "-249",
+ "128",
+ "-63",
+ "128",
+ "-137",
+ "128",
+ "279",
+ "128",
+ "-1",
+ "128",
+ "7",
+ "128",
+ "-18",
+ "128",
+ "159",
"128"
- ],
+ ],
"android.sensor.forwardMatrix1": [
- "56",
- "128",
- "49",
- "128",
- "18",
- "128",
- "28",
- "128",
- "92",
- "128",
- "8",
- "128",
- "2",
- "128",
- "12",
- "128",
- "91",
+ "56",
+ "128",
+ "49",
+ "128",
+ "18",
+ "128",
+ "28",
+ "128",
+ "92",
+ "128",
+ "8",
+ "128",
+ "2",
+ "128",
+ "12",
+ "128",
+ "91",
"128"
- ],
+ ],
"android.sensor.forwardMatrix2": [
- "56",
- "128",
- "49",
- "128",
- "18",
- "128",
- "28",
- "128",
- "92",
- "128",
- "8",
- "128",
- "2",
- "128",
- "12",
- "128",
- "91",
+ "56",
+ "128",
+ "49",
+ "128",
+ "18",
+ "128",
+ "28",
+ "128",
+ "92",
+ "128",
+ "8",
+ "128",
+ "2",
+ "128",
+ "12",
+ "128",
+ "91",
"128"
- ],
+ ],
"android.sensor.info.activeArraySize": [
- "0",
- "0",
- "1920",
+ "0",
+ "0",
+ "1920",
"1440"
- ],
+ ],
"android.sensor.info.activeArraySizeMaximumResolution": [
- "0",
- "0",
- "6048",
+ "0",
+ "0",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.colorFilterArrangement": [
"RGGB"
- ],
+ ],
"android.sensor.info.exposureTimeRange": [
- "13611",
+ "13611",
"10319000832"
- ],
+ ],
"android.sensor.info.lensShadingApplied": [
"TRUE"
- ],
+ ],
"android.sensor.info.maxFrameDuration": [
"1319055264"
- ],
+ ],
"android.sensor.info.physicalSize": [
- "5.64480019",
+ "5.64480019",
"4.23360014"
- ],
+ ],
"android.sensor.info.pixelArraySize": [
- "1920",
+ "1920",
"1440"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySize": [
- "0",
- "0",
- "1920",
+ "0",
+ "0",
+ "1920",
"1440"
- ],
+ ],
"android.sensor.info.pixelArraySizeMaximumResolution": [
- "6048",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.binningFactor": [
"2",
"2"
],
"android.sensor.info.preCorrectionActiveArraySizeMaximumResolution": [
- "0",
- "0",
- "6048",
+ "0",
+ "0",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.sensitivityRange": [
- "100",
+ "100",
"1000"
- ],
+ ],
"android.sensor.info.timestampSource": [
"REALTIME"
- ],
+ ],
"android.sensor.info.whiteLevel": [
"1023"
- ],
+ ],
"android.sensor.maxAnalogSensitivity": [
"444"
- ],
+ ],
"android.sensor.orientation": [
"270"
- ],
+ ],
"android.sensor.profileHueSatMapDimensions": [
- "0",
- "0",
+ "0",
+ "0",
"0"
- ],
+ ],
"android.sensor.referenceIlluminant1": [
"D65"
- ],
+ ],
"android.sensor.referenceIlluminant2": [
"17"
- ],
+ ],
"android.shading.availableModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableFaceDetectModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableHotPixelMapModes": [
"0"
- ],
+ ],
"android.statistics.info.availableLensShadingMapModes": [
"0",
"1"
- ],
+ ],
"android.statistics.info.maxFaceCount": [
"10"
- ],
+ ],
"android.info.supportedBufferManagementVersion" : [
- "HIDL_DEVICE_3_5"
- ],
+ "HIDL_DEVICE_3_5"
+ ],
"android.sync.maxLatency": [
"PER_FRAME_CONTROL"
- ],
+ ],
"android.tonemap.availableToneMapModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.tonemap.maxCurvePoints": [
"64"
]
- },
+ },
{
"android.colorCorrection.availableAberrationModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.control.aeAvailableAntibandingModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3"
- ],
+ ],
"android.control.aeAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.aeAvailableTargetFpsRanges": [
- "15",
- "15",
- "7",
- "30",
- "15",
- "30",
- "30",
+ "15",
+ "15",
+ "7",
+ "30",
+ "15",
+ "30",
+ "30",
"30"
- ],
+ ],
"android.control.aeCompensationRange": [
- "-24",
+ "-24",
"24"
- ],
+ ],
"android.control.aeCompensationStep": [
- "1",
+ "1",
"6"
- ],
+ ],
"android.control.aeLockAvailable": [
"TRUE"
- ],
+ ],
"android.control.afAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.availableExtendedSceneModeMaxSizes": [
- "0",
- "0",
- "0",
- "1",
- "1920",
- "1080",
- "2",
- "1920",
- "1440"
- ],
+ "0",
+ "0",
+ "0",
+ "1",
+ "1920",
+ "1080",
+ "2",
+ "1920",
+ "1440"
+ ],
"android.control.availableExtendedSceneModeZoomRatioRanges": [
- "2.0",
- "2.0",
- "1.0",
+ "2.0",
+ "2.0",
+ "1.0",
"1.0"
- ],
+ ],
"android.control.availableEffects": [
"0"
- ],
+ ],
"android.control.availableModes": [
- "0",
- "1",
+ "0",
+ "1",
"2",
"4"
- ],
+ ],
"android.control.availableSceneModes": [
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "12",
- "13",
- "14",
- "15",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "12",
+ "13",
+ "14",
+ "15",
"18"
- ],
+ ],
+ "android.control.availableSettingsOverrides": [
+ "0",
+ "1"
+ ],
"android.control.availableVideoStabilizationModes": [
"0"
- ],
+ ],
"android.control.awbAvailableModes": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
"0"
- ],
+ ],
"android.control.awbLockAvailable": [
"TRUE"
- ],
+ ],
"android.control.maxRegions": [
- "1",
- "0",
+ "1",
+ "0",
"1"
- ],
+ ],
"android.control.postRawSensitivityBoostRange": [
- "100",
+ "100",
"100"
- ],
+ ],
"android.control.sceneModeOverrides": [
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
"0"
- ],
+ ],
"android.control.zoomRatioRange": [
- "1.0",
- "8.0"
- ],
+ "1.0",
+ "8.0"
+ ],
"android.distortionCorrection.availableModes": [
"0"
- ],
+ ],
"android.edge.availableEdgeModes": [
- "1",
- "2",
- "0",
- "3"
- ],
+ "1",
+ "2",
+ "0",
+ "3"
+ ],
"android.flash.info.available": [
"TRUE"
- ],
+ ],
"android.hotPixel.availableHotPixelModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.info.supportedHardwareLevel": [
"FULL"
- ],
+ ],
"android.jpeg.availableThumbnailSizes": [
- "0",
- "0",
- "176",
- "144",
- "240",
- "144",
- "256",
- "144",
- "240",
- "160",
- "256",
- "154",
- "246",
- "184",
- "240",
- "240",
- "320",
+ "0",
+ "0",
+ "176",
+ "144",
+ "240",
+ "144",
+ "256",
+ "144",
+ "240",
+ "160",
+ "256",
+ "154",
+ "246",
+ "184",
+ "240",
+ "240",
+ "320",
"240"
- ],
+ ],
"android.jpeg.maxSize": [
"3000000"
- ],
+ ],
"android.lens.distortion": [
- "0.08807813",
- "-0.22617353",
- "0.16460505",
- "0.00000000",
+ "0.08807813",
+ "-0.22617353",
+ "0.16460505",
+ "0.00000000",
"0.00000000"
- ],
+ ],
"android.lens.facing": [
"FRONT"
- ],
+ ],
"android.lens.info.availableApertures": [
"1.73000002"
- ],
+ ],
"android.lens.info.availableFilterDensities": [
"0.00000000"
- ],
+ ],
"android.lens.info.availableFocalLengths": [
"4.38000011"
- ],
+ ],
"android.lens.info.availableOpticalStabilization": [
- "0",
+ "0",
"1"
- ],
+ ],
"android.lens.info.focusDistanceCalibration": [
"APPROXIMATE"
- ],
+ ],
"android.lens.info.hyperfocalDistance": [
"0.25249681"
- ],
+ ],
"android.lens.info.minimumFocusDistance": [
"10.20408154"
- ],
+ ],
"android.lens.info.shadingMapSize": [
- "17",
+ "17",
"13"
- ],
+ ],
"android.lens.intrinsicCalibration": [
- "3225.77416992",
- "3225.77416992",
- "960.50427246",
- "540.46704102",
+ "3225.77416992",
+ "3225.77416992",
+ "960.50427246",
+ "540.46704102",
"0.00000000"
- ],
+ ],
"android.lens.poseReference": [
"PRIMARY_CAMERA"
- ],
+ ],
"android.lens.poseRotation": [
- "0.00000000",
- "0.00000000",
- "0.00000000",
+ "0.00000000",
+ "0.00000000",
+ "0.00000000",
"1.00000000"
- ],
+ ],
"android.lens.poseTranslation": [
- "-0.00000000",
- "-0.00000000",
+ "-0.00000000",
+ "-0.00000000",
"-0.00000000"
- ],
+ ],
"android.noiseReduction.availableNoiseReductionModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.request.availableCapabilities": [
- "BACKWARD_COMPATIBLE",
- "READ_SENSOR_SETTINGS",
- "MANUAL_SENSOR",
- "BURST_CAPTURE",
+ "BACKWARD_COMPATIBLE",
+ "READ_SENSOR_SETTINGS",
+ "MANUAL_SENSOR",
+ "BURST_CAPTURE",
"MANUAL_POST_PROCESSING",
"PRIVATE_REPROCESSING",
"ULTRA_HIGH_RESOLUTION_SENSOR",
- "YUV_REPROCESSING",
+ "YUV_REPROCESSING",
"RAW",
- "REMOSAIC_REPROCESSING",
+ "REMOSAIC_REPROCESSING",
"DYNAMIC_RANGE_TEN_BIT"
- ],
+ ],
"android.request.availableDynamicRangeProfilesMap": [
- "2",
- "2",
+ "2",
+ "2",
"0"
- ],
+ ],
"android.request.recommendedTenBitDynamicRangeProfile": [
"2"
- ],
+ ],
"android.request.maxNumInputStreams": [
"1"
- ],
+ ],
"android.scaler.availableInputOutputFormatsMap": [
- "34",
- "2",
- "33",
- "35",
- "35",
- "2",
- "33",
+ "34",
+ "2",
+ "33",
+ "35",
+ "35",
+ "2",
+ "33",
"35"
- ],
+ ],
"android.scaler.availableInputOutputFormatsMapMaximumResolution" : [
"32",
"1",
@@ -1771,514 +1827,522 @@
],
"android.reprocess.maxCaptureStall": [
"2"
- ],
+ ],
"android.request.availableCharacteristicsKeys": [
- "4",
- "65554",
- "65555",
- "65556",
- "65557",
- "65558",
- "65559",
- "65560",
- "65561",
- "65562",
- "65563",
- "65564",
- "65565",
- "65571",
- "65572",
- "65573",
- "65574",
- "65575",
- "65579",
- "65580",
- "65582",
- "1638402",
- "1638401",
- "1638403",
- "1638404",
- "1769473",
- "196610",
- "327680",
- "393217",
- "458759",
- "458760",
- "589824",
- "589825",
- "589826",
- "589827",
- "589828",
- "589829",
- "589830",
- "589831",
- "524293",
- "1703936",
- "1703937",
- "1703938",
- "655362",
- "786438",
- "786440",
- "786442",
- "786443",
- "786444",
- "786445",
- "786446",
- "786447",
- "786448",
- "851972",
- "851977",
- "851978",
- "851979",
- "851976",
- "851980",
- "851981",
- "983040",
- "917526",
- "917523",
- "917534",
- "983041",
- "983042",
- "983043",
- "983044",
- "983045",
- "983046",
- "983047",
- "983048",
- "983049",
- "983050",
- "917507",
- "917508",
- "917509",
- "917510",
- "917511",
- "917512",
- "917513",
- "917514",
- "917516",
- "917517",
- "917518",
- "917519",
- "917529",
- "1048578",
- "1179648",
- "1179650",
- "1179654",
- "1179655",
- "1179656",
- "1245188",
- "1245189",
- "1376256",
- "1507329",
- "1572865",
- "524300",
- "524301",
- "524295",
- "524294",
- "524298",
- "851984",
+ "4",
+ "65554",
+ "65555",
+ "65556",
+ "65557",
+ "65558",
+ "65559",
+ "65560",
+ "65561",
+ "65562",
+ "65563",
+ "65564",
+ "65565",
+ "65571",
+ "65572",
+ "65573",
+ "65574",
+ "65575",
+ "65579",
+ "65580",
+ "65582",
+ "65589",
+ "65592",
+ "1638402",
+ "1638401",
+ "1638403",
+ "1638404",
+ "1769473",
+ "196610",
+ "327680",
+ "393217",
+ "458759",
+ "458760",
+ "589824",
+ "589825",
+ "589826",
+ "589827",
+ "589828",
+ "589829",
+ "589830",
+ "589831",
+ "524293",
+ "1703936",
+ "1703937",
+ "1703938",
+ "655362",
+ "786438",
+ "786440",
+ "786442",
+ "786443",
+ "786444",
+ "786445",
+ "786446",
+ "786447",
+ "786448",
+ "851972",
+ "851977",
+ "851978",
+ "851979",
+ "851976",
+ "851980",
+ "851981",
+ "983040",
+ "917526",
+ "917523",
+ "917534",
+ "983041",
+ "983042",
+ "983043",
+ "983044",
+ "983045",
+ "983046",
+ "983047",
+ "983048",
+ "983049",
+ "983050",
+ "917507",
+ "917508",
+ "917509",
+ "917510",
+ "917511",
+ "917512",
+ "917513",
+ "917514",
+ "917516",
+ "917517",
+ "917518",
+ "917519",
+ "917529",
+ "1048578",
+ "1179648",
+ "1179650",
+ "1179654",
+ "1179655",
+ "1179656",
+ "1245188",
+ "1245189",
+ "1376256",
+ "1507329",
+ "1572865",
+ "524300",
+ "524301",
+ "524295",
+ "524294",
+ "524298",
+ "851984",
"851986"
- ],
+ ],
"android.request.availableRequestKeys": [
- "0",
- "1",
- "2",
- "3",
- "65536",
- "65537",
- "65538",
- "65539",
- "65540",
- "65541",
- "65542",
- "65543",
- "65544",
- "65545",
- "65546",
- "65547",
- "65549",
- "65550",
- "65551",
- "65552",
- "65553",
- "65576",
- "65581",
- "65583",
- "1769472",
- "196608",
- "262146",
- "393216",
- "458752",
- "458753",
- "458754",
- "458755",
- "458756",
- "458757",
- "458758",
- "524288",
- "524289",
- "524290",
- "524291",
- "524292",
- "655360",
- "786433",
- "851968",
- "917504",
- "917505",
- "917506",
- "917520",
- "1048576",
- "1114112",
- "1114115",
- "1114128",
- "1114129",
- "1245184",
- "1245185",
- "1245186",
- "1245187",
- "1441792",
+ "0",
+ "1",
+ "2",
+ "3",
+ "65536",
+ "65537",
+ "65538",
+ "65539",
+ "65540",
+ "65541",
+ "65542",
+ "65543",
+ "65544",
+ "65545",
+ "65546",
+ "65547",
+ "65549",
+ "65550",
+ "65551",
+ "65552",
+ "65553",
+ "65576",
+ "65581",
+ "65583",
+ "65588",
+ "65591",
+ "1769472",
+ "196608",
+ "262146",
+ "393216",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "458756",
+ "458757",
+ "458758",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524292",
+ "655360",
+ "786433",
+ "851968",
+ "917504",
+ "917505",
+ "917506",
+ "917520",
+ "1048576",
+ "1114112",
+ "1114115",
+ "1114128",
+ "1114129",
+ "1245184",
+ "1245185",
+ "1245186",
+ "1245187",
+ "1441792",
"851985",
"917536"
- ],
+ ],
"android.request.availableResultKeys": [
- "0",
- "1",
- "2",
- "65537",
- "65539",
- "65540",
- "65567",
- "65543",
- "65544",
- "65568",
- "65547",
- "65538",
- "65570",
- "65551",
- "65576",
- "65581",
- "65583",
- "196608",
- "262146",
- "262149",
- "458752",
- "458753",
- "458754",
- "458755",
- "458756",
- "458757",
- "458758",
- "524288",
- "524289",
- "524290",
- "524291",
- "524296",
- "524297",
- "524294",
- "524295",
- "524298",
- "524301",
- "524292",
- "655360",
- "786433",
- "851968",
- "917526",
- "917523",
- "917504",
- "917505",
- "917506",
- "917520",
- "917522",
- "917525",
- "1048576",
- "1114112",
- "1114121",
- "1114124",
- "1114125",
- "1114126",
- "1114118",
- "1114119",
- "1114129",
- "1114130",
- "1114131",
- "1114132",
- "1245184",
- "1245185",
- "1245186",
- "1245187",
- "1441792",
+ "0",
+ "1",
+ "2",
+ "65537",
+ "65539",
+ "65540",
+ "65567",
+ "65543",
+ "65544",
+ "65568",
+ "65547",
+ "65538",
+ "65570",
+ "65551",
+ "65576",
+ "65581",
+ "65583",
+ "65588",
+ "65590",
+ "65591",
+ "65593",
+ "196608",
+ "262146",
+ "262149",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "458756",
+ "458757",
+ "458758",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524296",
+ "524297",
+ "524294",
+ "524295",
+ "524298",
+ "524301",
+ "524292",
+ "655360",
+ "786433",
+ "851968",
+ "917526",
+ "917523",
+ "917504",
+ "917505",
+ "917506",
+ "917520",
+ "917522",
+ "917525",
+ "1048576",
+ "1114112",
+ "1114121",
+ "1114124",
+ "1114125",
+ "1114126",
+ "1114118",
+ "1114119",
+ "1114129",
+ "1114130",
+ "1114131",
+ "1114132",
+ "1245184",
+ "1245185",
+ "1245186",
+ "1245187",
+ "1441792",
"65541",
"65542",
"65545",
"65552",
"1114123",
- "917530",
+ "917530",
"851985",
"917536"
- ],
+ ],
"android.request.maxNumOutputStreams": [
- "1",
- "3",
+ "1",
+ "3",
"2"
- ],
+ ],
"android.scaler.availableRotateAndCropModes": [
"0"
- ],
+ ],
"android.request.partialResultCount": [
"1"
- ],
+ ],
"android.request.pipelineMaxDepth": [
"8"
- ],
+ ],
"android.scaler.availableMaxDigitalZoom": [
"8.00000000"
- ],
+ ],
"android.scaler.availableMinFrameDurations": [
- "54",
- "1920",
- "1440",
- "33331760",
- "54",
- "1920",
- "1080",
- "33331760",
- "54",
- "1920",
- "960",
- "33331760",
- "54",
- "1600",
- "1200",
- "33331760",
- "54",
- "1440",
- "1080",
- "33331760",
- "54",
- "1280",
- "960",
- "33331760",
- "54",
- "1280",
- "720",
- "33331760",
- "54",
- "1024",
- "768",
- "33331760",
- "54",
- "800",
- "600",
- "33331760",
- "54",
- "720",
- "480",
- "33331760",
- "54",
- "640",
- "480",
- "33331760",
- "54",
- "640",
- "360",
- "33331760",
- "54",
- "352",
- "288",
- "33331760",
- "54",
- "320",
- "240",
- "33331760",
- "54",
- "176",
- "144",
- "33331760",
+ "54",
+ "1920",
+ "1440",
+ "33331760",
+ "54",
+ "1920",
+ "1080",
+ "33331760",
+ "54",
+ "1920",
+ "960",
+ "33331760",
+ "54",
+ "1600",
+ "1200",
+ "33331760",
+ "54",
+ "1440",
+ "1080",
+ "33331760",
+ "54",
+ "1280",
+ "960",
+ "33331760",
+ "54",
+ "1280",
+ "720",
+ "33331760",
+ "54",
+ "1024",
+ "768",
+ "33331760",
+ "54",
+ "800",
+ "600",
+ "33331760",
+ "54",
+ "720",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "360",
+ "33331760",
+ "54",
+ "352",
+ "288",
+ "33331760",
+ "54",
+ "320",
+ "240",
+ "33331760",
+ "54",
+ "176",
+ "144",
+ "33331760",
"32",
"1920",
"1440",
"33331760",
- "34",
- "1920",
- "1440",
- "33331760",
- "35",
- "1920",
- "1440",
- "33331760",
- "33",
- "1920",
- "1440",
- "33331760",
- "34",
- "1920",
- "1080",
- "33331760",
- "35",
- "1920",
- "1080",
- "33331760",
- "33",
- "1920",
- "1080",
- "33331760",
- "34",
- "1920",
- "960",
- "33331760",
- "35",
- "1920",
- "960",
- "33331760",
- "33",
- "1920",
- "960",
- "33331760",
- "34",
- "1600",
- "1200",
- "33331760",
- "35",
- "1600",
- "1200",
- "33331760",
- "33",
- "1600",
- "1200",
- "33331760",
- "34",
- "1440",
- "1080",
- "33331760",
- "35",
- "1440",
- "1080",
- "33331760",
- "33",
- "1440",
- "1080",
- "33331760",
- "34",
- "1280",
- "960",
- "33331760",
- "35",
- "1280",
- "960",
- "33331760",
- "33",
- "1280",
- "960",
- "33331760",
- "34",
- "1280",
- "720",
- "33331760",
- "35",
- "1280",
- "720",
- "33331760",
- "33",
- "1280",
- "720",
- "33331760",
- "34",
- "1024",
- "768",
- "33331760",
- "35",
- "1024",
- "768",
- "33331760",
- "33",
- "1024",
- "768",
- "33331760",
- "34",
- "800",
- "600",
- "33331760",
- "35",
- "800",
- "600",
- "33331760",
- "33",
- "800",
- "600",
- "33331760",
- "34",
- "720",
- "480",
- "33331760",
- "35",
- "720",
- "480",
- "33331760",
- "33",
- "720",
- "480",
- "33331760",
- "34",
- "640",
- "480",
- "33331760",
- "35",
- "640",
- "480",
- "33331760",
- "33",
- "640",
- "480",
- "33331760",
- "34",
- "640",
- "360",
- "33331760",
- "35",
- "640",
- "360",
- "33331760",
- "33",
- "640",
- "360",
- "33331760",
- "34",
- "352",
- "288",
- "33331760",
- "35",
- "352",
- "288",
- "33331760",
- "33",
- "352",
- "288",
- "33331760",
- "34",
- "320",
- "240",
- "33331760",
- "35",
- "320",
- "240",
- "33331760",
- "33",
- "320",
- "240",
- "33331760",
- "34",
- "176",
- "144",
- "33331760",
- "35",
- "176",
- "144",
- "33331760",
- "33",
- "176",
- "144",
+ "34",
+ "1920",
+ "1440",
+ "33331760",
+ "35",
+ "1920",
+ "1440",
+ "33331760",
+ "33",
+ "1920",
+ "1440",
+ "33331760",
+ "34",
+ "1920",
+ "1080",
+ "33331760",
+ "35",
+ "1920",
+ "1080",
+ "33331760",
+ "33",
+ "1920",
+ "1080",
+ "33331760",
+ "34",
+ "1920",
+ "960",
+ "33331760",
+ "35",
+ "1920",
+ "960",
+ "33331760",
+ "33",
+ "1920",
+ "960",
+ "33331760",
+ "34",
+ "1600",
+ "1200",
+ "33331760",
+ "35",
+ "1600",
+ "1200",
+ "33331760",
+ "33",
+ "1600",
+ "1200",
+ "33331760",
+ "34",
+ "1440",
+ "1080",
+ "33331760",
+ "35",
+ "1440",
+ "1080",
+ "33331760",
+ "33",
+ "1440",
+ "1080",
+ "33331760",
+ "34",
+ "1280",
+ "960",
+ "33331760",
+ "35",
+ "1280",
+ "960",
+ "33331760",
+ "33",
+ "1280",
+ "960",
+ "33331760",
+ "34",
+ "1280",
+ "720",
+ "33331760",
+ "35",
+ "1280",
+ "720",
+ "33331760",
+ "33",
+ "1280",
+ "720",
+ "33331760",
+ "34",
+ "1024",
+ "768",
+ "33331760",
+ "35",
+ "1024",
+ "768",
+ "33331760",
+ "33",
+ "1024",
+ "768",
+ "33331760",
+ "34",
+ "800",
+ "600",
+ "33331760",
+ "35",
+ "800",
+ "600",
+ "33331760",
+ "33",
+ "800",
+ "600",
+ "33331760",
+ "34",
+ "720",
+ "480",
+ "33331760",
+ "35",
+ "720",
+ "480",
+ "33331760",
+ "33",
+ "720",
+ "480",
+ "33331760",
+ "34",
+ "640",
+ "480",
+ "33331760",
+ "35",
+ "640",
+ "480",
+ "33331760",
+ "33",
+ "640",
+ "480",
+ "33331760",
+ "34",
+ "640",
+ "360",
+ "33331760",
+ "35",
+ "640",
+ "360",
+ "33331760",
+ "33",
+ "640",
+ "360",
+ "33331760",
+ "34",
+ "352",
+ "288",
+ "33331760",
+ "35",
+ "352",
+ "288",
+ "33331760",
+ "33",
+ "352",
+ "288",
+ "33331760",
+ "34",
+ "320",
+ "240",
+ "33331760",
+ "35",
+ "320",
+ "240",
+ "33331760",
+ "33",
+ "320",
+ "240",
+ "33331760",
+ "34",
+ "176",
+ "144",
+ "33331760",
+ "35",
+ "176",
+ "144",
+ "33331760",
+ "33",
+ "176",
+ "144",
"33331760"
- ],
+ ],
"android.scaler.availableMinFrameDurationsMaximumResolution": [
"32",
"6048",
@@ -2298,67 +2362,67 @@
"1920",
"1440",
"17971200",
- "33",
- "1920",
- "1440",
- "17971200",
- "33",
- "1920",
- "1080",
- "13478400",
- "33",
- "1920",
- "960",
- "11980800",
- "33",
- "1600",
- "1200",
- "12480000",
- "33",
- "1440",
- "1080",
- "10108800",
- "33",
- "1280",
- "960",
- "7987200",
- "33",
- "1280",
- "720",
- "5990400",
- "33",
- "1024",
- "768",
- "5111808",
- "33",
- "800",
- "600",
- "3120000",
- "33",
- "720",
- "480",
- "2246400",
- "33",
- "640",
- "480",
- "1996800",
- "33",
- "640",
- "360",
- "1497600",
- "33",
- "352",
- "288",
- "658944",
- "33",
- "320",
- "240",
- "499200",
- "33",
- "176",
- "144",
+ "33",
+ "1920",
+ "1440",
+ "17971200",
+ "33",
+ "1920",
+ "1080",
+ "13478400",
+ "33",
+ "1920",
+ "960",
+ "11980800",
+ "33",
+ "1600",
+ "1200",
+ "12480000",
+ "33",
+ "1440",
+ "1080",
+ "10108800",
+ "33",
+ "1280",
+ "960",
+ "7987200",
+ "33",
+ "1280",
+ "720",
+ "5990400",
+ "33",
+ "1024",
+ "768",
+ "5111808",
+ "33",
+ "800",
+ "600",
+ "3120000",
+ "33",
+ "720",
+ "480",
+ "2246400",
+ "33",
+ "640",
+ "480",
+ "1996800",
+ "33",
+ "640",
+ "360",
+ "1497600",
+ "33",
+ "352",
+ "288",
+ "658944",
+ "33",
+ "320",
+ "240",
+ "499200",
+ "33",
+ "176",
+ "144",
"164736"
- ],
+ ],
"android.scaler.availableStallDurationsMaximumResolution": [
"32",
"6048",
@@ -2370,259 +2434,259 @@
"287539200"
],
"android.scaler.availableStreamConfigurations": [
- "54",
- "1920",
- "1440",
- "OUTPUT",
- "54",
- "1920",
- "1080",
- "OUTPUT",
- "54",
- "1920",
- "960",
- "OUTPUT",
- "54",
- "1600",
- "1200",
- "OUTPUT",
- "54",
- "1440",
- "1080",
- "OUTPUT",
- "54",
- "1280",
- "960",
- "OUTPUT",
- "54",
- "1280",
- "720",
- "OUTPUT",
- "54",
- "1024",
- "768",
- "OUTPUT",
- "54",
- "800",
- "600",
- "OUTPUT",
- "54",
- "720",
- "480",
- "OUTPUT",
- "54",
- "640",
- "480",
- "OUTPUT",
- "54",
- "640",
- "360",
- "OUTPUT",
- "54",
- "352",
- "288",
- "OUTPUT",
- "54",
- "320",
- "240",
- "OUTPUT",
- "54",
- "176",
- "144",
- "OUTPUT",
+ "54",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "54",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "54",
+ "1920",
+ "960",
+ "OUTPUT",
+ "54",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "54",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "54",
+ "1280",
+ "960",
+ "OUTPUT",
+ "54",
+ "1280",
+ "720",
+ "OUTPUT",
+ "54",
+ "1024",
+ "768",
+ "OUTPUT",
+ "54",
+ "800",
+ "600",
+ "OUTPUT",
+ "54",
+ "720",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "360",
+ "OUTPUT",
+ "54",
+ "352",
+ "288",
+ "OUTPUT",
+ "54",
+ "320",
+ "240",
+ "OUTPUT",
+ "54",
+ "176",
+ "144",
+ "OUTPUT",
"32",
"1920",
"1440",
"OUTPUT",
- "35",
- "1920",
- "1440",
- "INPUT",
- "34",
- "1920",
- "1440",
- "INPUT",
- "34",
- "1920",
- "1440",
- "OUTPUT",
- "35",
- "1920",
- "1440",
- "OUTPUT",
- "33",
- "1920",
- "1440",
- "OUTPUT",
- "34",
- "1920",
- "1080",
- "OUTPUT",
- "35",
- "1920",
- "1080",
- "OUTPUT",
- "33",
- "1920",
- "1080",
- "OUTPUT",
- "34",
- "1920",
- "960",
- "OUTPUT",
- "35",
- "1920",
- "960",
- "OUTPUT",
- "33",
- "1920",
- "960",
- "OUTPUT",
- "34",
- "1600",
- "1200",
- "OUTPUT",
- "35",
- "1600",
- "1200",
- "OUTPUT",
- "33",
- "1600",
- "1200",
- "OUTPUT",
- "34",
- "1440",
- "1080",
- "OUTPUT",
- "35",
- "1440",
- "1080",
- "OUTPUT",
- "33",
- "1440",
- "1080",
- "OUTPUT",
- "34",
- "1280",
- "960",
- "OUTPUT",
- "35",
- "1280",
- "960",
- "OUTPUT",
- "33",
- "1280",
- "960",
- "OUTPUT",
- "34",
- "1280",
- "720",
- "OUTPUT",
- "35",
- "1280",
- "720",
- "OUTPUT",
- "33",
- "1280",
- "720",
- "OUTPUT",
- "34",
- "1024",
- "768",
- "OUTPUT",
- "35",
- "1024",
- "768",
- "OUTPUT",
- "33",
- "1024",
- "768",
- "OUTPUT",
- "34",
- "800",
- "600",
- "OUTPUT",
- "35",
- "800",
- "600",
- "OUTPUT",
- "33",
- "800",
- "600",
- "OUTPUT",
- "34",
- "720",
- "480",
- "OUTPUT",
- "35",
- "720",
- "480",
- "OUTPUT",
- "33",
- "720",
- "480",
- "OUTPUT",
- "34",
- "640",
- "480",
- "OUTPUT",
- "35",
- "640",
- "480",
- "OUTPUT",
- "33",
- "640",
- "480",
- "OUTPUT",
- "34",
- "640",
- "360",
- "OUTPUT",
- "35",
- "640",
- "360",
- "OUTPUT",
- "33",
- "640",
- "360",
- "OUTPUT",
- "34",
- "352",
- "288",
- "OUTPUT",
- "35",
- "352",
- "288",
- "OUTPUT",
- "33",
- "352",
- "288",
- "OUTPUT",
- "34",
- "320",
- "240",
- "OUTPUT",
- "35",
- "320",
- "240",
- "OUTPUT",
- "33",
- "320",
- "240",
- "OUTPUT",
- "34",
- "176",
- "144",
- "OUTPUT",
- "35",
- "176",
- "144",
- "OUTPUT",
- "33",
- "176",
- "144",
+ "35",
+ "1920",
+ "1440",
+ "INPUT",
+ "34",
+ "1920",
+ "1440",
+ "INPUT",
+ "34",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "35",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "33",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "34",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "35",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "33",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "34",
+ "1920",
+ "960",
+ "OUTPUT",
+ "35",
+ "1920",
+ "960",
+ "OUTPUT",
+ "33",
+ "1920",
+ "960",
+ "OUTPUT",
+ "34",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "35",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "33",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "34",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "35",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "33",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "34",
+ "1280",
+ "960",
+ "OUTPUT",
+ "35",
+ "1280",
+ "960",
+ "OUTPUT",
+ "33",
+ "1280",
+ "960",
+ "OUTPUT",
+ "34",
+ "1280",
+ "720",
+ "OUTPUT",
+ "35",
+ "1280",
+ "720",
+ "OUTPUT",
+ "33",
+ "1280",
+ "720",
+ "OUTPUT",
+ "34",
+ "1024",
+ "768",
+ "OUTPUT",
+ "35",
+ "1024",
+ "768",
+ "OUTPUT",
+ "33",
+ "1024",
+ "768",
+ "OUTPUT",
+ "34",
+ "800",
+ "600",
+ "OUTPUT",
+ "35",
+ "800",
+ "600",
+ "OUTPUT",
+ "33",
+ "800",
+ "600",
+ "OUTPUT",
+ "34",
+ "720",
+ "480",
+ "OUTPUT",
+ "35",
+ "720",
+ "480",
+ "OUTPUT",
+ "33",
+ "720",
+ "480",
+ "OUTPUT",
+ "34",
+ "640",
+ "480",
+ "OUTPUT",
+ "35",
+ "640",
+ "480",
+ "OUTPUT",
+ "33",
+ "640",
+ "480",
+ "OUTPUT",
+ "34",
+ "640",
+ "360",
+ "OUTPUT",
+ "35",
+ "640",
+ "360",
+ "OUTPUT",
+ "33",
+ "640",
+ "360",
+ "OUTPUT",
+ "34",
+ "352",
+ "288",
+ "OUTPUT",
+ "35",
+ "352",
+ "288",
+ "OUTPUT",
+ "33",
+ "352",
+ "288",
+ "OUTPUT",
+ "34",
+ "320",
+ "240",
+ "OUTPUT",
+ "35",
+ "320",
+ "240",
+ "OUTPUT",
+ "33",
+ "320",
+ "240",
+ "OUTPUT",
+ "34",
+ "176",
+ "144",
+ "OUTPUT",
+ "35",
+ "176",
+ "144",
+ "OUTPUT",
+ "33",
+ "176",
+ "144",
"OUTPUT"
- ],
+ ],
"android.scaler.availableStreamConfigurationsMaximumResolution": [
"32",
"6048",
@@ -2632,597 +2696,601 @@
"6048",
"4024",
"OUTPUT",
- "33",
- "6048",
- "4024",
+ "33",
+ "6048",
+ "4024",
"OUTPUT",
- "35",
- "6048",
- "4024",
+ "35",
+ "6048",
+ "4024",
"OUTPUT"
],
"android.scaler.croppingType": [
"CENTER_ONLY"
- ],
+ ],
"android.scaler.physicalCameraMultiResolutionStreamConfigurations": [
- "34",
- "1920",
- "1440",
- "INPUT",
- "35",
- "1920",
- "1440",
+ "34",
+ "1920",
+ "1440",
"INPUT",
- "33",
- "1920",
- "1440",
- "OUTPUT",
- "34",
- "1920",
- "1440",
- "OUTPUT",
- "35",
- "1920",
- "1440",
+ "35",
+ "1920",
+ "1440",
+ "INPUT",
+ "33",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "34",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "35",
+ "1920",
+ "1440",
"OUTPUT"
- ],
+ ],
"android.sensor.availableTestPatternModes": [
- "0",
+ "0",
"5"
- ],
+ ],
"android.sensor.blackLevelPattern": [
- "64",
- "64",
- "64",
+ "64",
+ "64",
+ "64",
"64"
- ],
+ ],
"android.sensor.calibrationTransform1": [
- "58",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "85",
+ "58",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "85",
"128"
- ],
+ ],
"android.sensor.calibrationTransform2": [
- "84",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "45",
+ "84",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "45",
"128"
- ],
+ ],
"android.sensor.colorTransform1": [
- "221",
- "128",
- "-105",
- "128",
- "-34",
- "128",
- "-124",
- "128",
- "240",
- "128",
- "5",
- "128",
- "5",
- "128",
- "-19",
- "128",
- "99",
+ "221",
+ "128",
+ "-105",
+ "128",
+ "-34",
+ "128",
+ "-124",
+ "128",
+ "240",
+ "128",
+ "5",
+ "128",
+ "5",
+ "128",
+ "-19",
+ "128",
+ "99",
"128"
- ],
+ ],
"android.sensor.colorTransform2": [
- "360",
- "128",
- "-249",
- "128",
- "-63",
- "128",
- "-137",
- "128",
- "279",
- "128",
- "-1",
- "128",
- "7",
- "128",
- "-18",
- "128",
- "159",
+ "360",
+ "128",
+ "-249",
+ "128",
+ "-63",
+ "128",
+ "-137",
+ "128",
+ "279",
+ "128",
+ "-1",
+ "128",
+ "7",
+ "128",
+ "-18",
+ "128",
+ "159",
"128"
- ],
+ ],
"android.sensor.forwardMatrix1": [
- "56",
- "128",
- "49",
- "128",
- "18",
- "128",
- "28",
- "128",
- "92",
- "128",
- "8",
- "128",
- "2",
- "128",
- "12",
- "128",
- "91",
+ "56",
+ "128",
+ "49",
+ "128",
+ "18",
+ "128",
+ "28",
+ "128",
+ "92",
+ "128",
+ "8",
+ "128",
+ "2",
+ "128",
+ "12",
+ "128",
+ "91",
"128"
- ],
+ ],
"android.sensor.forwardMatrix2": [
- "56",
- "128",
- "49",
- "128",
- "18",
- "128",
- "28",
- "128",
- "92",
- "128",
- "8",
- "128",
- "2",
- "128",
- "12",
- "128",
- "91",
+ "56",
+ "128",
+ "49",
+ "128",
+ "18",
+ "128",
+ "28",
+ "128",
+ "92",
+ "128",
+ "8",
+ "128",
+ "2",
+ "128",
+ "12",
+ "128",
+ "91",
"128"
- ],
+ ],
"android.sensor.info.activeArraySize": [
- "0",
- "0",
- "1920",
+ "0",
+ "0",
+ "1920",
"1440"
- ],
+ ],
"android.sensor.info.activeArraySizeMaximumResolution": [
- "0",
- "0",
- "6048",
+ "0",
+ "0",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.colorFilterArrangement": [
"RGGB"
- ],
+ ],
"android.sensor.info.exposureTimeRange": [
- "13611",
+ "13611",
"10319000832"
- ],
+ ],
"android.sensor.info.lensShadingApplied": [
"TRUE"
- ],
+ ],
"android.sensor.info.maxFrameDuration": [
"1319055264"
- ],
+ ],
"android.sensor.info.physicalSize": [
- "5.64480019",
+ "5.64480019",
"4.23360014"
- ],
+ ],
"android.sensor.info.pixelArraySize": [
- "1920",
+ "1920",
"1440"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySize": [
- "0",
- "0",
- "1920",
+ "0",
+ "0",
+ "1920",
"1440"
- ],
+ ],
"android.sensor.info.pixelArraySizeMaximumResolution": [
- "6048",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySizeMaximumResolution": [
- "0",
- "0",
- "6048",
+ "0",
+ "0",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.binningFactor": [
"2",
"2"
],
"android.sensor.info.sensitivityRange": [
- "100",
+ "100",
"1000"
- ],
+ ],
"android.sensor.info.timestampSource": [
"REALTIME"
- ],
+ ],
"android.sensor.info.whiteLevel": [
"1023"
- ],
+ ],
"android.sensor.maxAnalogSensitivity": [
"444"
- ],
+ ],
"android.sensor.orientation": [
"270"
- ],
+ ],
"android.sensor.profileHueSatMapDimensions": [
- "0",
- "0",
+ "0",
+ "0",
"0"
- ],
+ ],
"android.sensor.referenceIlluminant1": [
"D65"
- ],
+ ],
"android.sensor.referenceIlluminant2": [
"17"
- ],
+ ],
"android.shading.availableModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableFaceDetectModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableHotPixelMapModes": [
"0"
- ],
+ ],
"android.statistics.info.availableLensShadingMapModes": [
"0",
"1"
- ],
+ ],
"android.statistics.info.maxFaceCount": [
"10"
- ],
+ ],
"android.info.supportedBufferManagementVersion" : [
- "HIDL_DEVICE_3_5"
- ],
+ "HIDL_DEVICE_3_5"
+ ],
"android.sync.maxLatency": [
"PER_FRAME_CONTROL"
- ],
+ ],
"android.tonemap.availableToneMapModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.tonemap.maxCurvePoints": [
"64"
]
- },
+ },
{
"android.colorCorrection.availableAberrationModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.control.aeAvailableAntibandingModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3"
- ],
+ ],
"android.control.aeAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.aeAvailableTargetFpsRanges": [
- "15",
- "15",
- "15",
- "30",
- "7",
- "30",
- "30",
+ "15",
+ "15",
+ "15",
+ "30",
+ "7",
+ "30",
+ "30",
"30"
- ],
+ ],
"android.control.aeCompensationRange": [
- "-24",
+ "-24",
"24"
- ],
+ ],
"android.control.aeCompensationStep": [
- "1",
+ "1",
"6"
- ],
+ ],
"android.control.aeLockAvailable": [
"TRUE"
- ],
+ ],
"android.control.afAvailableModes": [
- "0",
- "1",
- "2",
- "3",
+ "0",
+ "1",
+ "2",
+ "3",
"4"
- ],
+ ],
"android.control.availableExtendedSceneModeMaxSizes": [
- "0",
- "0",
- "0",
- "1",
- "1920",
- "1080",
- "2",
- "1920",
- "1440"
- ],
+ "0",
+ "0",
+ "0",
+ "1",
+ "1920",
+ "1080",
+ "2",
+ "1920",
+ "1440"
+ ],
"android.control.availableExtendedSceneModeZoomRatioRanges": [
- "2.0",
- "2.0",
- "1.0",
+ "2.0",
+ "2.0",
+ "1.0",
"1.0"
- ],
+ ],
"android.control.availableEffects": [
"0"
- ],
+ ],
"android.control.availableModes": [
- "0",
- "1",
+ "0",
+ "1",
"2",
"4"
- ],
+ ],
"android.control.availableSceneModes": [
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "12",
- "13",
- "14",
- "15",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "12",
+ "13",
+ "14",
+ "15",
"18"
- ],
+ ],
+ "android.control.availableSettingsOverrides": [
+ "0",
+ "1"
+ ],
"android.control.availableVideoStabilizationModes": [
"0"
- ],
+ ],
"android.control.awbAvailableModes": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
"0"
- ],
+ ],
"android.control.awbLockAvailable": [
"TRUE"
- ],
+ ],
"android.control.maxRegions": [
- "1",
- "0",
+ "1",
+ "0",
"1"
- ],
+ ],
"android.control.postRawSensitivityBoostRange": [
- "100",
+ "100",
"100"
- ],
+ ],
"android.control.sceneModeOverrides": [
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
- "0",
- "1",
- "1",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
+ "0",
+ "1",
+ "1",
"0"
- ],
+ ],
"android.control.zoomRatioRange": [
- "1.0",
- "8.0"
- ],
+ "1.0",
+ "8.0"
+ ],
"android.distortionCorrection.availableModes": [
"0"
- ],
+ ],
"android.edge.availableEdgeModes": [
- "1",
- "2",
+ "1",
+ "2",
"0",
"3"
- ],
+ ],
"android.flash.info.available": [
"TRUE"
- ],
+ ],
"android.hotPixel.availableHotPixelModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.info.supportedHardwareLevel": [
"FULL"
- ],
+ ],
"android.jpeg.availableThumbnailSizes": [
- "0",
- "0",
- "176",
- "144",
- "240",
- "144",
- "256",
- "144",
- "240",
- "160",
- "256",
- "154",
- "246",
- "184",
- "240",
- "240",
- "320",
+ "0",
+ "0",
+ "176",
+ "144",
+ "240",
+ "144",
+ "256",
+ "144",
+ "240",
+ "160",
+ "256",
+ "154",
+ "246",
+ "184",
+ "240",
+ "240",
+ "320",
"240"
- ],
+ ],
"android.jpeg.maxSize": [
"3000000"
- ],
+ ],
"android.lens.distortion": [
- "0.27679554",
- "-1.56508207",
- "3.02522445",
- "0.00000000",
+ "0.27679554",
+ "-1.56508207",
+ "3.02522445",
+ "0.00000000",
"0.00000000"
- ],
+ ],
"android.lens.facing": [
"FRONT"
- ],
+ ],
"android.lens.info.availableApertures": [
"2.40000010"
- ],
+ ],
"android.lens.info.availableFilterDensities": [
"0.00000000"
- ],
+ ],
"android.lens.info.availableFocalLengths": [
"5.84000015"
- ],
+ ],
"android.lens.info.availableOpticalStabilization": [
- "0",
+ "0",
"1"
- ],
+ ],
"android.lens.info.focusDistanceCalibration": [
"APPROXIMATE"
- ],
+ ],
"android.lens.info.hyperfocalDistance": [
"0.14073935"
- ],
+ ],
"android.lens.info.minimumFocusDistance": [
"10.10101032"
- ],
+ ],
"android.lens.info.shadingMapSize": [
- "17",
+ "17",
"13"
- ],
+ ],
"android.lens.intrinsicCalibration": [
- "5941.24902344",
- "5941.24902344",
- "960.14233398",
- "540.47375488",
+ "5941.24902344",
+ "5941.24902344",
+ "960.14233398",
+ "540.47375488",
"0.00000000"
- ],
+ ],
"android.lens.poseReference": [
"PRIMARY_CAMERA"
- ],
+ ],
"android.lens.poseRotation": [
- "-0.00032215",
- "0.00118852",
- "-0.00006529",
+ "-0.00032215",
+ "0.00118852",
+ "-0.00006529",
"0.99999928"
- ],
+ ],
"android.lens.poseTranslation": [
- "0.00034755",
- "0.01267981",
+ "0.00034755",
+ "0.01267981",
"-0.00284645"
- ],
+ ],
"android.noiseReduction.availableNoiseReductionModes": [
- "0",
- "1",
- "2",
+ "0",
+ "1",
+ "2",
"3",
"4"
- ],
+ ],
"android.request.availableCapabilities": [
- "BACKWARD_COMPATIBLE",
- "READ_SENSOR_SETTINGS",
- "MANUAL_SENSOR",
- "BURST_CAPTURE",
+ "BACKWARD_COMPATIBLE",
+ "READ_SENSOR_SETTINGS",
+ "MANUAL_SENSOR",
+ "BURST_CAPTURE",
"MANUAL_POST_PROCESSING",
- "PRIVATE_REPROCESSING",
+ "PRIVATE_REPROCESSING",
"ULTRA_HIGH_RESOLUTION_SENSOR",
- "YUV_REPROCESSING",
+ "YUV_REPROCESSING",
"RAW",
- "REMOSAIC_REPROCESSING",
+ "REMOSAIC_REPROCESSING",
"DYNAMIC_RANGE_TEN_BIT"
- ],
+ ],
"android.request.availableDynamicRangeProfilesMap": [
- "2",
- "2",
+ "2",
+ "2",
"0"
- ],
+ ],
"android.request.recommendedTenBitDynamicRangeProfile": [
"2"
- ],
+ ],
"android.request.maxNumInputStreams": [
"1"
- ],
+ ],
"android.scaler.availableInputOutputFormatsMap": [
- "34",
- "2",
- "33",
- "35",
- "35",
- "2",
- "33",
+ "34",
+ "2",
+ "33",
+ "35",
+ "35",
+ "2",
+ "33",
"35"
- ],
+ ],
"android.scaler.availableInputOutputFormatsMapMaximumResolution" : [
"32",
"1",
@@ -3230,534 +3298,543 @@
],
"android.reprocess.maxCaptureStall": [
"2"
- ],
+ ],
"android.request.availableCharacteristicsKeys": [
- "4",
- "65554",
- "65555",
- "65556",
- "65557",
- "65558",
- "65559",
- "65560",
- "65561",
- "65562",
- "65563",
- "65564",
- "65565",
- "65571",
- "65572",
- "65573",
- "65574",
- "65575",
- "65579",
- "65580",
- "65582",
- "1638402",
- "1638401",
- "1638403",
- "1638404",
- "1769473",
- "196610",
- "327680",
- "393217",
- "458759",
- "458760",
- "589824",
- "589825",
- "589826",
- "589827",
- "589828",
- "589829",
- "589830",
- "589831",
- "524293",
- "1703936",
- "1703937",
- "1703938",
- "655362",
- "786438",
- "786440",
- "786442",
- "786443",
- "786444",
- "786445",
- "786446",
- "786447",
- "786448",
- "851972",
- "851977",
- "851978",
- "851979",
- "851976",
- "851980",
- "851981",
- "983040",
- "917526",
- "917523",
- "917534",
- "983041",
- "983042",
- "983043",
- "983044",
- "983045",
- "983046",
- "983047",
- "983048",
- "983049",
- "983050",
- "917507",
- "917508",
- "917509",
- "917510",
- "917511",
- "917512",
- "917513",
- "917514",
- "917516",
- "917517",
- "917518",
- "917519",
- "917529",
- "1048578",
- "1179648",
- "1179650",
- "1179654",
- "1179655",
- "1179656",
- "1245188",
- "1245189",
- "1376256",
- "1507329",
- "1572865",
- "524300",
- "524301",
- "524295",
- "524294",
- "524298",
- "851984",
+ "4",
+ "65554",
+ "65555",
+ "65556",
+ "65557",
+ "65558",
+ "65559",
+ "65560",
+ "65561",
+ "65562",
+ "65563",
+ "65564",
+ "65565",
+ "65571",
+ "65572",
+ "65573",
+ "65574",
+ "65575",
+ "65579",
+ "65580",
+ "65582",
+ "65589",
+ "65592",
+ "1638402",
+ "1638401",
+ "1638403",
+ "1638404",
+ "1769473",
+ "196610",
+ "327680",
+ "393217",
+ "458759",
+ "458760",
+ "589824",
+ "589825",
+ "589826",
+ "589827",
+ "589828",
+ "589829",
+ "589830",
+ "589831",
+ "524293",
+ "1703936",
+ "1703937",
+ "1703938",
+ "655362",
+ "786438",
+ "786440",
+ "786442",
+ "786443",
+ "786444",
+ "786445",
+ "786446",
+ "786447",
+ "786448",
+ "851972",
+ "851977",
+ "851978",
+ "851979",
+ "851976",
+ "851980",
+ "851981",
+ "983040",
+ "917526",
+ "917523",
+ "917534",
+ "983041",
+ "983042",
+ "983043",
+ "983044",
+ "983045",
+ "983046",
+ "983047",
+ "983048",
+ "983049",
+ "983050",
+ "917507",
+ "917508",
+ "917509",
+ "917510",
+ "917511",
+ "917512",
+ "917513",
+ "917514",
+ "917516",
+ "917517",
+ "917518",
+ "917519",
+ "917529",
+ "1048578",
+ "1179648",
+ "1179650",
+ "1179654",
+ "1179655",
+ "1179656",
+ "1245188",
+ "1245189",
+ "1376256",
+ "1507329",
+ "1572865",
+ "524300",
+ "524301",
+ "524295",
+ "524294",
+ "524298",
+ "851984",
"851986"
- ],
+ ],
"android.request.availableRequestKeys": [
- "0",
- "1",
- "2",
- "3",
- "65536",
- "65537",
- "65538",
- "65539",
- "65540",
- "65541",
- "65542",
- "65543",
- "65544",
- "65545",
- "65546",
- "65547",
- "65549",
- "65550",
- "65551",
- "65552",
- "65553",
- "65576",
- "65581",
- "65583",
- "1769472",
- "196608",
- "262146",
- "393216",
- "458752",
- "458753",
- "458754",
- "458755",
- "458756",
- "458757",
- "458758",
- "524288",
- "524289",
- "524290",
- "524291",
- "524292",
- "655360",
- "786433",
- "851968",
- "917504",
- "917505",
- "917506",
- "917520",
- "1048576",
- "1114112",
- "1114115",
- "1114128",
- "1114129",
- "1245184",
- "1245185",
- "1245186",
- "1245187",
- "1441792",
+ "0",
+ "1",
+ "2",
+ "3",
+ "65536",
+ "65537",
+ "65538",
+ "65539",
+ "65540",
+ "65541",
+ "65542",
+ "65543",
+ "65544",
+ "65545",
+ "65546",
+ "65547",
+ "65549",
+ "65550",
+ "65551",
+ "65552",
+ "65553",
+ "65576",
+ "65581",
+ "65583",
+ "65588",
+ "65591",
+ "1769472",
+ "196608",
+ "262146",
+ "393216",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "458756",
+ "458757",
+ "458758",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524292",
+ "655360",
+ "786433",
+ "851968",
+ "917504",
+ "917505",
+ "917506",
+ "917520",
+ "1048576",
+ "1114112",
+ "1114115",
+ "1114128",
+ "1114129",
+ "1245184",
+ "1245185",
+ "1245186",
+ "1245187",
+ "1441792",
"851985",
"917536"
- ],
+ ],
"android.request.availableResultKeys": [
- "0",
- "1",
- "2",
- "65537",
- "65539",
- "65540",
- "65567",
- "65543",
- "65544",
- "65538",
- "65568",
- "65547",
- "65570",
- "65551",
- "65576",
- "65581",
- "65583",
- "196608",
- "262146",
- "262149",
- "458752",
- "458753",
- "458754",
- "458755",
- "458756",
- "458757",
- "458758",
- "524288",
- "524289",
- "524290",
- "524291",
- "524296",
- "524297",
- "524294",
- "524295",
- "524298",
- "524301",
- "524292",
- "655360",
- "786433",
- "851968",
- "917526",
- "917523",
- "917504",
- "917505",
- "917506",
- "917520",
- "917522",
- "917525",
- "1048576",
- "1114112",
- "1114121",
- "1114124",
- "1114125",
- "1114126",
- "1114118",
- "1114119",
- "1114129",
- "1114130",
- "1114131",
- "1114132",
- "1245184",
- "1245185",
- "1245186",
- "1245187",
- "1441792",
+ "0",
+ "1",
+ "2",
+ "65537",
+ "65539",
+ "65540",
+ "65567",
+ "65543",
+ "65544",
+ "65538",
+ "65568",
+ "65547",
+ "65570",
+ "65551",
+ "65576",
+ "65581",
+ "65583",
+ "65588",
+ "65590",
+ "65591",
+ "65593",
+ "196608",
+ "262146",
+ "262149",
+ "458752",
+ "458753",
+ "458754",
+ "458755",
+ "458756",
+ "458757",
+ "458758",
+ "524288",
+ "524289",
+ "524290",
+ "524291",
+ "524296",
+ "524297",
+ "524294",
+ "524295",
+ "524298",
+ "524301",
+ "524292",
+ "655360",
+ "786433",
+ "851968",
+ "917526",
+ "917523",
+ "917504",
+ "917505",
+ "917506",
+ "917520",
+ "917522",
+ "917525",
+ "1048576",
+ "1114112",
+ "1114121",
+ "1114124",
+ "1114125",
+ "1114126",
+ "1114118",
+ "1114119",
+ "1114129",
+ "1114130",
+ "1114131",
+ "1114132",
+ "1245184",
+ "1245185",
+ "1245186",
+ "1245187",
+ "1441792",
"65541",
"65542",
"65545",
"65552",
"1114123",
- "917530",
+ "917530",
"851985",
- "917536"
- ],
+ "917536",
+ "851994"
+ ],
"android.request.maxNumOutputStreams": [
- "1",
- "3",
+ "1",
+ "3",
"2"
- ],
+ ],
"android.scaler.availableRotateAndCropModes": [
"0"
- ],
+ ],
"android.request.partialResultCount": [
"1"
- ],
+ ],
"android.request.pipelineMaxDepth": [
"8"
- ],
+ ],
"android.scaler.availableMaxDigitalZoom": [
"8.00000000"
- ],
+ ],
"android.scaler.availableMinFrameDurations": [
- "54",
- "2048",
- "1536",
- "33331760",
- "54",
- "1920",
- "1440",
- "33331760",
- "54",
- "1920",
- "1080",
- "33331760",
- "54",
- "1920",
- "960",
- "33331760",
- "54",
- "1600",
- "1200",
- "33331760",
- "54",
- "1440",
- "1080",
- "33331760",
- "54",
- "1280",
- "960",
- "33331760",
- "54",
- "1280",
- "720",
- "33331760",
- "54",
- "1024",
- "768",
- "33331760",
- "54",
- "800",
- "600",
- "33331760",
- "54",
- "720",
- "480",
- "33331760",
- "54",
- "640",
- "480",
- "33331760",
- "54",
- "640",
- "360",
- "33331760",
- "54",
- "352",
- "288",
- "33331760",
- "54",
- "320",
- "240",
- "33331760",
- "54",
- "176",
- "144",
- "33331760",
+ "54",
+ "2048",
+ "1536",
+ "33331760",
+ "54",
+ "1920",
+ "1440",
+ "33331760",
+ "54",
+ "1920",
+ "1080",
+ "33331760",
+ "54",
+ "1920",
+ "960",
+ "33331760",
+ "54",
+ "1600",
+ "1200",
+ "33331760",
+ "54",
+ "1440",
+ "1080",
+ "33331760",
+ "54",
+ "1280",
+ "960",
+ "33331760",
+ "54",
+ "1280",
+ "720",
+ "33331760",
+ "54",
+ "1024",
+ "768",
+ "33331760",
+ "54",
+ "800",
+ "600",
+ "33331760",
+ "54",
+ "720",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "480",
+ "33331760",
+ "54",
+ "640",
+ "360",
+ "33331760",
+ "54",
+ "352",
+ "288",
+ "33331760",
+ "54",
+ "320",
+ "240",
+ "33331760",
+ "54",
+ "176",
+ "144",
+ "33331760",
"32",
"2048",
"1536",
"33331760",
- "34",
- "2048",
- "1536",
- "33331760",
- "35",
- "2048",
- "1536",
- "33331760",
- "33",
- "2048",
- "1536",
- "33331760",
+ "34",
+ "2048",
+ "1536",
+ "33331760",
+ "35",
+ "2048",
+ "1536",
+ "33331760",
+ "33",
+ "2048",
+ "1536",
+ "33331760",
"32",
"1920",
"1440",
"33331760",
- "34",
- "1920",
- "1440",
- "33331760",
- "35",
- "1920",
- "1440",
- "33331760",
- "33",
- "1920",
- "1440",
- "33331760",
- "34",
- "1920",
- "1080",
- "33331760",
- "35",
- "1920",
- "1080",
- "33331760",
- "33",
- "1920",
- "1080",
- "33331760",
- "34",
- "1920",
- "960",
- "33331760",
- "35",
- "1920",
- "960",
- "33331760",
- "33",
- "1920",
- "960",
- "33331760",
- "34",
- "1600",
- "1200",
- "33331760",
- "35",
- "1600",
- "1200",
- "33331760",
- "33",
- "1600",
- "1200",
- "33331760",
- "34",
- "1440",
- "1080",
- "33331760",
- "35",
- "1440",
- "1080",
- "33331760",
- "33",
- "1440",
- "1080",
- "33331760",
- "34",
- "1280",
- "960",
- "33331760",
- "35",
- "1280",
- "960",
- "33331760",
- "33",
- "1280",
- "960",
- "33331760",
- "34",
- "1280",
- "720",
- "33331760",
- "35",
- "1280",
- "720",
- "33331760",
- "33",
- "1280",
- "720",
- "33331760",
- "34",
- "1024",
- "768",
- "33331760",
- "35",
- "1024",
- "768",
- "33331760",
- "33",
- "1024",
- "768",
- "33331760",
- "34",
- "800",
- "600",
- "33331760",
- "35",
- "800",
- "600",
- "33331760",
- "33",
- "800",
- "600",
- "33331760",
- "34",
- "720",
- "480",
- "33331760",
- "35",
- "720",
- "480",
- "33331760",
- "33",
- "720",
- "480",
- "33331760",
- "34",
- "640",
- "480",
- "33331760",
- "35",
- "640",
- "480",
- "33331760",
- "33",
- "640",
- "480",
- "33331760",
- "34",
- "640",
- "360",
- "33331760",
- "35",
- "640",
- "360",
- "33331760",
- "33",
- "640",
- "360",
- "33331760",
- "34",
- "352",
- "288",
- "33331760",
- "35",
- "352",
- "288",
- "33331760",
- "33",
- "352",
- "288",
- "33331760",
- "34",
- "320",
- "240",
- "33331760",
- "35",
- "320",
- "240",
- "33331760",
- "33",
- "320",
- "240",
- "33331760",
- "34",
- "176",
- "144",
- "33331760",
- "35",
- "176",
- "144",
- "33331760",
- "33",
- "176",
- "144",
+ "34",
+ "1920",
+ "1440",
+ "33331760",
+ "35",
+ "1920",
+ "1440",
+ "33331760",
+ "33",
+ "1920",
+ "1440",
+ "33331760",
+ "34",
+ "1920",
+ "1080",
+ "33331760",
+ "35",
+ "1920",
+ "1080",
+ "33331760",
+ "33",
+ "1920",
+ "1080",
+ "33331760",
+ "34",
+ "1920",
+ "960",
+ "33331760",
+ "35",
+ "1920",
+ "960",
+ "33331760",
+ "33",
+ "1920",
+ "960",
+ "33331760",
+ "34",
+ "1600",
+ "1200",
+ "33331760",
+ "35",
+ "1600",
+ "1200",
+ "33331760",
+ "33",
+ "1600",
+ "1200",
+ "33331760",
+ "34",
+ "1440",
+ "1080",
+ "33331760",
+ "35",
+ "1440",
+ "1080",
+ "33331760",
+ "33",
+ "1440",
+ "1080",
+ "33331760",
+ "34",
+ "1280",
+ "960",
+ "33331760",
+ "35",
+ "1280",
+ "960",
+ "33331760",
+ "33",
+ "1280",
+ "960",
+ "33331760",
+ "34",
+ "1280",
+ "720",
+ "33331760",
+ "35",
+ "1280",
+ "720",
+ "33331760",
+ "33",
+ "1280",
+ "720",
+ "33331760",
+ "34",
+ "1024",
+ "768",
+ "33331760",
+ "35",
+ "1024",
+ "768",
+ "33331760",
+ "33",
+ "1024",
+ "768",
+ "33331760",
+ "34",
+ "800",
+ "600",
+ "33331760",
+ "35",
+ "800",
+ "600",
+ "33331760",
+ "33",
+ "800",
+ "600",
+ "33331760",
+ "34",
+ "720",
+ "480",
+ "33331760",
+ "35",
+ "720",
+ "480",
+ "33331760",
+ "33",
+ "720",
+ "480",
+ "33331760",
+ "34",
+ "640",
+ "480",
+ "33331760",
+ "35",
+ "640",
+ "480",
+ "33331760",
+ "33",
+ "640",
+ "480",
+ "33331760",
+ "34",
+ "640",
+ "360",
+ "33331760",
+ "35",
+ "640",
+ "360",
+ "33331760",
+ "33",
+ "640",
+ "360",
+ "33331760",
+ "34",
+ "352",
+ "288",
+ "33331760",
+ "35",
+ "352",
+ "288",
+ "33331760",
+ "33",
+ "352",
+ "288",
+ "33331760",
+ "34",
+ "320",
+ "240",
+ "33331760",
+ "35",
+ "320",
+ "240",
+ "33331760",
+ "33",
+ "320",
+ "240",
+ "33331760",
+ "34",
+ "176",
+ "144",
+ "33331760",
+ "35",
+ "176",
+ "144",
+ "33331760",
+ "33",
+ "176",
+ "144",
"33331760"
- ],
+ ],
"android.scaler.availableMinFrameDurationsMaximumResolution": [
"32",
"6048",
@@ -3777,75 +3854,75 @@
"2048",
"1536",
"17971200",
- "33",
- "2048",
- "1536",
- "17971200",
+ "33",
+ "2048",
+ "1536",
+ "17971200",
"32",
"1920",
"1440",
"17971200",
- "33",
- "1920",
- "1440",
- "17971200",
- "33",
- "1920",
- "1080",
- "13478400",
- "33",
- "1920",
- "960",
- "11980800",
- "33",
- "1600",
- "1200",
- "12480000",
- "33",
- "1440",
- "1080",
- "10108800",
- "33",
- "1280",
- "960",
- "7987200",
- "33",
- "1280",
- "720",
- "5990400",
- "33",
- "1024",
- "768",
- "5111808",
- "33",
- "800",
- "600",
- "3120000",
- "33",
- "720",
- "480",
- "2246400",
- "33",
- "640",
- "480",
- "1996800",
- "33",
- "640",
- "360",
- "1497600",
- "33",
- "352",
- "288",
- "658944",
- "33",
- "320",
- "240",
- "499200",
- "33",
- "176",
- "144",
+ "33",
+ "1920",
+ "1440",
+ "17971200",
+ "33",
+ "1920",
+ "1080",
+ "13478400",
+ "33",
+ "1920",
+ "960",
+ "11980800",
+ "33",
+ "1600",
+ "1200",
+ "12480000",
+ "33",
+ "1440",
+ "1080",
+ "10108800",
+ "33",
+ "1280",
+ "960",
+ "7987200",
+ "33",
+ "1280",
+ "720",
+ "5990400",
+ "33",
+ "1024",
+ "768",
+ "5111808",
+ "33",
+ "800",
+ "600",
+ "3120000",
+ "33",
+ "720",
+ "480",
+ "2246400",
+ "33",
+ "640",
+ "480",
+ "1996800",
+ "33",
+ "640",
+ "360",
+ "1497600",
+ "33",
+ "352",
+ "288",
+ "658944",
+ "33",
+ "320",
+ "240",
+ "499200",
+ "33",
+ "176",
+ "144",
"164736"
- ],
+ ],
"android.scaler.availableStallDurationsMaximumResolution": [
"32",
"6048",
@@ -3857,275 +3934,275 @@
"287539200"
],
"android.scaler.availableStreamConfigurations": [
- "54",
- "2048",
- "1536",
- "OUTPUT",
- "54",
- "1920",
- "1440",
- "OUTPUT",
- "54",
- "1920",
- "1080",
- "OUTPUT",
- "54",
- "1920",
- "960",
- "OUTPUT",
- "54",
- "1600",
- "1200",
- "OUTPUT",
- "54",
- "1440",
- "1080",
- "OUTPUT",
- "54",
- "1280",
- "960",
- "OUTPUT",
- "54",
- "1280",
- "720",
- "OUTPUT",
- "54",
- "1024",
- "768",
- "OUTPUT",
- "54",
- "800",
- "600",
- "OUTPUT",
- "54",
- "720",
- "480",
- "OUTPUT",
- "54",
- "640",
- "480",
- "OUTPUT",
- "54",
- "640",
- "360",
- "OUTPUT",
- "54",
- "352",
- "288",
- "OUTPUT",
- "54",
- "320",
- "240",
- "OUTPUT",
- "54",
- "176",
- "144",
- "OUTPUT",
- "34",
- "2048",
- "1536",
- "INPUT",
- "35",
- "2048",
- "1536",
- "INPUT",
+ "54",
+ "2048",
+ "1536",
+ "OUTPUT",
+ "54",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "54",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "54",
+ "1920",
+ "960",
+ "OUTPUT",
+ "54",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "54",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "54",
+ "1280",
+ "960",
+ "OUTPUT",
+ "54",
+ "1280",
+ "720",
+ "OUTPUT",
+ "54",
+ "1024",
+ "768",
+ "OUTPUT",
+ "54",
+ "800",
+ "600",
+ "OUTPUT",
+ "54",
+ "720",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "480",
+ "OUTPUT",
+ "54",
+ "640",
+ "360",
+ "OUTPUT",
+ "54",
+ "352",
+ "288",
+ "OUTPUT",
+ "54",
+ "320",
+ "240",
+ "OUTPUT",
+ "54",
+ "176",
+ "144",
+ "OUTPUT",
+ "34",
+ "2048",
+ "1536",
+ "INPUT",
+ "35",
+ "2048",
+ "1536",
+ "INPUT",
"32",
"2048",
"1536",
"OUTPUT",
- "34",
- "2048",
- "1536",
- "OUTPUT",
- "35",
- "2048",
- "1536",
- "OUTPUT",
- "33",
- "2048",
- "1536",
- "OUTPUT",
+ "34",
+ "2048",
+ "1536",
+ "OUTPUT",
+ "35",
+ "2048",
+ "1536",
+ "OUTPUT",
+ "33",
+ "2048",
+ "1536",
+ "OUTPUT",
"32",
"1920",
"1440",
"OUTPUT",
- "34",
- "1920",
- "1440",
- "OUTPUT",
- "35",
- "1920",
- "1440",
- "OUTPUT",
- "33",
- "1920",
- "1440",
- "OUTPUT",
- "34",
- "1920",
- "1080",
- "OUTPUT",
- "35",
- "1920",
- "1080",
- "OUTPUT",
- "33",
- "1920",
- "1080",
- "OUTPUT",
- "34",
- "1920",
- "960",
- "OUTPUT",
- "35",
- "1920",
- "960",
- "OUTPUT",
- "33",
- "1920",
- "960",
- "OUTPUT",
- "34",
- "1600",
- "1200",
- "OUTPUT",
- "35",
- "1600",
- "1200",
- "OUTPUT",
- "33",
- "1600",
- "1200",
- "OUTPUT",
- "34",
- "1440",
- "1080",
- "OUTPUT",
- "35",
- "1440",
- "1080",
- "OUTPUT",
- "33",
- "1440",
- "1080",
- "OUTPUT",
- "34",
- "1280",
- "960",
- "OUTPUT",
- "35",
- "1280",
- "960",
- "OUTPUT",
- "33",
- "1280",
- "960",
- "OUTPUT",
- "34",
- "1280",
- "720",
- "OUTPUT",
- "35",
- "1280",
- "720",
- "OUTPUT",
- "33",
- "1280",
- "720",
- "OUTPUT",
- "34",
- "1024",
- "768",
- "OUTPUT",
- "35",
- "1024",
- "768",
- "OUTPUT",
- "33",
- "1024",
- "768",
- "OUTPUT",
- "34",
- "800",
- "600",
- "OUTPUT",
- "35",
- "800",
- "600",
- "OUTPUT",
- "33",
- "800",
- "600",
- "OUTPUT",
- "34",
- "720",
- "480",
- "OUTPUT",
- "35",
- "720",
- "480",
- "OUTPUT",
- "33",
- "720",
- "480",
- "OUTPUT",
- "34",
- "640",
- "480",
- "OUTPUT",
- "35",
- "640",
- "480",
- "OUTPUT",
- "33",
- "640",
- "480",
- "OUTPUT",
- "34",
- "640",
- "360",
- "OUTPUT",
- "35",
- "640",
- "360",
- "OUTPUT",
- "33",
- "640",
- "360",
- "OUTPUT",
- "34",
- "352",
- "288",
- "OUTPUT",
- "35",
- "352",
- "288",
- "OUTPUT",
- "33",
- "352",
- "288",
- "OUTPUT",
- "34",
- "320",
- "240",
- "OUTPUT",
- "35",
- "320",
- "240",
- "OUTPUT",
- "33",
- "320",
- "240",
- "OUTPUT",
- "34",
- "176",
- "144",
- "OUTPUT",
- "35",
- "176",
- "144",
+ "34",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "35",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "33",
+ "1920",
+ "1440",
+ "OUTPUT",
+ "34",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "35",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "33",
+ "1920",
+ "1080",
+ "OUTPUT",
+ "34",
+ "1920",
+ "960",
+ "OUTPUT",
+ "35",
+ "1920",
+ "960",
+ "OUTPUT",
+ "33",
+ "1920",
+ "960",
+ "OUTPUT",
+ "34",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "35",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "33",
+ "1600",
+ "1200",
+ "OUTPUT",
+ "34",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "35",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "33",
+ "1440",
+ "1080",
+ "OUTPUT",
+ "34",
+ "1280",
+ "960",
+ "OUTPUT",
+ "35",
+ "1280",
+ "960",
+ "OUTPUT",
+ "33",
+ "1280",
+ "960",
+ "OUTPUT",
+ "34",
+ "1280",
+ "720",
+ "OUTPUT",
+ "35",
+ "1280",
+ "720",
+ "OUTPUT",
+ "33",
+ "1280",
+ "720",
+ "OUTPUT",
+ "34",
+ "1024",
+ "768",
+ "OUTPUT",
+ "35",
+ "1024",
+ "768",
+ "OUTPUT",
+ "33",
+ "1024",
+ "768",
+ "OUTPUT",
+ "34",
+ "800",
+ "600",
+ "OUTPUT",
+ "35",
+ "800",
+ "600",
+ "OUTPUT",
+ "33",
+ "800",
+ "600",
+ "OUTPUT",
+ "34",
+ "720",
+ "480",
+ "OUTPUT",
+ "35",
+ "720",
+ "480",
+ "OUTPUT",
+ "33",
+ "720",
+ "480",
+ "OUTPUT",
+ "34",
+ "640",
+ "480",
+ "OUTPUT",
+ "35",
+ "640",
+ "480",
+ "OUTPUT",
+ "33",
+ "640",
+ "480",
+ "OUTPUT",
+ "34",
+ "640",
+ "360",
+ "OUTPUT",
+ "35",
+ "640",
+ "360",
+ "OUTPUT",
+ "33",
+ "640",
+ "360",
+ "OUTPUT",
+ "34",
+ "352",
+ "288",
+ "OUTPUT",
+ "35",
+ "352",
+ "288",
+ "OUTPUT",
+ "33",
+ "352",
+ "288",
+ "OUTPUT",
+ "34",
+ "320",
+ "240",
+ "OUTPUT",
+ "35",
+ "320",
+ "240",
+ "OUTPUT",
+ "33",
+ "320",
+ "240",
+ "OUTPUT",
+ "34",
+ "176",
+ "144",
+ "OUTPUT",
+ "35",
+ "176",
+ "144",
"OUTPUT"
- ],
+ ],
"android.scaler.availableStreamConfigurationsMaximumResolution": [
"32",
"6048",
@@ -4135,281 +4212,281 @@
"6048",
"4024",
"OUTPUT",
- "33",
- "6048",
- "4024",
+ "33",
+ "6048",
+ "4024",
"OUTPUT",
- "35",
- "6048",
- "4024",
+ "35",
+ "6048",
+ "4024",
"OUTPUT"
],
"android.scaler.croppingType": [
"CENTER_ONLY"
- ],
+ ],
"android.scaler.physicalCameraMultiResolutionStreamConfigurations": [
- "34",
- "2048",
- "1536",
- "INPUT",
- "35",
- "2048",
- "1536",
+ "34",
+ "2048",
+ "1536",
"INPUT",
- "33",
- "2048",
- "1536",
- "OUTPUT",
- "34",
- "2048",
- "1536",
- "OUTPUT",
- "35",
- "2048",
- "1536",
+ "35",
+ "2048",
+ "1536",
+ "INPUT",
+ "33",
+ "2048",
+ "1536",
+ "OUTPUT",
+ "34",
+ "2048",
+ "1536",
+ "OUTPUT",
+ "35",
+ "2048",
+ "1536",
"OUTPUT"
- ],
+ ],
"android.sensor.availableTestPatternModes": [
- "0",
+ "0",
"5"
- ],
+ ],
"android.sensor.blackLevelPattern": [
- "64",
- "64",
- "64",
+ "64",
+ "64",
+ "64",
"64"
- ],
+ ],
"android.sensor.calibrationTransform1": [
- "68",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "78",
+ "68",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "78",
"128"
- ],
+ ],
"android.sensor.calibrationTransform2": [
- "97",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "128",
- "128",
- "0",
- "128",
- "0",
- "128",
- "0",
- "128",
- "41",
+ "97",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "128",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "0",
+ "128",
+ "41",
"128"
- ],
+ ],
"android.sensor.colorTransform1": [
- "221",
- "128",
- "-105",
- "128",
- "-34",
- "128",
- "-124",
- "128",
- "240",
- "128",
- "5",
- "128",
- "5",
- "128",
- "-19",
- "128",
- "99",
+ "221",
+ "128",
+ "-105",
+ "128",
+ "-34",
+ "128",
+ "-124",
+ "128",
+ "240",
+ "128",
+ "5",
+ "128",
+ "5",
+ "128",
+ "-19",
+ "128",
+ "99",
"128"
- ],
+ ],
"android.sensor.colorTransform2": [
- "360",
- "128",
- "-249",
- "128",
- "-63",
- "128",
- "-137",
- "128",
- "279",
- "128",
- "-1",
- "128",
- "7",
- "128",
- "-18",
- "128",
- "159",
+ "360",
+ "128",
+ "-249",
+ "128",
+ "-63",
+ "128",
+ "-137",
+ "128",
+ "279",
+ "128",
+ "-1",
+ "128",
+ "7",
+ "128",
+ "-18",
+ "128",
+ "159",
"128"
- ],
+ ],
"android.sensor.forwardMatrix1": [
- "56",
- "128",
- "49",
- "128",
- "18",
- "128",
- "28",
- "128",
- "92",
- "128",
- "8",
- "128",
- "2",
- "128",
- "12",
- "128",
- "91",
+ "56",
+ "128",
+ "49",
+ "128",
+ "18",
+ "128",
+ "28",
+ "128",
+ "92",
+ "128",
+ "8",
+ "128",
+ "2",
+ "128",
+ "12",
+ "128",
+ "91",
"128"
- ],
+ ],
"android.sensor.forwardMatrix2": [
- "56",
- "128",
- "49",
- "128",
- "18",
- "128",
- "28",
- "128",
- "92",
- "128",
- "8",
- "128",
- "2",
- "128",
- "12",
- "128",
- "91",
+ "56",
+ "128",
+ "49",
+ "128",
+ "18",
+ "128",
+ "28",
+ "128",
+ "92",
+ "128",
+ "8",
+ "128",
+ "2",
+ "128",
+ "12",
+ "128",
+ "91",
"128"
- ],
+ ],
"android.sensor.info.activeArraySize": [
- "0",
- "0",
- "2048",
+ "0",
+ "0",
+ "2048",
"1536"
- ],
+ ],
"android.sensor.info.activeArraySizeMaximumResolution": [
- "0",
- "0",
- "6048",
+ "0",
+ "0",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.colorFilterArrangement": [
"RGGB"
- ],
+ ],
"android.sensor.info.exposureTimeRange": [
- "9377",
+ "9377",
"13388615424"
- ],
+ ],
"android.sensor.info.lensShadingApplied": [
"TRUE"
- ],
+ ],
"android.sensor.info.maxFrameDuration": [
"1319055264"
- ],
+ ],
"android.sensor.info.physicalSize": [
- "4.65600014",
+ "4.65600014",
"3.49600005"
- ],
+ ],
"android.sensor.info.pixelArraySize": [
- "2048",
+ "2048",
"1536"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySize": [
- "0",
- "0",
- "2048",
+ "0",
+ "0",
+ "2048",
"1536"
- ],
+ ],
"android.sensor.info.pixelArraySizeMaximumResolution": [
- "6048",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.preCorrectionActiveArraySizeMaximumResolution": [
- "0",
- "0",
- "6048",
+ "0",
+ "0",
+ "6048",
"4024"
- ],
+ ],
"android.sensor.info.binningFactor": [
"2",
"2"
],
"android.sensor.info.sensitivityRange": [
- "100",
+ "100",
"1000"
- ],
+ ],
"android.sensor.info.timestampSource": [
"REALTIME"
- ],
+ ],
"android.sensor.info.whiteLevel": [
"1023"
- ],
+ ],
"android.sensor.maxAnalogSensitivity": [
"640"
- ],
+ ],
"android.sensor.orientation": [
"270"
- ],
+ ],
"android.sensor.profileHueSatMapDimensions": [
- "0",
- "0",
+ "0",
+ "0",
"0"
- ],
+ ],
"android.sensor.referenceIlluminant1": [
"D65"
- ],
+ ],
"android.sensor.referenceIlluminant2": [
"17"
- ],
+ ],
"android.shading.availableModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableFaceDetectModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.statistics.info.availableHotPixelMapModes": [
"0"
- ],
+ ],
"android.statistics.info.availableLensShadingMapModes": [
- "0",
+ "0",
"1"
- ],
+ ],
"android.statistics.info.maxFaceCount": [
"10"
- ],
+ ],
"android.info.supportedBufferManagementVersion" : [
- "HIDL_DEVICE_3_5"
- ],
+ "HIDL_DEVICE_3_5"
+ ],
"android.sync.maxLatency": [
"PER_FRAME_CONTROL"
- ],
+ ],
"android.tonemap.availableToneMapModes": [
- "0",
- "1",
+ "0",
+ "1",
"2"
- ],
+ ],
"android.tonemap.maxCurvePoints": [
"64"
]
diff --git a/devices/EmulatedCamera/hwl/tools/parse_bugreport.py b/devices/EmulatedCamera/hwl/tools/parse_bugreport.py
index c806ddd..553b999 100755
--- a/devices/EmulatedCamera/hwl/tools/parse_bugreport.py
+++ b/devices/EmulatedCamera/hwl/tools/parse_bugreport.py
@@ -45,10 +45,16 @@ def parseCameraDump(deviceId, cameraDumpPath, tagList):
physicalDeviceRegExp = "Physical camera [0-9] characteristics:"
tagRegExp = " {4}android[a-zA-Z0-9\.]+ \([a-z0-9]+\): "
tagValueRegExp = "[^a-zA-Z0-9-\._]"
+ expandedTagsRegExp = " \(.*?\)"
+ expandedMetadataTags = ["android.request.availableRequestKeys",
+ "android.request.availableResultKeys",
+ "android.request.availableSessionKeys",
+ "android.request.availableCharacteristicsKeys",
+ "android.request.availablePhysicalCameraRequestKeys"]
with open(cameraDumpPath, "r") as file:
devices = re.split(deviceRegExp, file.read())
if len(devices) != 3 and len(devices) != 2:
- print "Camera device id: {0} not found".format(deviceId)
+ print("Camera device id: {0} not found".format(deviceId))
sys.exit()
physicalDevices = re.split(physicalDeviceRegExp, devices[1])
@@ -66,12 +72,12 @@ def parseCameraDump(deviceId, cameraDumpPath, tagList):
lines = tag.splitlines()
if len(lines) < 2:
- print "Empty tag entry, skipping!"
+ print("Empty tag entry, skipping!")
continue
tagName = tagsContent[i].split()[0]
if tagName is None or len(tagName) < 1:
- print "Invalid tag found, skipping!"
+ print("Invalid tag found, skipping!")
continue
i += 1
@@ -82,9 +88,14 @@ def parseCameraDump(deviceId, cameraDumpPath, tagList):
values = re.split(r' {8}', line)
if len(values) == 2:
+ # For all the tags which have expanded values of the tag ids, remove the
+ # expanded value in round brackets when generating the json file.
+ if tagName in expandedMetadataTags:
+ # replace everything between '<space>(' and ')' with an empty string.
+ values[1] = re.sub(expandedTagsRegExp, "", values[1])
key = tagName
- tagValues = filter(None, re.split(tagValueRegExp, values[1]))
- if deviceChars.has_key(key):
+ tagValues = list(filter(None, re.split(tagValueRegExp, values[1])))
+ if key in deviceChars:
deviceChars[key] = deviceChars[key] + tagValues
else:
deviceChars[key] = tagValues
@@ -103,7 +114,7 @@ if __name__ == '__main__':
deviceId = str(sys.argv[2])
configPath = str(sys.argv[3])
else:
- print "Usage: parse_bugreport.py PathToBugreport DeviceId JSONConfigurationPath"
+ print("Usage: parse_bugreport.py PathToBugreport DeviceId JSONConfigurationPath")
sys.exit();
with zipfile.ZipFile(bugreportPath) as bugzip:
diff --git a/devices/EmulatedCamera/hwl/utils/ExifUtils.h b/devices/EmulatedCamera/hwl/utils/ExifUtils.h
index e41a706..7e02c6b 100644
--- a/devices/EmulatedCamera/hwl/utils/ExifUtils.h
+++ b/devices/EmulatedCamera/hwl/utils/ExifUtils.h
@@ -43,6 +43,14 @@ enum ExifOrientation : uint16_t {
ORIENTATION_270_DEGREES = 0x8,
};
+enum ExifColorSpace : uint16_t {
+ COLOR_SPACE_SRGB = 0x1,
+ COLOR_SPACE_ADOBE_RGB = 0x2,
+ COLOR_SPACE_WIDE_GAMUT_RGB = 0xFFFD,
+ COLOR_SPACE_ICC_PROFILE = 0xFFFE,
+ COLOR_SPACE_UNCALIBRATED = 0xFFFF
+};
+
// This is based on the camera HIDL shim implementation, which was in turned
// based on original ChromeOS ARC implementation of a V4L2 HAL
class ExifUtils {
diff --git a/devices/EmulatedCamera/hwl/utils/HWLUtils.cpp b/devices/EmulatedCamera/hwl/utils/HWLUtils.cpp
index b444465..f034a7a 100644
--- a/devices/EmulatedCamera/hwl/utils/HWLUtils.cpp
+++ b/devices/EmulatedCamera/hwl/utils/HWLUtils.cpp
@@ -24,8 +24,28 @@
namespace android {
+using google_camera_hal::ColorSpaceProfile;
+using google_camera_hal::DynamicRangeProfile;
using google_camera_hal::utils::HasCapability;
+static int64_t GetLastStreamUseCase(const HalCameraMetadata* metadata) {
+ status_t ret = OK;
+ camera_metadata_ro_entry_t entry;
+ int64_t cropped_raw_use_case =
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW;
+ int64_t video_call_use_case =
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL;
+ ret = metadata->Get(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, &entry);
+ if (ret != OK) {
+ return ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT;
+ }
+ if (std::find(entry.data.i64, entry.data.i64 + entry.count,
+ cropped_raw_use_case) != entry.data.i64 + entry.count) {
+ return cropped_raw_use_case;
+ }
+ return video_call_use_case;
+}
+
status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
SensorCharacteristics* sensor_chars /*out*/) {
if ((metadata == nullptr) || (sensor_chars == nullptr)) {
@@ -52,6 +72,37 @@ status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
sensor_chars->quad_bayer_sensor = true;
}
+ if (sensor_chars->quad_bayer_sensor) {
+ ret = metadata->Get(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, &entry);
+ if ((ret == OK) && (entry.count == 4)) {
+ google_camera_hal::Rect rect;
+ if (google_camera_hal::utils::GetSensorActiveArraySize(metadata, &rect) !=
+ OK) {
+ return BAD_VALUE;
+ }
+ sensor_chars->raw_crop_region_unzoomed[0] = rect.left; // left
+ sensor_chars->raw_crop_region_unzoomed[1] = rect.top; // top
+ sensor_chars->raw_crop_region_unzoomed[2] = rect.right; // right
+ sensor_chars->raw_crop_region_unzoomed[3] = rect.bottom; // bottom
+
+ // 2x zoom , raw crop width / height = 1/2 sensor width / height. top /
+ // left edge = 1/4 sensor width. bottom / right edge = 1/2 + 1 /4 * sensor
+ // width / height: Refer to case 1 in
+ // https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#SCALER_CROP_REGION
+ // for a visual representation.
+ sensor_chars->raw_crop_region_zoomed[0] =
+ rect.left + (rect.right - rect.left) / 4; // left
+ sensor_chars->raw_crop_region_zoomed[1] =
+ rect.top + (rect.bottom - rect.top) / 4; // top
+ sensor_chars->raw_crop_region_zoomed[2] =
+ sensor_chars->raw_crop_region_zoomed[0] +
+ (rect.right - rect.left) / 2; // right
+ sensor_chars->raw_crop_region_zoomed[3] =
+ sensor_chars->raw_crop_region_zoomed[1] +
+ (rect.bottom - rect.top) / 2; // bottom
+ }
+ }
+
ret = metadata->Get(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, &entry);
if ((ret != OK) || (entry.count != 3)) {
ALOGE("%s: Invalid ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS!", __FUNCTION__);
@@ -75,11 +126,8 @@ status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
for (size_t i = 0; i < entry.count; i += 3) {
sensor_chars->dynamic_range_profiles.emplace(
- static_cast<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map>(
- entry.data.i64[i]),
- std::unordered_set<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map>());
+ static_cast<DynamicRangeProfile>(entry.data.i64[i]),
+ std::unordered_set<DynamicRangeProfile>());
const auto profile_end =
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO
<< 1;
@@ -88,13 +136,8 @@ status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
for (; current_profile != profile_end; current_profile <<= 1) {
if (entry.data.i64[i + 1] & current_profile) {
sensor_chars->dynamic_range_profiles
- .at(static_cast<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map>(
- entry.data.i64[i]))
- .emplace(
- static_cast<
- camera_metadata_enum_android_request_available_dynamic_range_profiles_map>(
- current_profile));
+ .at(static_cast<DynamicRangeProfile>(entry.data.i64[i]))
+ .emplace(static_cast<DynamicRangeProfile>(current_profile));
}
}
}
@@ -102,6 +145,53 @@ status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
sensor_chars->is_10bit_dynamic_range_capable = true;
}
+ if (HasCapability(
+ metadata,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES)) {
+ ret = metadata->Get(ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP,
+ &entry);
+ if ((ret != OK) || ((entry.count % 3) != 0)) {
+ ALOGE("%s: Invalid ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP!",
+ __FUNCTION__);
+ return BAD_VALUE;
+ }
+
+ for (size_t i = 0; i < entry.count; i += 3) {
+ ColorSpaceProfile color_space =
+ static_cast<ColorSpaceProfile>(entry.data.i64[i]);
+ int image_format = static_cast<int>(entry.data.i64[i + 1]);
+
+ if (sensor_chars->color_space_profiles.find(color_space) ==
+ sensor_chars->color_space_profiles.end()) {
+ sensor_chars->color_space_profiles.emplace(
+ color_space,
+ std::unordered_map<int, std::unordered_set<DynamicRangeProfile>>());
+ }
+
+ std::unordered_map<int, std::unordered_set<DynamicRangeProfile>>&
+ image_format_map = sensor_chars->color_space_profiles.at(color_space);
+
+ if (image_format_map.find(image_format) == image_format_map.end()) {
+ image_format_map.emplace(image_format,
+ std::unordered_set<DynamicRangeProfile>());
+ }
+
+ const auto profile_end =
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO
+ << 1;
+ uint64_t current_profile =
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD;
+ for (; current_profile != profile_end; current_profile <<= 1) {
+ if (entry.data.i64[i + 2] & current_profile) {
+ image_format_map.at(image_format)
+ .emplace(static_cast<DynamicRangeProfile>(current_profile));
+ }
+ }
+ }
+
+ sensor_chars->support_color_space_profiles = true;
+ }
+
if (HasCapability(metadata,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR)) {
ret = metadata->Get(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, &entry);
@@ -199,6 +289,22 @@ status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
sensor_chars->color_filter.bX = RAT_TO_FLOAT(entry.data.r[6]);
sensor_chars->color_filter.bY = RAT_TO_FLOAT(entry.data.r[7]);
sensor_chars->color_filter.bZ = RAT_TO_FLOAT(entry.data.r[8]);
+
+ ret = metadata->Get(ANDROID_SENSOR_FORWARD_MATRIX1, &entry);
+ if ((ret != OK) || (entry.count != (3 * 3))) {
+ ALOGE("%s: Invalid ANDROID_SENSOR_FORWARD_MATRIX1!", __FUNCTION__);
+ return BAD_VALUE;
+ }
+
+ sensor_chars->forward_matrix.rX = RAT_TO_FLOAT(entry.data.r[0]);
+ sensor_chars->forward_matrix.gX = RAT_TO_FLOAT(entry.data.r[1]);
+ sensor_chars->forward_matrix.bX = RAT_TO_FLOAT(entry.data.r[2]);
+ sensor_chars->forward_matrix.rY = RAT_TO_FLOAT(entry.data.r[3]);
+ sensor_chars->forward_matrix.gY = RAT_TO_FLOAT(entry.data.r[4]);
+ sensor_chars->forward_matrix.bY = RAT_TO_FLOAT(entry.data.r[5]);
+ sensor_chars->forward_matrix.rZ = RAT_TO_FLOAT(entry.data.r[6]);
+ sensor_chars->forward_matrix.gZ = RAT_TO_FLOAT(entry.data.r[7]);
+ sensor_chars->forward_matrix.bZ = RAT_TO_FLOAT(entry.data.r[8]);
} else {
sensor_chars->color_arangement = static_cast<
camera_metadata_enum_android_sensor_info_color_filter_arrangement>(
@@ -258,6 +364,8 @@ status_t GetSensorCharacteristics(const HalCameraMetadata* metadata,
if (HasCapability(metadata,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE)) {
sensor_chars->support_stream_use_case = true;
+ sensor_chars->end_valid_stream_use_case = GetLastStreamUseCase(metadata);
+
} else {
sensor_chars->support_stream_use_case = false;
}