From 8893a3b62647d28bb424b8e9fece64e880997ba9 Mon Sep 17 00:00:00 2001 From: Sally Qi Date: Thu, 2 Jun 2022 12:55:49 -0700 Subject: [PATCH] Add Depth into DataSpace API. Bug: 205034862 Test: builds Change-Id: Ie859fc46a553df03819250f9f7f8408bbacc43f2 --- core/api/current.txt | 2 ++ core/java/android/hardware/DataSpace.java | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index be849c78f8458..9ad5adbb288e1 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -16852,6 +16852,8 @@ package android.hardware { field public static final int DATASPACE_SRGB = 142671872; // 0x8810000 field public static final int DATASPACE_SRGB_LINEAR = 138477568; // 0x8410000 field public static final int DATASPACE_UNKNOWN = 0; // 0x0 + field public static final int DEPTH = 4096; // 0x1000 + field public static final int DYNAMIC_DEPTH = 4098; // 0x1002 field public static final int RANGE_EXTENDED = 402653184; // 0x18000000 field public static final int RANGE_FULL = 134217728; // 0x8000000 field public static final int RANGE_LIMITED = 268435456; // 0x10000000 diff --git a/core/java/android/hardware/DataSpace.java b/core/java/android/hardware/DataSpace.java index 9734ab63457c6..82ea4af466531 100644 --- a/core/java/android/hardware/DataSpace.java +++ b/core/java/android/hardware/DataSpace.java @@ -385,6 +385,28 @@ public final class DataSpace { */ public static final int RANGE_EXTENDED = 3 << 27; + /** @hide */ + @Retention(RetentionPolicy.SOURCE) + @IntDef(flag = true, value = { + DEPTH, + DYNAMIC_DEPTH, + }) + public @interface DataSpaceDepth {}; + + /** + * Depth. + * + * This value is valid with formats HAL_PIXEL_FORMAT_Y16 and HAL_PIXEL_FORMAT_BLOB. + */ + public static final int DEPTH = 4096; + + /** + * ISO 16684-1:2011(E) Dynamic Depth. + * + * Embedded depth metadata following the dynamic depth specification. + */ + public static final int DYNAMIC_DEPTH = 4098; + /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, value = {