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

Commit 6fd31005 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: update format during downscaling"

parents f479534f 45b06915
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1018,6 +1018,26 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
			f->fmt.pix_mp.plane_fmt[0].reserved[0] =
				(__u16)inst->prop.height[CAPTURE_PORT];
		}

		if (msm_comm_get_stream_output_mode(inst) ==
			HAL_VIDEO_DECODER_SECONDARY) {
			if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
				f->fmt.pix_mp.height =
					inst->prop.height[CAPTURE_PORT];
				f->fmt.pix_mp.width =
					inst->prop.width[CAPTURE_PORT];
			} else if (f->type ==
					V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
				f->fmt.pix_mp.height =
					inst->prop.height[OUTPUT_PORT];
				f->fmt.pix_mp.width =
					inst->prop.width[OUTPUT_PORT];
				f->fmt.pix_mp.plane_fmt[0].bytesperline =
					(__u16)inst->prop.width[OUTPUT_PORT];
				f->fmt.pix_mp.plane_fmt[0].reserved[0] =
					(__u16)inst->prop.height[OUTPUT_PORT];
			}
		}
	} else {
		dprintk(VIDC_ERR,
			"Buf type not recognized, type = %d\n",
+15 −2
Original line number Diff line number Diff line
@@ -721,8 +721,21 @@ static void handle_event_change(enum command_response cmd, void *data)
		} else {
			dprintk(VIDC_DBG,
				"V4L2_EVENT_SEQ_CHANGED_SUFFICIENT\n");
			inst->prop.height[CAPTURE_PORT] = event_notify->height;
			inst->prop.width[CAPTURE_PORT] = event_notify->width;
			if (msm_comm_get_stream_output_mode(inst) !=
				HAL_VIDEO_DECODER_SECONDARY) {
				dprintk(VIDC_DBG,
					"event_notify->height = %d event_notify->width = %d\n",
					event_notify->height,
					event_notify->width);
				inst->prop.height[CAPTURE_PORT] =
					event_notify->height;
				inst->prop.width[CAPTURE_PORT] =
					event_notify->width;
				inst->prop.height[OUTPUT_PORT] =
					event_notify->height;
				inst->prop.width[OUTPUT_PORT] =
					event_notify->width;
			}
		}
		rc = msm_vidc_check_session_supported(inst);
		if (!rc)