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

Commit 1a661700 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix MBs per frame to derive slices per frame"

parents 6714091b 6f2e749e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3208,6 +3208,10 @@ int msm_venc_set_slice_control_mode(struct msm_vidc_inst *inst)

	/* Update Slice Config */
	mb_per_frame = NUM_MBS_PER_FRAME(output_height, output_width);
	if (codec == V4L2_PIX_FMT_HEVC)
		mb_per_frame =
			NUM_MBS_PER_FRAME_HEVC(output_height, output_width);

	mbps = NUM_MBS_PER_SEC(output_height, output_width, fps);

	if (slice_mode == HFI_MULTI_SLICE_BY_MB_COUNT) {
+3 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@
#define NUM_MBS_PER_FRAME(__height, __width) \
	((ALIGN(__height, 16) / 16) * (ALIGN(__width, 16) / 16))

#define NUM_MBS_PER_FRAME_HEVC(__height, __width) \
	((ALIGN(__height, 32) / 32) * (ALIGN(__width, 32) / 32))

#define call_core_op(c, op, ...)			\
	(((c) && (c)->core_ops && (c)->core_ops->op) ? \
	((c)->core_ops->op(__VA_ARGS__)) : 0)