Assign GOP frame offset to all the coding frames
authorJingning Han <jingning@google.com>
Mon, 17 Sep 2018 16:30:37 +0000 (09:30 -0700)
committerJingning Han <jingning@google.com>
Mon, 17 Sep 2018 18:11:58 +0000 (11:11 -0700)
Overload the use of arf_src_offset to account the relative frame
offset for all the coding frames within a GOP.

Change-Id: Ia86dede37c6a93d9f23098c15dbd936acefd75dc

vp9/encoder/vp9_firstpass.c

index 8020184..82fbcf4 100644 (file)
@@ -2230,6 +2230,7 @@ static int define_gf_group_structure(VP9_COMP *cpi) {
       gf_group->update_type[frame_index] = GF_UPDATE;
       gf_group->rf_level[frame_index] = GF_ARF_STD;
     }
+    gf_group->arf_src_offset[frame_index] = 0;
 
     return frame_index;
   }
@@ -2246,6 +2247,7 @@ static int define_gf_group_structure(VP9_COMP *cpi) {
 
     gf_group->update_type[frame_index] = LF_UPDATE;
     gf_group->rf_level[frame_index] = INTER_NORMAL;
+    gf_group->arf_src_offset[frame_index] = 0;
     gf_group->layer_depth[frame_index] = MAX_ARF_LAYERS - 1;
 
     ++frame_index;
@@ -2265,6 +2267,7 @@ static int define_gf_group_structure(VP9_COMP *cpi) {
     gf_group->update_type[frame_index] = GF_UPDATE;
     gf_group->rf_level[frame_index] = GF_ARF_STD;
   }
+  gf_group->arf_src_offset[frame_index] = 0;
 
   return frame_index;
 }