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

Commit b2a4c541 authored by Deva Ramasubramanian's avatar Deva Ramasubramanian Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Allow V4L2_CID_MPEG_VIDC_VIDEO_IDR_PERIOD only for H264 codec



IDR frames are only supported for H264 codec.  As such, disallow setting
of IDR period in other codecs.

CRs-Fixed: 631591
Change-Id: I67931a90ddd2508f6aa82f1a4d98568ebab579d1
Signed-off-by: default avatarDeva Ramasubramanian <dramasub@codeaurora.org>
parent 46086ca3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1648,6 +1648,15 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)

	switch (ctrl->id) {
	case V4L2_CID_MPEG_VIDC_VIDEO_IDR_PERIOD:
		if (inst->fmts[CAPTURE_PORT]->fourcc != V4L2_PIX_FMT_H264 &&
			inst->fmts[CAPTURE_PORT]->fourcc !=
				V4L2_PIX_FMT_H264_NO_SC) {
			dprintk(VIDC_ERR, "Control 0x%x only valid for H264\n",
					ctrl->id);
			rc = -ENOTSUPP;
			break;
		}

		property_id =
			HAL_CONFIG_VENC_IDR_PERIOD;
		idr_period.idr_period = ctrl->val;