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

Commit 95f01410 authored by Santhosh Behara's avatar Santhosh Behara Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Limit HEIF encode changes to Encode path



Limit calling get_hal_codec() only in Encoding usecase.
Otherwise, it leads to error log in video decode usecase.

CRs-Fixed: 2248840
Change-Id: I25425423a9d5f36584c4ef00e0dedb124aaf941a
Signed-off-by: default avatarSanthosh Behara <santhoshbehara@codeaurora.org>
parent 2431b7df
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2406,7 +2406,8 @@ static void handle_ebd(enum hal_command_response cmd, void *data)
	}

	empty_buf_done = (struct vidc_hal_ebd *)&response->input_done;
	if ((get_hal_codec(inst->fmts[CAPTURE_PORT].fourcc) ==
	if (inst->session_type == MSM_VIDC_ENCODER &&
		(get_hal_codec(inst->fmts[CAPTURE_PORT].fourcc) ==
			HAL_VIDEO_CODEC_HEVC) &&
		(inst->img_grid_dimension > 0) &&
		(empty_buf_done->input_tag < inst->tinfo.count - 1)) {
@@ -4424,8 +4425,9 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf)
		for (c = 0; c < etbs.count; ++c) {
			struct vidc_frame_data *frame_data = &etbs.data[c];

			if (get_hal_codec(inst->fmts[CAPTURE_PORT].fourcc) ==
				HAL_VIDEO_CODEC_HEVC &&
			if (inst->session_type == MSM_VIDC_ENCODER &&
				get_hal_codec(inst->fmts[CAPTURE_PORT].fourcc)
				 == HAL_VIDEO_CODEC_HEVC &&
				(inst->img_grid_dimension > 0)) {
				rc = msm_comm_qbuf_heic_tiles(inst, frame_data);
				if (rc) {