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

Commit 00e8fb89 authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: Enable batching for H264/HEVC/VP9 formats only



Decode batching is required only for H264/HEVC/VP9 formats
only and need not be enabled for other formats.

Change-Id: I2085e38d68d39cd21b99ca832fc7cab26daa1e3f
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent d210dd22
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2752,14 +2752,17 @@ bool is_batching_allowed(struct msm_vidc_inst *inst)

	/*
	 * Enable decode batching based on below conditions
	 * - decode session
	 * - platform supports batching
	 * - decode session and H264/HEVC/VP9 format
	 * - session resolution <= 1080p
	 * - low latency not enabled
	 * - not a thumbnail session
	 * - UBWC color format
	 */
	if (is_decode_session(inst) && inst->core->resources.decode_batching &&
	if (inst->core->resources.decode_batching && is_decode_session(inst) &&
		(inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_H264 ||
		inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_HEVC ||
		inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_VP9) &&
		(msm_vidc_get_mbs_per_frame(inst) <=
		NUM_MBS_PER_FRAME(MAX_DEC_BATCH_HEIGHT, MAX_DEC_BATCH_WIDTH)) &&
		!inst->clk_data.low_latency_mode &&