summaryrefslogtreecommitdiff
path: root/camera
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-02-24 00:27:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-02-24 00:27:29 +0000
commit0bd7074e39ae10525a16b41337b1f2c34d6f4d11 (patch)
treee8094dae85588d89d10ac1aec950ca6fec706008 /camera
parentbfcec89acb7d87f2cfb69ca8e77869c44b4a5130 (diff)
parent4ce76d242c67bf24a688c7d5a2ea28cba42ad776 (diff)
Merge "Camera: Use 64bit integers for dynamic range profile values" into tm-dev
Diffstat (limited to 'camera')
-rw-r--r--camera/metadata/3.8/types.hal4
-rw-r--r--camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl2
-rw-r--r--camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl2
-rw-r--r--camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl2
-rw-r--r--camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp18
5 files changed, 14 insertions, 14 deletions
diff --git a/camera/metadata/3.8/types.hal b/camera/metadata/3.8/types.hal
index 1b1a7a263b..06839873c3 100644
--- a/camera/metadata/3.8/types.hal
+++ b/camera/metadata/3.8/types.hal
@@ -87,7 +87,7 @@ enum CameraMetadataTag : @3.7::CameraMetadataTag {
*/
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP = android.hardware.camera.metadata@3.4::CameraMetadataTag:ANDROID_REQUEST_END_3_4,
- /** android.request.recommendedTenBitDynamicRangeProfile [static, int32, java_public]
+ /** android.request.recommendedTenBitDynamicRangeProfile [static, int64, java_public]
*
* <p>Recommended 10-bit dynamic range profile.</p>
*/
@@ -154,7 +154,7 @@ enum CameraMetadataEnumAndroidRequestAvailableCapabilities :
/** android.request.availableDynamicRangeProfilesMap enumeration values
* @see ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
*/
-enum CameraMetadataEnumAndroidRequestAvailableDynamicRangeProfilesMap : uint32_t {
+enum CameraMetadataEnumAndroidRequestAvailableDynamicRangeProfilesMap : int64_t {
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD
= 0x1,
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 0x2,
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
index cec4ac16ab..16e38ba90f 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
@@ -36,7 +36,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.camera.metadata;
-@Backing(type="int") @VintfStability
+@Backing(type="long") @VintfStability
enum RequestAvailableDynamicRangeProfilesMap {
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 1,
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 2,
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
index 1f388d9c38..f20a06edae 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
@@ -1024,7 +1024,7 @@ enum CameraMetadataTag {
*/
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP,
/**
- * android.request.recommendedTenBitDynamicRangeProfile [static, int32, java_public]
+ * android.request.recommendedTenBitDynamicRangeProfile [static, int64, java_public]
*
* <p>Recommended 10-bit dynamic range profile.</p>
*/
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
index c0ef8c663a..319be75abe 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
@@ -27,7 +27,7 @@ package android.hardware.camera.metadata;
* @see ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
*/
@VintfStability
-@Backing(type="int")
+@Backing(type="long")
enum RequestAvailableDynamicRangeProfilesMap {
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 0x1,
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 0x2,
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 7e5e8b2bae..ab867cd4af 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -8287,21 +8287,21 @@ void CameraHidlTest::get10BitDynamicRangeProfiles(const camera_metadata_t* stati
ASSERT_NE(nullptr, staticMeta);
ASSERT_NE(nullptr, profiles);
camera_metadata_ro_entry entry;
- std::unordered_set<int32_t> entries;
+ std::unordered_set<int64_t> entries;
int rc = find_camera_metadata_ro_entry(staticMeta,
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP, &entry);
ASSERT_EQ(rc, 0);
ASSERT_TRUE(entry.count > 0);
- ASSERT_EQ(entry.count % 2, 0);
+ ASSERT_EQ(entry.count % 3, 0);
- for (uint32_t i = 0; i < entry.count; i += 2) {
- ASSERT_NE(entry.data.i32[i],
+ for (uint32_t i = 0; i < entry.count; i += 3) {
+ ASSERT_NE(entry.data.i64[i],
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD);
- ASSERT_EQ(entries.find(entry.data.i32[i]), entries.end());
- entries.insert(static_cast<int32_t>(entry.data.i32[i]));
+ ASSERT_EQ(entries.find(entry.data.i64[i]), entries.end());
+ entries.insert(entry.data.i64[i]);
profiles->emplace_back(
static_cast<CameraMetadataEnumAndroidRequestAvailableDynamicRangeProfilesMap>
- (entry.data.i32[i]));
+ (entry.data.i64[i]));
}
if (!entries.empty()) {
@@ -8335,7 +8335,7 @@ void CameraHidlTest::verify10BitMetadata(HandleImporter& importer,
bool smpte2094_40Present = importer.isSmpte2094_40Present(
b.buffer.buffer.getNativeHandle());
- switch (static_cast<uint32_t>(profile)) {
+ switch (static_cast<int64_t>(profile)) {
case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10:
ASSERT_FALSE(smpte2086Present);
ASSERT_FALSE(smpte2094_10Present);
@@ -8364,7 +8364,7 @@ void CameraHidlTest::verify10BitMetadata(HandleImporter& importer,
ASSERT_FALSE(smpte2094_40Present);
break;
default:
- ALOGE("%s: Unexpected 10-bit dynamic range profile: %d",
+ ALOGE("%s: Unexpected 10-bit dynamic range profile: %" PRId64,
__FUNCTION__, profile);
ADD_FAILURE();
}