From a69feaa56883cc2946bff2354d4cc1483e6acf89 Mon Sep 17 00:00:00 2001 From: Malathi Gottam Date: Mon, 28 Sep 2020 22:19:18 +0530 Subject: [PATCH] msm: vidc: Modify allocated buffer size for lower resolution For targets that doesn't support 4k, current buffer size of 3MB is modified for FWVGA and below resolution to 6 MB. Change-Id: Id9152bf4b88a1b86d790bc061cd7265896c62a98 Signed-off-by: Malathi Gottam --- msm/vidc/msm_vidc_buffer_calculations.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msm/vidc/msm_vidc_buffer_calculations.c b/msm/vidc/msm_vidc_buffer_calculations.c index 8b90e60b2c63..d5cb06e20b67 100644 --- a/msm/vidc/msm_vidc_buffer_calculations.c +++ b/msm/vidc/msm_vidc_buffer_calculations.c @@ -913,6 +913,8 @@ u32 msm_vidc_calculate_dec_input_frame_size(struct msm_vidc_inst *inst, u32 buff if (inst->core->platform_data->vpu_ver == VPU_VERSION_AR50_LITE) { base_res_mbs = inst->capability.cap[CAP_MBS_PER_FRAME].max; div_factor = 1; + if (num_mbs < NUM_MBS_720P) + base_res_mbs = base_res_mbs * 2; } /* For HEIF image, use the actual resolution to calc buffer size */ if (is_heif_decoder(inst)) {