From eb327e418ed05d4e6df23701c514607a940a9ca0 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Fri, 17 Aug 2018 10:45:46 -0700 Subject: [PATCH] Refactor init_gop_frame() Remove implicit dependency on overlay frame update to break the gop initialization loop. Change-Id: I6a6d070cdf22a0e30c298523707bd746fd03f450 --- vp9/encoder/vp9_encoder.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index df4fe7fd3..771bc0d42 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -5455,6 +5455,9 @@ void init_gop_frames(VP9_COMP *cpi, GF_PICTURE *gf_picture, RefCntBuffer *frame_bufs = cm->buffer_pool->frame_bufs; int recon_frame_index[REFS_PER_FRAME + 1] = { -1, -1, -1, -1 }; + // TODO(jingning): To be used later for gf frame type parsing. + (void)gf_group; + for (i = 0; i < FRAME_BUFFERS && frame_idx < REFS_PER_FRAME + 1; ++i) { if (frame_bufs[i].ref_count == 0) { alloc_frame_mvs(cm, i); @@ -5508,7 +5511,8 @@ void init_gop_frames(VP9_COMP *cpi, GF_PICTURE *gf_picture, ++*tpl_group_frames; lst_index = frame_idx; - if (gf_group->update_type[frame_idx] == OVERLAY_UPDATE) break; + + if (frame_idx == cpi->rc.baseline_gf_interval + 1) break; } gld_index = frame_idx; -- 2.40.0