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

Commit 2603e96d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Check resolution capability against aligned values"

parents b2d54531 553044fb
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -5462,15 +5462,15 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
	rotation =  msm_comm_g_ctrl_for_id(inst,
					V4L2_CID_MPEG_VIDC_VIDEO_ROTATION);

	output_height = inst->prop.height[CAPTURE_PORT];
	output_width = inst->prop.width[CAPTURE_PORT];
	output_height = ALIGN(inst->prop.height[CAPTURE_PORT], 16);
	output_width = ALIGN(inst->prop.width[CAPTURE_PORT], 16);

	if ((output_width != output_height) &&
		(rotation == V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_90 ||
		rotation == V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_270)) {

		output_width = inst->prop.height[CAPTURE_PORT];
		output_height = inst->prop.width[CAPTURE_PORT];
		output_width = ALIGN(inst->prop.height[CAPTURE_PORT], 16);
		output_height = ALIGN(inst->prop.width[CAPTURE_PORT], 16);
		dprintk(VIDC_DBG,
			"Rotation=%u Swapped Output W=%u H=%u to check capability",
			rotation, output_width, output_height);