diff options
author | Arun Kumar K.R <akumarkr@codeaurora.org> | 2016-10-03 21:38:23 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-14 02:16:36 -0800 |
commit | b2771bff77d962ef662ee18217af8693bc760e0c (patch) | |
tree | 80689fb7f0fd16ca4a11cdf2423c6d89887cfb3e /libqdutils | |
parent | 8b3dddc082fffaa0906e625b8abccf4a7fe80767 (diff) | |
download | display-b2771bff77d962ef662ee18217af8693bc760e0c.tar.gz |
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
Diffstat (limited to 'libqdutils')
-rw-r--r-- | libqdutils/qdMetaData.cpp | 10 | ||||
-rw-r--r-- | libqdutils/qdMetaData.h | 11 |
2 files changed, 20 insertions, 1 deletions
diff --git a/libqdutils/qdMetaData.cpp b/libqdutils/qdMetaData.cpp index f62653ab..c888baaf 100644 --- a/libqdutils/qdMetaData.cpp +++ b/libqdutils/qdMetaData.cpp @@ -95,6 +95,11 @@ int setMetaData(private_handle_t *handle, DispParamType paramType, case SET_VT_TIMESTAMP: data->vtTimeStamp = *((uint64_t *)param); break; +#ifdef USE_COLOR_METADATA + case COLOR_METADATA: + data->color = *((ColorMetaData *)param); +#endif + break; default: ALOGE("Unknown paramType %d", paramType); break; @@ -196,6 +201,11 @@ int getMetaData(private_handle_t *handle, DispFetchParamType paramType, case GET_VT_TIMESTAMP: *((uint64_t *)param) = data->vtTimeStamp; break; +#ifdef USE_COLOR_METADATA + case GET_COLOR_METADATA: + *((ColorMetaData *)param) = data->color; +#endif + break; default: ALOGE("Unknown paramType %d", paramType); break; diff --git a/libqdutils/qdMetaData.h b/libqdutils/qdMetaData.h index 2b0b8c61..a0ac324d 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 @@ struct MetaData_t { /* 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 DispParamType { enum DispFetchParamType { GET_VT_TIMESTAMP = 0x0001, + GET_COLOR_METADATA = 0x0002, GET_PP_PARAM_INTERLACED = 0x0004, GET_BUFFER_GEOMETRY = 0x0080, GET_REFRESH_RATE = 0x0100, |