Loading msm/vidc/msm_vdec.c +10 −0 Original line number Diff line number Diff line Loading @@ -890,6 +890,16 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) break; case V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE: inst->clk_data.frame_rate = ctrl->val; if (inst->state >= MSM_VIDC_LOAD_RESOURCES) break; /* Only recalculate buffer counts before buffers allocated */ rc = msm_vidc_calculate_buffer_counts(inst); if (rc) { s_vpr_e(inst->sid, "%s failed to calculate buffer count after set fps\n", __func__); return rc; } break; case V4L2_CID_MPEG_VIDC_VIDEO_EXTRADATA: if (ctrl->val == EXTRADATA_NONE) Loading msm/vidc/msm_vidc_buffer_calculations.c +13 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ /* total input buffers in case of decoder batch */ #define BATCH_DEC_TOTAL_INPUT_BUFFERS 6 /* total input buffers for decoder HFR usecase (fps > 480) */ #define HFR_DEC_TOTAL_MAX_INPUT_BUFFERS 24 /* total input buffers for decoder HFR usecase */ #define HFR_DEC_TOTAL_INPUT_BUFFERS 12 Loading Loading @@ -744,6 +747,7 @@ static int msm_vidc_get_extra_input_buff_count(struct msm_vidc_inst *inst) unsigned int extra_input_count = 0; struct msm_vidc_core *core; struct v4l2_format *f; int fps; if (!inst || !inst->core) { d_vpr_e("%s: invalid params %pK\n", __func__, inst); Loading Loading @@ -792,8 +796,15 @@ static int msm_vidc_get_extra_input_buff_count(struct msm_vidc_inst *inst) if (!is_secure_session(inst) && msm_comm_get_num_perf_sessions(inst) < MAX_PERF_ELIGIBLE_SESSIONS) { fps = inst->clk_data.frame_rate >> 16; inst->is_perf_eligible_session = true; extra_input_count = (HFR_DEC_TOTAL_INPUT_BUFFERS - if (fps > 480) extra_input_count = (HFR_DEC_TOTAL_MAX_INPUT_BUFFERS - MIN_INPUT_BUFFERS); else extra_input_count = (HFR_DEC_TOTAL_INPUT_BUFFERS - MIN_INPUT_BUFFERS); } } else if (is_encode_session(inst)) { Loading Loading
msm/vidc/msm_vdec.c +10 −0 Original line number Diff line number Diff line Loading @@ -890,6 +890,16 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) break; case V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE: inst->clk_data.frame_rate = ctrl->val; if (inst->state >= MSM_VIDC_LOAD_RESOURCES) break; /* Only recalculate buffer counts before buffers allocated */ rc = msm_vidc_calculate_buffer_counts(inst); if (rc) { s_vpr_e(inst->sid, "%s failed to calculate buffer count after set fps\n", __func__); return rc; } break; case V4L2_CID_MPEG_VIDC_VIDEO_EXTRADATA: if (ctrl->val == EXTRADATA_NONE) Loading
msm/vidc/msm_vidc_buffer_calculations.c +13 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ /* total input buffers in case of decoder batch */ #define BATCH_DEC_TOTAL_INPUT_BUFFERS 6 /* total input buffers for decoder HFR usecase (fps > 480) */ #define HFR_DEC_TOTAL_MAX_INPUT_BUFFERS 24 /* total input buffers for decoder HFR usecase */ #define HFR_DEC_TOTAL_INPUT_BUFFERS 12 Loading Loading @@ -744,6 +747,7 @@ static int msm_vidc_get_extra_input_buff_count(struct msm_vidc_inst *inst) unsigned int extra_input_count = 0; struct msm_vidc_core *core; struct v4l2_format *f; int fps; if (!inst || !inst->core) { d_vpr_e("%s: invalid params %pK\n", __func__, inst); Loading Loading @@ -792,8 +796,15 @@ static int msm_vidc_get_extra_input_buff_count(struct msm_vidc_inst *inst) if (!is_secure_session(inst) && msm_comm_get_num_perf_sessions(inst) < MAX_PERF_ELIGIBLE_SESSIONS) { fps = inst->clk_data.frame_rate >> 16; inst->is_perf_eligible_session = true; extra_input_count = (HFR_DEC_TOTAL_INPUT_BUFFERS - if (fps > 480) extra_input_count = (HFR_DEC_TOTAL_MAX_INPUT_BUFFERS - MIN_INPUT_BUFFERS); else extra_input_count = (HFR_DEC_TOTAL_INPUT_BUFFERS - MIN_INPUT_BUFFERS); } } else if (is_encode_session(inst)) { Loading