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

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

Merge "msm: vidc: Video firmware supports only random mode"

parents 276657b0 e71adae9
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2848,6 +2848,9 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
		rc_mode->val == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR))
		return 0;

	/* Firmware supports only random mode */
	intra_refresh.mode = HFI_INTRA_REFRESH_RANDOM;

	ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_RANDOM);
	intra_refresh.mbs = 0;
	if (ctrl->val) {
@@ -2855,9 +2858,6 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
		u32 width = inst->prop.width[CAPTURE_PORT];
		u32 height = inst->prop.height[CAPTURE_PORT];

		/* ignore cyclic mode if random mode is set */
		intra_refresh.mode = HFI_INTRA_REFRESH_RANDOM;

		num_mbs_per_frame = NUM_MBS_PER_FRAME(height, width);
		intra_refresh.mbs = num_mbs_per_frame / ctrl->val;
		if (num_mbs_per_frame % ctrl->val) {
@@ -2866,7 +2866,6 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
	} else {
		ctrl = get_ctrl(inst,
			V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB);
		intra_refresh.mode = HFI_INTRA_REFRESH_CYCLIC;
		intra_refresh.mbs = ctrl->val;
	}
	if (!intra_refresh.mbs) {