Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e999644 authored by Shi Zhongbo's avatar Shi Zhongbo
Browse files

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: default avatarShi Zhongbo <zhongbos@codeaurora.org>
parent 1a164bd0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3097,9 +3097,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,
+6 −0
Original line number Diff line number Diff line
@@ -640,6 +640,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;