display: Add color Metadata
- Add color aspects and HDR10 related static metadata
which will be used in the existing metadata structure.
- Clients can use COLOR_METADATA to update the CSC
information
- UPDATE_COLOR_SPACE is legacy and will be used when
COLOR_METADATA is not set.
- Update gralloc to return color space when set from
COLOR_METADATA
- Gaurd the usage with USE_COLOR_METADATA for cobalt.
Change-Id: I460accf6cd2bb7a305c7e93284955e566a5b7532
Crs-fixed: 1074172
diff --git a/libqdutils/qdMetaData.h b/libqdutils/qdMetaData.h
index 2b0b8c6..a0ac324 100644
--- a/libqdutils/qdMetaData.h
+++ b/libqdutils/qdMetaData.h
@@ -30,6 +30,10 @@
#ifndef _QDMETADATA_H
#define _QDMETADATA_H
+#ifdef USE_COLOR_METADATA
+#include <color_metadata.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -91,11 +95,15 @@
/* Set by camera to program the VT Timestamp */
uint64_t vtTimeStamp;
+#ifdef USE_COLOR_METADATA
+ /* Color Aspects + HDR info */
+ ColorMetaData color;
+#endif
};
enum DispParamType {
SET_VT_TIMESTAMP = 0x0001,
- UNUSED1 = 0x0002,
+ COLOR_METADATA = 0x0002,
PP_PARAM_INTERLACED = 0x0004,
UNUSED2 = 0x0008,
UNUSED3 = 0x0010,
@@ -114,6 +122,7 @@
enum DispFetchParamType {
GET_VT_TIMESTAMP = 0x0001,
+ GET_COLOR_METADATA = 0x0002,
GET_PP_PARAM_INTERLACED = 0x0004,
GET_BUFFER_GEOMETRY = 0x0080,
GET_REFRESH_RATE = 0x0100,