Merge "video: driver: add max num reorder frames support"

Этот коммит содержится в:
qctecmdr
2021-08-10 11:54:17 -07:00
коммит произвёл Gerrit - the friendly Code Review server
родитель cacb3f5303 05270719fb
Коммит 0dfaf36653
7 изменённых файлов: 74 добавлений и 23 удалений

Просмотреть файл

@@ -1598,6 +1598,11 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
0, 100,
1, 100,
V4L2_CID_MPEG_VIDC_VENC_COMPLEXITY},
{META_MAX_NUM_REORDER_FRAMES, DEC, HEVC | H264,
V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE,
1, V4L2_MPEG_MSM_VIDC_DISABLE,
V4L2_CID_MPEG_VIDC_METADATA_MAX_NUM_REORDER_FRAMES,
HFI_PROP_MAX_NUM_REORDER_FRAMES},
};
/*

Просмотреть файл

@@ -123,7 +123,8 @@ static inline bool is_output_meta_enabled(struct msm_vidc_inst *inst)
inst->capabilities->cap[META_SEI_CLL].value ||
inst->capabilities->cap[META_BUF_TAG].value ||
inst->capabilities->cap[META_DPB_TAG_LIST].value ||
inst->capabilities->cap[META_SUBFRAME_OUTPUT].value);
inst->capabilities->cap[META_SUBFRAME_OUTPUT].value ||
inst->capabilities->cap[META_MAX_NUM_REORDER_FRAMES].value);
} else if (is_encode_session(inst)) {
enabled = (inst->capabilities->cap[META_LTR_MARK_USE].value ||
inst->capabilities->cap[META_BUF_TAG].value);

Просмотреть файл

@@ -472,6 +472,7 @@ enum msm_vidc_inst_capability_type {
META_ROI_INFO,
META_DEC_QP_METADATA,
COMPLEXITY,
META_MAX_NUM_REORDER_FRAMES,
INST_CAP_MAX,
};

Просмотреть файл

@@ -138,8 +138,10 @@ static int msm_vdec_set_bitstream_resolution(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&resolution,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -173,8 +175,10 @@ static int msm_vdec_set_linear_stride_scanline(struct msm_vidc_inst *inst)
HFI_PAYLOAD_U64,
&payload,
sizeof(u64));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -215,8 +219,10 @@ static int msm_vdec_set_crop_offsets(struct msm_vidc_inst *inst,
HFI_PAYLOAD_64_PACKED,
&payload,
sizeof(u64));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -248,8 +254,10 @@ static int msm_vdec_set_bit_depth(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&bitdepth,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -305,8 +313,10 @@ static int msm_vdec_set_coded_frames(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&coded_frames,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -333,9 +343,10 @@ static int msm_vdec_set_min_output_count(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&min_output,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -359,8 +370,10 @@ static int msm_vdec_set_picture_order_count(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&poc,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -425,8 +438,10 @@ static int msm_vdec_set_colorspace(struct msm_vidc_inst *inst,
HFI_PAYLOAD_32_PACKED,
&color_info,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -452,8 +467,10 @@ static int msm_vdec_set_profile(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32_ENUM,
&profile,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -479,8 +496,10 @@ static int msm_vdec_set_level(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32_ENUM,
&level,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -506,8 +525,10 @@ static int msm_vdec_set_tier(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32_ENUM,
&tier,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -531,8 +552,10 @@ static int msm_vdec_set_colorformat(struct msm_vidc_inst *inst)
HFI_PAYLOAD_U32,
&hfi_colorformat,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -561,8 +584,10 @@ static int msm_vdec_set_output_order(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&output_order,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -587,8 +612,11 @@ static int msm_vdec_set_rap_frame(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&rap_frame,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -612,8 +640,10 @@ static int msm_vdec_set_thumbnail_mode(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&thumbnail_mode,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -639,8 +669,10 @@ static int msm_vdec_set_conceal_color_8bit(struct msm_vidc_inst *inst,
HFI_PAYLOAD_32_PACKED,
&conceal_color_8bit,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -666,8 +698,10 @@ static int msm_vdec_set_conceal_color_10bit(struct msm_vidc_inst *inst,
HFI_PAYLOAD_32_PACKED,
&conceal_color_10bit,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return rc;
}
@@ -689,8 +723,11 @@ static int msm_vdec_set_host_max_buf_count(struct msm_vidc_inst *inst,
HFI_PAYLOAD_U32,
&count,
sizeof(u32));
if (rc)
if (rc) {
i_vpr_e(inst, "%s: set property failed\n", __func__);
return rc;
}
return 0;
}
@@ -1023,6 +1060,7 @@ static int msm_vdec_subscribe_metadata(struct msm_vidc_inst *inst,
META_DPB_TAG_LIST,
META_SUBFRAME_OUTPUT,
META_DEC_QP_METADATA,
META_MAX_NUM_REORDER_FRAMES,
};
if (!inst || !inst->core || !inst->capabilities) {

Просмотреть файл

@@ -181,6 +181,7 @@ static const struct msm_vidc_cap_name cap_name_arr[] = {
{META_ROI_INFO, "META_ROI_INFO" },
{META_DEC_QP_METADATA, "META_DEC_QP_METADATA" },
{COMPLEXITY, "COMPLEXITY" },
{META_MAX_NUM_REORDER_FRAMES, "META_MAX_NUM_REORDER_FRAMES"},
{INST_CAP_MAX, "INST_CAP_MAX" },
};

Просмотреть файл

@@ -46,9 +46,10 @@ void print_psc_properties(const char *str, struct msm_vidc_inst *inst,
return;
i_vpr_h(inst,
"%s: resolution %#x, crop offsets[0] %#x, crop offsets[1] %#x, bit depth %#x, coded frames %d "
"fw min count %d, poc %d, color info %d, profile %d, level %d, tier %d ",
str, subsc_params.bitstream_resolution,
"%s: width %d, height %d, crop offsets[0] %#x, crop offsets[1] %#x, bit depth %#x, coded frames %d "
"fw min count %d, poc %d, color info %d, profile %d, level %d, tier %d\n",
str, (subsc_params.bitstream_resolution & HFI_BITMASK_BITSTREAM_WIDTH) >> 16,
(subsc_params.bitstream_resolution & HFI_BITMASK_BITSTREAM_HEIGHT),
subsc_params.crop_offsets[0], subsc_params.crop_offsets[1],
subsc_params.bit_depth, subsc_params.coded_frames,
subsc_params.fw_min_count, subsc_params.pic_order_cnt,

Просмотреть файл

@@ -135,6 +135,9 @@ enum v4l2_mpeg_vidc_blur_types {
/* Encoder Complexity control */
#define V4L2_CID_MPEG_VIDC_VENC_COMPLEXITY \
(V4L2_CID_MPEG_VIDC_BASE + 0x2F)
/* Decoder Max Number of Reorder Frames */
#define V4L2_CID_MPEG_VIDC_METADATA_MAX_NUM_REORDER_FRAMES \
(V4L2_CID_MPEG_VIDC_BASE + 0x30)
/* Deprecate below controls once availble in gki and gsi bionic header */
#ifndef V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID
@@ -264,6 +267,7 @@ enum v4l2_mpeg_vidc_metadata {
METADATA_DEC_QP_METADATA = 0x0300016f,
METADATA_ROI_INFO = 0x03000173,
METADATA_DPB_TAG_LIST = 0x03000179,
METADATA_MAX_NUM_REORDER_FRAMES = 0x03000127,
};
enum meta_interlace_info {
META_INTERLACE_INFO_NONE = 0x00000000,