diff --git a/driver/platform/waipio/src/msm_vidc_waipio.c b/driver/platform/waipio/src/msm_vidc_waipio.c index 29fcfff1c3..01a12aaac1 100644 --- a/driver/platform/waipio/src/msm_vidc_waipio.c +++ b/driver/platform/waipio/src/msm_vidc_waipio.c @@ -736,7 +736,7 @@ static struct msm_platform_inst_capability instance_data_waipio[] = { HFI_PROP_LAYER_COUNT, CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED, - {BITRATE_MODE, META_EVA_STATS}, + {BITRATE_MODE}, {GOP_SIZE, B_FRAME, BIT_RATE}, msm_vidc_adjust_layer_count, msm_vidc_set_layer_count_and_type}, @@ -746,7 +746,7 @@ static struct msm_platform_inst_capability instance_data_waipio[] = { HFI_PROP_LAYER_COUNT, CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED, - {BITRATE_MODE, META_EVA_STATS}, + {BITRATE_MODE}, {GOP_SIZE, B_FRAME, BIT_RATE}, msm_vidc_adjust_layer_count, msm_vidc_set_layer_count_and_type}, @@ -1307,10 +1307,7 @@ static struct msm_platform_inst_capability instance_data_waipio[] = { V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE, 1, V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_CID_MPEG_VIDC_METADATA_EVA_STATS, - HFI_PROP_EVA_STAT_INFO, - CAP_FLAG_ROOT, - {0}, - {ENH_LAYER_COUNT}}, + HFI_PROP_EVA_STAT_INFO}, {META_BUF_TAG, DEC | ENC, CODECS_ALL, V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE, diff --git a/driver/vidc/src/msm_vidc_control.c b/driver/vidc/src/msm_vidc_control.c index 3407d6a361..ebe787f880 100644 --- a/driver/vidc/src/msm_vidc_control.c +++ b/driver/vidc/src/msm_vidc_control.c @@ -1316,14 +1316,6 @@ static int msm_vidc_adjust_static_layer_count_and_type(struct msm_vidc_inst *ins goto exit; } - if (!inst->capabilities->cap[META_EVA_STATS].value && - hb_requested && (layer_count > 1)) { - layer_count = 1; - i_vpr_h(inst, - "%s: cvp disable supports only one enh layer HB\n", - __func__); - } - /* decide hfi layer type */ if (hb_requested) { inst->hfi_layer_type = HFI_HIER_B; @@ -1376,9 +1368,7 @@ int msm_vidc_adjust_layer_count(void *instance, struct v4l2_ctrl *ctrl) capability->cap[ENH_LAYER_COUNT].value; if (!is_parent_available(inst, ENH_LAYER_COUNT, - BITRATE_MODE, __func__) || - !is_parent_available(inst, ENH_LAYER_COUNT, - META_EVA_STATS, __func__)) + BITRATE_MODE, __func__)) return -EINVAL; if (!inst->vb2q[OUTPUT_PORT].streaming) { @@ -1404,17 +1394,12 @@ exit: return rc; } -/* - * 1. GOP calibration is only done for HP layer encoding type. - * 2. Dynamic GOP size should not exceed static GOP size - * 3. For HB case, or when layer encoding is not enabled, - * client set GOP size is directly set to FW. - */ int msm_vidc_adjust_gop_size(void *instance, struct v4l2_ctrl *ctrl) { struct msm_vidc_inst_capability *capability; struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance; s32 adjusted_value, enh_layer_count = -1; + u32 min_gop_size, num_subgops; if (!inst || !inst->capabilities) { d_vpr_e("%s: invalid params\n", __func__); @@ -1431,25 +1416,19 @@ int msm_vidc_adjust_gop_size(void *instance, struct v4l2_ctrl *ctrl) if (!enh_layer_count) goto exit; - /* calibrate GOP size */ - if (inst->hfi_layer_type == HFI_HIER_P_SLIDING_WINDOW || - inst->hfi_layer_type == HFI_HIER_P_HYBRID_LTR) { - /* - * Layer encoding needs GOP size to be multiple of subgop size - * And subgop size is 2 ^ number of enhancement layers. - */ - u32 min_gop_size; - u32 num_subgops; + /* + * Layer encoding needs GOP size to be multiple of subgop size + * And subgop size is 2 ^ number of enhancement layers. + */ - /* v4l2 layer count is the number of enhancement layers */ - min_gop_size = 1 << enh_layer_count; - num_subgops = (adjusted_value + (min_gop_size >> 1)) / - min_gop_size; - if (num_subgops) - adjusted_value = num_subgops * min_gop_size; - else - adjusted_value = min_gop_size; - } + /* v4l2 layer count is the number of enhancement layers */ + min_gop_size = 1 << enh_layer_count; + num_subgops = (adjusted_value + (min_gop_size >> 1)) / + min_gop_size; + if (num_subgops) + adjusted_value = num_subgops * min_gop_size; + else + adjusted_value = min_gop_size; exit: msm_vidc_update_cap_value(inst, GOP_SIZE, adjusted_value, __func__);