msm: venc: update min input buffer count for HEIC

After grid flag enabled for HEIC, update min
input buffer count to 2.

Change-Id: Ia279b571af8c15e029a1cc77e3cbd3f6e51448f7
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
This commit is contained in:
Shi Zhongbo 2020-02-17 12:26:33 +08:00 committed by Gerrit - the friendly Code Review server
parent 70c6739172
commit 0429942772
2 changed files with 12 additions and 1 deletions

View File

@ -3006,9 +3006,14 @@ int msm_venc_set_image_properties(struct msm_vidc_inst *inst)
return -EINVAL;
}
if (inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_CQ)
if (!is_image_session(inst) && !is_grid_session(inst))
return 0;
if (inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_CQ) {
d_vpr_e("%s: invalid rate control mode\n", __func__);
return -EINVAL;
}
rc = msm_venc_set_frame_quality(inst);
if (rc) {
s_vpr_e(inst->sid,

View File

@ -637,6 +637,12 @@ int msm_vidc_calculate_input_buffer_count(struct msm_vidc_inst *inst)
return 0;
}
if (is_grid_session(inst)) {
fmt->count_min = fmt->count_min_host = fmt->count_actual =
SINGLE_INPUT_BUFFER + 1;
return 0;
}
extra_buff_count = msm_vidc_get_extra_buff_count(inst,
HAL_BUFFER_INPUT);
fmt->count_min = MIN_INPUT_BUFFERS;