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

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

Merge "msm: venc: set auto frame rate only for VBR CFR native recorder"

parents 046dec9f a2e13c93
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2150,6 +2150,7 @@ int msm_venc_store_timestamp(struct msm_vidc_inst *inst, u64 timestamp_us)
	int count = 0;
	int rc = 0;
	struct v4l2_ctrl *superframe_ctrl = NULL;
	struct v4l2_ctrl *ctrl = NULL;

	if (!inst || !inst->core) {
		d_vpr_e("%s: invalid parameters\n", __func__);
@@ -2160,6 +2161,12 @@ int msm_venc_store_timestamp(struct msm_vidc_inst *inst, u64 timestamp_us)
		is_image_session(inst))
		return rc;

	/* set auto-framerate only for VBR CFR native recorder */
	ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VENC_NATIVE_RECORDER);
	if ((ctrl && ctrl->val == V4L2_MPEG_MSM_VIDC_DISABLE) ||
		(inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_VBR))
		return rc;

	mutex_lock(&inst->timestamps.lock);
	list_for_each_entry(node, &inst->timestamps.list, list) {
		count++;