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

Commit 3a0b900f authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Confirgure work mode 2 based on rate control"

parents c7671f3b d65483ef
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1255,9 +1255,17 @@ static int msm_vidc_decide_work_mode_ar50(struct msm_vidc_inst *inst)
				pdata.video_work_mode = VIDC_WORK_MODE_1;
			break;
		}
	} else if (inst->session_type == MSM_VIDC_ENCODER)
	} else if (inst->session_type == MSM_VIDC_ENCODER) {
		u32 rc_mode = 0;

		pdata.video_work_mode = VIDC_WORK_MODE_1;
	else {
		rc_mode =  msm_comm_g_ctrl_for_id(inst,
				V4L2_CID_MPEG_VIDEO_BITRATE_MODE);
		if (rc_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR ||
		    rc_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_MBR ||
		    rc_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_MBR_VFR)
			pdata.video_work_mode = VIDC_WORK_MODE_2;
	} else {
		return -EINVAL;
	}