]> granicus.if.org Git - libvpx/commitdiff
Replace MAX_LAG_BUFFERS with MAX_ARF_GOP_SIZE for gop size
authorJingning Han <jingning@google.com>
Wed, 17 Oct 2018 23:04:21 +0000 (16:04 -0700)
committerJingning Han <jingning@google.com>
Wed, 17 Oct 2018 23:11:37 +0000 (16:11 -0700)
MAX_ARF_GOP_SIZE accurately reflects the maximum frame operated
per group of pictures. Use that to replace MAX_LAG_BUFFERS in
such use cases.

Change-Id: Id26f9b1b2b0c38f255dee19795356c387d06d033

vp9/encoder/vp9_encodeframe.c

index bdd5b39c1967d6c4444f7b0b2199bd0fbf294a7d..b69ee6181ece99775534676bcd8d34e6c7ca60a6 100644 (file)
@@ -3578,7 +3578,7 @@ int get_rdmult_delta(VP9_COMP *cpi, BLOCK_SIZE bsize, int mi_row, int mi_col,
 
   if (cpi->common.show_frame) return orig_rdmult;
 
-  if (cpi->twopass.gf_group.index >= MAX_LAG_BUFFERS) return orig_rdmult;
+  if (cpi->twopass.gf_group.index >= MAX_ARF_GOP_SIZE) return orig_rdmult;
 
   for (row = mi_row; row < mi_row + mi_high; ++row) {
     for (col = mi_col; col < mi_col + mi_wide; ++col) {
@@ -5708,7 +5708,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
 
     if (sf->partition_search_type == SOURCE_VAR_BASED_PARTITION)
       source_var_based_partition_search_method(cpi);
-  } else if (gf_group_index && gf_group_index < MAX_LAG_BUFFERS &&
+  } else if (gf_group_index && gf_group_index < MAX_ARF_GOP_SIZE &&
              cpi->sf.enable_tpl_model) {
     TplDepFrame *tpl_frame = &cpi->tpl_stats[cpi->twopass.gf_group.index];
     TplDepStats *tpl_stats = tpl_frame->tpl_stats_ptr;