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

Commit 5eb354ce authored by Vaibhav Deshu Venkatesh's avatar Vaibhav Deshu Venkatesh
Browse files

msm: vidc: Fix scratch1 size calculation for HEVC & VP9



Currently HEVC & VP9 codec scratch1 calculations don't take
HDR10 histogram size into account. Add this size to final
calculations.

Change-Id: I2d8bce2a5d3d95b656e02f704e6f783eb8324e15
Signed-off-by: default avatarVaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
parent eaab7394
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@
#define NUM_MBS_4k (((4096 + 15) >> 4) * ((2304 + 15) >> 4))
#define MB_SIZE_IN_PIXEL (16 * 16)
#define HDR10PLUS_PAYLOAD_SIZE 1024
#define HDR10_HIST_EXTRADATA_SIZE 4096

static inline u32 calculate_h264d_scratch_size(struct msm_vidc_inst *inst,
	u32 width, u32 height, bool is_interlaced);
@@ -1301,7 +1302,8 @@ static inline u32 calculate_h265d_scratch1_size(struct msm_vidc_inst *inst,
	if (split_mode_enabled)
		vpss_lb_size = size_vpss_lb(width, height);

	size = co_mv_size + nonco_mv_size + vpss_lb_size;
	size = co_mv_size + nonco_mv_size + vpss_lb_size +
			HDR10_HIST_EXTRADATA_SIZE;
	return size;
}

@@ -1366,7 +1368,7 @@ static inline u32 calculate_vp9d_scratch1_size(struct msm_vidc_inst *inst,
	if (split_mode_enabled)
		vpss_lb_size = size_vpss_lb(width, height);

	size += vpss_lb_size;
	size += vpss_lb_size + HDR10_HIST_EXTRADATA_SIZE;
	return size;
}