Loading msm/vidc/msm_vidc_buffer_calculations.c +3 −11 Original line number Diff line number Diff line Loading @@ -790,22 +790,14 @@ u32 msm_vidc_calculate_dec_input_frame_size(struct msm_vidc_inst *inst) frame_size = base_res_mbs * MB_SIZE_IN_PIXEL * 3 / 2 / div_factor; if (is_secure_session(inst)) { u32 max_bitrate = inst->capability.cap[CAP_SECURE_BITRATE].max; /* * for secure, calc frame_size based on max bitrate, * peak bitrate can be 10 times more and * frame rate assumed to be 30 fps at least */ frame_size = (max_bitrate * 10 / 8) / 30; } /* multiply by 10/8 (1.25) to get size for 10 bit case */ if ((f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_VP9) || (f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_HEVC)) frame_size = frame_size + (frame_size >> 2); if (is_secure_session(inst)) frame_size /= 2; if (inst->buffer_size_limit && (inst->buffer_size_limit < frame_size)) { frame_size = inst->buffer_size_limit; Loading Loading
msm/vidc/msm_vidc_buffer_calculations.c +3 −11 Original line number Diff line number Diff line Loading @@ -790,22 +790,14 @@ u32 msm_vidc_calculate_dec_input_frame_size(struct msm_vidc_inst *inst) frame_size = base_res_mbs * MB_SIZE_IN_PIXEL * 3 / 2 / div_factor; if (is_secure_session(inst)) { u32 max_bitrate = inst->capability.cap[CAP_SECURE_BITRATE].max; /* * for secure, calc frame_size based on max bitrate, * peak bitrate can be 10 times more and * frame rate assumed to be 30 fps at least */ frame_size = (max_bitrate * 10 / 8) / 30; } /* multiply by 10/8 (1.25) to get size for 10 bit case */ if ((f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_VP9) || (f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_HEVC)) frame_size = frame_size + (frame_size >> 2); if (is_secure_session(inst)) frame_size /= 2; if (inst->buffer_size_limit && (inst->buffer_size_limit < frame_size)) { frame_size = inst->buffer_size_limit; Loading