summaryrefslogtreecommitdiff
path: root/libqdutils
diff options
context:
space:
mode:
authorAshwini Rao <ashwinik@codeaurora.org>2017-11-28 12:12:46 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-14 16:34:22 -0800
commit6e616961beef8cfa69ba1bf53811dc57e47c1e1c (patch)
treef3e335eb919627f8ebe68be1c02c086fabf1b93e /libqdutils
parent24c703304edcaabd0aa38fce347c1bb0021681cb (diff)
libqdutils: Add Video performance mode metadata
Add Video performance mode flag to the gralloc buffer metadata CRs-Fixed: 2159379 Change-Id: Ifacabf55a45eb77b890ed278ad23c9a5d37d3382
Diffstat (limited to 'libqdutils')
-rw-r--r--libqdutils/qdMetaData.cpp9
-rw-r--r--libqdutils/qdMetaData.h6
2 files changed, 14 insertions, 1 deletions
diff --git a/libqdutils/qdMetaData.cpp b/libqdutils/qdMetaData.cpp
index af2adf7f..3ccbc993 100644
--- a/libqdutils/qdMetaData.cpp
+++ b/libqdutils/qdMetaData.cpp
@@ -132,6 +132,9 @@ int setMetaDataVa(MetaData_t *data, DispParamType paramType,
}
break;
}
+ case SET_VIDEO_PERF_MODE:
+ data->isVideoPerfMode = *((uint32_t *)param);
+ break;
default:
ALOGE("Unknown paramType %d", paramType);
break;
@@ -266,6 +269,12 @@ int getMetaDataVa(MetaData_t *data, DispFetchParamType paramType,
ret = 0;
}
break;
+ case GET_VIDEO_PERF_MODE:
+ if (data->operation & SET_VIDEO_PERF_MODE) {
+ *((uint32_t *)param) = data->isVideoPerfMode;
+ ret = 0;
+ }
+ break;
default:
ALOGE("Unknown paramType %d", paramType);
break;
diff --git a/libqdutils/qdMetaData.h b/libqdutils/qdMetaData.h
index e704f6c0..237c6f84 100644
--- a/libqdutils/qdMetaData.h
+++ b/libqdutils/qdMetaData.h
@@ -138,13 +138,16 @@ struct MetaData_t {
* [1] : Bottom field, if it is interlaced.
*/
struct UBWCStats ubwcCRStats[2];
+ /* Set by camera to indicate that this buffer will be used for a High
+ * Performance Video Usecase */
+ uint32_t isVideoPerfMode;
};
enum DispParamType {
SET_VT_TIMESTAMP = 0x0001,
COLOR_METADATA = 0x0002,
PP_PARAM_INTERLACED = 0x0004,
- UNUSED2 = 0x0008,
+ SET_VIDEO_PERF_MODE = 0x0008,
UNUSED3 = 0x0010,
UNUSED4 = 0x0020,
SET_UBWC_CR_STATS_INFO = 0x0040,
@@ -163,6 +166,7 @@ enum DispFetchParamType {
GET_VT_TIMESTAMP = 0x0001,
GET_COLOR_METADATA = 0x0002,
GET_PP_PARAM_INTERLACED = 0x0004,
+ GET_VIDEO_PERF_MODE = 0x0008,
GET_UBWC_CR_STATS_INFO = 0x0040,
GET_BUFFER_GEOMETRY = 0x0080,
GET_REFRESH_RATE = 0x0100,