msm: vidc: Update minimum GOP size calculation

Use max layers allowed in a session to calculate min GOP size
instead of variable number of layers enabled during each frame
encode to avoid GOP size not being multiple of sub-GOP size issue.

Change-Id: I3bb6e5320385acea9cb892c04b586ac3ca8c753f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
This commit is contained in:
Akshata Sahukar 2019-07-16 11:09:31 -07:00
parent ce34a06ee0
commit 9e0c71bb6e

View File

@ -2249,7 +2249,7 @@ void msm_venc_adjust_gop_size(struct msm_vidc_inst *inst)
* Layer encoding needs GOP size to be multiple of subgop size
* And subgop size is 2 ^ number of enhancement layers
*/
hier_ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER);
hier_ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER);
if (hier_ctrl->val > 1) {
u32 min_gop_size;
u32 num_subgops;