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

Commit 36568039 authored by Vikash Garodia's avatar Vikash Garodia Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Configure work mode 2 based on rate control



Existing code sets work mode as 1 for all encoder usecases.
For VBR and MBR cases, work mode is required to be 2. Hence
setting the same based on RC mode.

Change-Id: I882807ccc4e0348e2cdfab1e74b80a55a47b754d
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent c124d047
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1311,9 +1311,13 @@ static int msm_vidc_decide_work_mode_ar50(struct msm_vidc_inst *inst)
				pdata.video_work_mode = HFI_WORKMODE_1;
			break;
		}
	} else if (inst->session_type == MSM_VIDC_ENCODER)
	} else if (inst->session_type == MSM_VIDC_ENCODER) {
		pdata.video_work_mode = HFI_WORKMODE_1;
	else {
		if (inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR ||
		    inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_MBR ||
		    inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_MBR_VFR)
			pdata.video_work_mode = HFI_WORKMODE_2;
	} else {
		return -EINVAL;
	}