Fix gf_group->cur_frame_idx in subgop configuration
This patch fixes the cur_frame_idx with subgop configuration,
which is used as lookahead index to retrieve source buffer in TPL.
Change-Id: Iba3f37e05637e016d62fd71a14da701b54205ccf
diff --git a/av1/encoder/gop_structure.c b/av1/encoder/gop_structure.c
index e8548a2..80fc70c 100644
--- a/av1/encoder/gop_structure.c
+++ b/av1/encoder/gop_structure.c
@@ -136,6 +136,7 @@
FRAME_TYPE_CODE type = frame->type_code;
int pyr_level = frame->pyr_level;
int disp_idx = frame->disp_frame_idx;
+ gf_group->cur_frame_idx[*frame_index] = *cur_frame_idx;
if (type == FRAME_TYPE_OOO_FILTERED ||
type == FRAME_TYPE_OOO_UNFILTERED) { // ARF
@@ -174,7 +175,6 @@
(*cur_frame_idx)++;
}
gf_group->is_filtered[*frame_index] = (type == FRAME_TYPE_OOO_FILTERED);
- gf_group->cur_frame_idx[*frame_index] = *cur_frame_idx;
gf_group->layer_depth[*frame_index] = pyr_level;
gf_group->max_layer_depth = AOMMAX(gf_group->max_layer_depth, pyr_level);