summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-06-20 05:20:33 -0700
committerLinux Build Service Account <lnxbuild@localhost>2022-06-20 05:20:33 -0700
commit62ad5cfcc73a3d85e1b185b038872187815adcac (patch)
treec28e142e996ae10cc644faa398e22f2445ff34b3
parente30fff9d85cd91dc35b819e7df9f988cca93cd6f (diff)
parente28c2d2e0c870b5d68ccdcd3a55fe4fa3ea3d040 (diff)
Merge e28c2d2e0c870b5d68ccdcd3a55fe4fa3ea3d040 on remote branch
Change-Id: I23ef43cc7abf63d6138144732a05e5c4da63a6bf
-rw-r--r--gralloc/QtiGralloc.h9
-rw-r--r--gralloc/QtiGrallocMetadata.h11
-rw-r--r--gralloc/QtiGrallocPriv.h13
3 files changed, 28 insertions, 5 deletions
diff --git a/gralloc/QtiGralloc.h b/gralloc/QtiGralloc.h
index c95368aa..c8e4ef8c 100644
--- a/gralloc/QtiGralloc.h
+++ b/gralloc/QtiGralloc.h
@@ -96,6 +96,9 @@ static const MetadataType MetadataType_CVPMetadata = {VENDOR_QTI, QTI_CVP_METADA
static const MetadataType MetadataType_VideoHistogramStats = {VENDOR_QTI,
QTI_VIDEO_HISTOGRAM_STATS};
+static const MetadataType MetadataType_VideoTranscodeStats = {VENDOR_QTI,
+ QTI_VIDEO_TRANSCODE_STATS};
+
static const MetadataType MetadataType_VideoTimestampInfo = {VENDOR_QTI, QTI_VIDEO_TS_INFO};
static const MetadataType MetadataType_FD = {VENDOR_QTI, QTI_FD};
@@ -131,6 +134,8 @@ static const MetadataType MetadataType_BufferPermission = {VENDOR_QTI, QTI_BUFFE
static const MetadataType MetadataType_MemHandle = {VENDOR_QTI, QTI_MEM_HANDLE};
static const MetadataType MetadataType_TimedRendering = {VENDOR_QTI, QTI_TIMED_RENDERING};
+static const MetadataType MetadataType_CustomContentMetadata = {VENDOR_QTI,
+ QTI_CUSTOM_CONTENT_METADATA};
// 0 is also used as invalid value in standard metadata
static const MetadataType MetadataType_Invalid = {VENDOR_QTI, 0};
@@ -159,12 +164,16 @@ Error decodeCVPMetadata(hidl_vec<uint8_t> &in, CVPMetadata *out);
Error encodeCVPMetadata(CVPMetadata &in, hidl_vec<uint8_t> *out);
Error decodeVideoHistogramMetadata(hidl_vec<uint8_t> &in, VideoHistogramMetadata *out);
Error encodeVideoHistogramMetadata(VideoHistogramMetadata &in, hidl_vec<uint8_t> *out);
+Error decodeVideoTranscodeStatsMetadata(hidl_vec<uint8_t> &in, VideoTranscodeStatsMetadata *out);
+Error encodeVideoTranscodeStatsMetadata(VideoTranscodeStatsMetadata &in, hidl_vec<uint8_t> *out);
Error decodeVideoTimestampInfo(hidl_vec<uint8_t> &in, VideoTimestampInfo *out);
Error encodeVideoTimestampInfo(VideoTimestampInfo &in, hidl_vec<uint8_t> *out);
Error decodeYUVPlaneInfoMetadata(hidl_vec<uint8_t> &in, qti_ycbcr *out);
Error encodeYUVPlaneInfoMetadata(qti_ycbcr *in, hidl_vec<uint8_t> *out);
Error decodeBufferPermission(hidl_vec<uint8_t> &in, BufferPermission *out);
Error encodeBufferPermission(BufferPermission *in, hidl_vec<uint8_t> *out);
+Error decodeCustomContentMetadata(hidl_vec<uint8_t> &in, void *out);
+Error encodeCustomContentMetadata(const void *in, hidl_vec<uint8_t> *out);
} // namespace qtigralloc
#endif //__QTIGRALLOC_H__
diff --git a/gralloc/QtiGrallocMetadata.h b/gralloc/QtiGrallocMetadata.h
index 506fd2e9..98a12c67 100644
--- a/gralloc/QtiGrallocMetadata.h
+++ b/gralloc/QtiGrallocMetadata.h
@@ -70,7 +70,9 @@
#define QTI_BUFFER_PERMISSION 10026
#define QTI_MEM_HANDLE 10027
#define QTI_TIMED_RENDERING 10028
-
+#define QTI_CUSTOM_CONTENT_METADATA 10029
+// Video transcode metadata stat
+#define QTI_VIDEO_TRANSCODE_STATS 10030
// Used to indicate to framework that internal definitions are used instead
#define COMPRESSION_QTI_UBWC 20001
#define INTERLACED_QTI 20002
@@ -167,6 +169,13 @@ struct VideoHistogramMetadata {
uint32_t reserved[12];
};
+#define VIDEO_TRANSCODE_STATS_SIZE 128 //32 payloads with 4 bytes each: 4x32 = 128
+#define VIDEO_TRANSCODE_PAYLOAD_NUM 32
+struct VideoTranscodeStatsMetadata {
+ uint32_t stats_info[VIDEO_TRANSCODE_PAYLOAD_NUM]; /* Transcode stats payload */
+ uint32_t stat_len; /* Full payload size in bytes */
+};
+
#define VIDEO_TIMESTAMP_INFO_SIZE 16
struct VideoTimestampInfo {
uint32_t enable; /* Enable video timestamp info */
diff --git a/gralloc/QtiGrallocPriv.h b/gralloc/QtiGrallocPriv.h
index 13d8f8b8..56e2b1bc 100644
--- a/gralloc/QtiGrallocPriv.h
+++ b/gralloc/QtiGrallocPriv.h
@@ -122,7 +122,7 @@ struct MetaData_t {
/* Populated and used by adreno during buffer size calculation.
* Set only for RGB formats. */
GraphicsMetadata graphics_metadata;
- /* Video hisogram stats populated by video decoder */
+ /* Video histogram stats populated by video decoder */
struct VideoHistogramMetadata video_histogram_stats;
/*
* Producer (camera) will set cvp metadata and consumer (video) will
@@ -143,6 +143,8 @@ struct MetaData_t {
/* Set by clients to indicate that timed rendering will be enabled
* or disabled for this buffer. */
uint32_t timedRendering;
+ /* Video transcode stat populated by video decoder */
+ struct VideoTranscodeStatsMetadata video_transcode_stats;
};
namespace qtigralloc {
@@ -174,6 +176,7 @@ struct private_handle_t : public native_handle_t {
uint64_t base_metadata;
uint64_t gpuaddr;
unsigned int reserved_size;
+ unsigned int custom_content_md_reserved_size;
static const int kNumFds = 2;
static const int kMagic = 'gmsm';
@@ -202,7 +205,8 @@ struct private_handle_t : public native_handle_t {
base(0),
base_metadata(0),
gpuaddr(0),
- reserved_size(0) {
+ reserved_size(0),
+ custom_content_md_reserved_size(0) {
version = static_cast<int>(sizeof(native_handle));
numInts = NumInts();
numFds = kNumFds;
@@ -236,10 +240,11 @@ struct private_handle_t : public native_handle_t {
static void Dump(const private_handle_t *hnd) {
ALOGD("handle id:%" PRIu64
" wxh:%dx%d uwxuh:%dx%d size: %d fd:%d fd_meta:%d flags:0x%x "
- "usage:0x%" PRIx64 " format:0x%x layer_count: %d reserved_size = %d",
+ "usage:0x%" PRIx64 " format:0x%x layer_count: %d reserved_size = %d "
+ "custom_content_md_reserved_size = %u",
hnd->id, hnd->width, hnd->height, hnd->unaligned_width, hnd->unaligned_height, hnd->size,
hnd->fd, hnd->fd_metadata, hnd->flags, hnd->usage, hnd->format, hnd->layer_count,
- hnd->reserved_size);
+ hnd->reserved_size, hnd->custom_content_md_reserved_size);
}
};
#pragma pack(pop)