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

Commit 0f7cf2e0 authored by Chinmay Sawarkar's avatar Chinmay Sawarkar
Browse files

msm: vidc: Implement set property for framerate based rc



Implement setprop for V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE.
If enabled, RC calculations will depend on frame rate.

CRs-Fixed: 2042884
Change-Id: I2601ceed65680285638361930e3d6f5f136ed681
Signed-off-by: default avatarChinmay Sawarkar <chinmays@codeaurora.org>
parent e40d860d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -988,6 +988,15 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
			(1 << V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_SIZE_UNLIMITED)),
		.qmenu = iframe_sizes,
	},
	{
		.id = V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE,
		.name = "Frame Rate based Rate Control",
		.type = V4L2_CTRL_TYPE_BOOLEAN,
		.minimum = 0,
		.maximum = 1,
		.default_value = 0,
		.step = 1,
	},

};

@@ -1849,6 +1858,13 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
				ctrl->val);
		pdata = &iframesize_type;
		break;
	case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE:
	{
		property_id = HAL_PARAM_VENC_DISABLE_RC_TIMESTAMP;
		enable.enable = ctrl->val;
		pdata = &enable;
		break;
	}
	default:
		dprintk(VIDC_ERR, "Unsupported index: %x\n", ctrl->id);
		rc = -ENOTSUPP;