Add enable-tpl-model guard
authorJingning Han <jingning@google.com>
Mon, 2 Jul 2018 19:34:21 +0000 (12:34 -0700)
committerJingning Han <jingning@google.com>
Mon, 2 Jul 2018 19:34:21 +0000 (12:34 -0700)
Skip operations that exercise the tpl model values if the model
is turned off.

Change-Id: I9ab3b56950f6b5a40ae4670a570885aaaadf8382

vp9/encoder/vp9_encodeframe.c

index 9344761..34bbb17 100644 (file)
@@ -5438,7 +5438,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 (cpi->twopass.gf_group.index) {
+  } else if (cpi->twopass.gf_group.index && cpi->sf.enable_tpl_model) {
     TplDepFrame *tpl_frame = &cpi->tpl_stats[cpi->twopass.gf_group.index];
     TplDepStats *tpl_stats = tpl_frame->tpl_stats_ptr;