Skip to content

Commit

Permalink
Account for gop_decision->use_alt_ref
Browse files Browse the repository at this point in the history
The change is in ext_rc_define_gf_group_structure()

Bug: b/339314081

Change-Id: I03576a0407105ced3e7cff4c33986e9a9a83b77f
  • Loading branch information
Angie Chiang committed May 22, 2024
1 parent 5b4cfe8 commit 6c079c8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions vp9/encoder/vp9_firstpass.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,12 +2348,15 @@ static void ext_rc_define_gf_group_structure(
} else {
gf_group_set_overlay_frame(gf_group, 0);
}
int frame_index = 1;

// We assume arf is always used to keep the logic simple for now.
gf_group_set_arf_frame(gf_group, 1, show_frame_count);
if (gop_decision->use_alt_ref) {
assert(frame_index < gop_decision->gop_coding_frames);
gf_group_set_arf_frame(gf_group, 1, show_frame_count);
++frame_index;
}

for (int frame_index = 2; frame_index < gop_decision->gop_coding_frames;
frame_index++) {
for (; frame_index < gop_decision->gop_coding_frames; frame_index++) {
gf_group_set_inter_normal_frame(gf_group, frame_index);
}
gf_group->max_layer_depth = MAX_ARF_LAYERS - 1;
Expand Down

0 comments on commit 6c079c8

Please sign in to comment.