Merge 8b8cd1a8dc on remote branch

Change-Id: Ib14229555f633ea97f13191a7aa9fdddd7567ff3
This commit is contained in:
Linux Build Service Account
2022-09-28 22:59:57 -07:00
5 changed files with 69 additions and 6 deletions

View File

@@ -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__

View File

@@ -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 */

View File

@@ -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)

View File

@@ -86,6 +86,7 @@ struct LayerFlags {
bool secure_video = false;
bool secure_ui = false;
bool compatible = false;
bool blur = false;
};
struct FBTLayerInfo {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -27,18 +27,57 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Changes from Qualcomm Innovation Center are provided under the following license:
*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __PHASE_OFFSET_EXTN_INTF_H__
#define __PHASE_OFFSET_EXTN_INTF_H__
#include <unordered_map>
#define PHASE_OFFSET_EXTN 1
#define DYNAMIC_APP_DURATIONS 1
namespace composer {
class PhaseOffsetExtnIntf {
public:
virtual int GetAdvancedSfOffsets(std::unordered_map<float, int64_t> *advancedSfOffsets) = 0;
virtual int GetWorkDurationConfigs(std::unordered_map<float, std::pair<int64_t, int64_t>>
*workDurationConfigs) = 0;
protected:
virtual ~PhaseOffsetExtnIntf() { }