video: driver: reduce output buffer count for thumbnail usecase
Update output buffer min & extracount, if thumbnail mode is set and also tune extracount at input psc sequence. Change-Id: I77b28198257d127454ee3e9b2a307e1931547e8f Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
@@ -1329,6 +1329,8 @@ static int msm_vdec_read_input_subcr_params(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inst->buffers.output.min_count = subsc_params.fw_min_count;
|
inst->buffers.output.min_count = subsc_params.fw_min_count;
|
||||||
|
inst->buffers.output.extra_count = call_session_op(core,
|
||||||
|
extra_count, inst, MSM_VIDC_BUF_OUTPUT);
|
||||||
if (is_thumbnail_session(inst) && inst->codec != MSM_VIDC_VP9) {
|
if (is_thumbnail_session(inst) && inst->codec != MSM_VIDC_VP9) {
|
||||||
if (inst->buffers.output.min_count != 1) {
|
if (inst->buffers.output.min_count != 1) {
|
||||||
i_vpr_e(inst, "%s: invalid min count %d in thumbnail case\n",
|
i_vpr_e(inst, "%s: invalid min count %d in thumbnail case\n",
|
||||||
|
@@ -696,6 +696,9 @@ int msm_v4l2_op_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||||||
rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);
|
rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
rc = msm_vidc_update_buffer_count(inst, OUTPUT_PORT);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
if (is_meta_ctrl(ctrl->id)) {
|
if (is_meta_ctrl(ctrl->id)) {
|
||||||
if (cap_id == META_DPB_TAG_LIST) {
|
if (cap_id == META_DPB_TAG_LIST) {
|
||||||
|
@@ -4461,8 +4461,10 @@ int msm_vidc_update_buffer_count(struct msm_vidc_inst *inst, u32 port)
|
|||||||
inst->buffers.input_meta.extra_count = 0;
|
inst->buffers.input_meta.extra_count = 0;
|
||||||
inst->buffers.input_meta.actual_count = 0;
|
inst->buffers.input_meta.actual_count = 0;
|
||||||
}
|
}
|
||||||
d_vpr_h("update input min buffer to %u\n",
|
i_vpr_h(inst, "%s: type: INPUT, count: min %u, extra %u, actual %u\n", __func__,
|
||||||
inst->buffers.input.min_count);
|
inst->buffers.input.min_count,
|
||||||
|
inst->buffers.input.extra_count,
|
||||||
|
inst->buffers.input.actual_count);
|
||||||
break;
|
break;
|
||||||
case OUTPUT_PORT:
|
case OUTPUT_PORT:
|
||||||
if (!inst->vb2q[INPUT_PORT].streaming)
|
if (!inst->vb2q[INPUT_PORT].streaming)
|
||||||
@@ -4489,8 +4491,10 @@ int msm_vidc_update_buffer_count(struct msm_vidc_inst *inst, u32 port)
|
|||||||
inst->buffers.output_meta.extra_count = 0;
|
inst->buffers.output_meta.extra_count = 0;
|
||||||
inst->buffers.output_meta.actual_count = 0;
|
inst->buffers.output_meta.actual_count = 0;
|
||||||
}
|
}
|
||||||
d_vpr_h("update output min buffer to %u\n",
|
i_vpr_h(inst, "%s: type: OUTPUT, count: min %u, extra %u, actual %u\n", __func__,
|
||||||
inst->buffers.output.min_count);
|
inst->buffers.output.min_count,
|
||||||
|
inst->buffers.output.extra_count,
|
||||||
|
inst->buffers.output.actual_count);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
d_vpr_e("%s unknown port %d\n", __func__, port);
|
d_vpr_e("%s unknown port %d\n", __func__, port);
|
||||||
|
Reference in New Issue
Block a user