Fix issues in --enable-tpl-model=0
The config parameter --enable_tpl_model was not respected in
the function av1_get_second_pass_params. TPL model was used in
GOP length decision even when enable_tpl_model was set to 0. This
patch handles this and correctly disables TPL when enable_tpl_model
is set to 0.
BUG=aomedia:2710
Change-Id: I4e6f976d4703d9da485de50e1b4fbf419b4255e5
diff --git a/av1/encoder/pass2_strategy.c b/av1/encoder/pass2_strategy.c
index 18dd606..58efaea 100644
--- a/av1/encoder/pass2_strategy.c
+++ b/av1/encoder/pass2_strategy.c
@@ -2716,7 +2716,7 @@
calculate_gf_length(cpi, max_gop_length, MAX_NUM_GF_INTERVALS);
}
- if (max_gop_length > 16) {
+ if (max_gop_length > 16 && oxcf->enable_tpl_model) {
if (rc->gf_intervals[rc->cur_gf_index] - 1 > 16) {
// The calculate_gf_length function is previously used with
// max_gop_length = 32 with look-ahead gf intervals.