ref: 96ec8a425b5dde7eb2d747146af4da10c26bd4b4
parent: 0aa3677d9df2d732fcf49b545e2a3c5aa4a29267
parent: d96ed96c0fb125f0369b48910f24ed85dccc39b2
author: Hui Su <[email protected]>
date: Wed Jun 21 16:38:44 EDT 2017
Merge "VP9 level targeting: properly handle max_gf_interval"
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -432,8 +432,12 @@
(int)vp9_level_defs[target_level_index].min_altref_distance) {
oxcf->min_gf_interval =
(int)vp9_level_defs[target_level_index].min_altref_distance + 1;
- oxcf->max_gf_interval =
- VPXMAX(oxcf->max_gf_interval, oxcf->min_gf_interval);
+ // If oxcf->max_gf_interval == 0, it will be assigned with a default value
+ // in vp9_rc_set_gf_interval_range().
+ if (oxcf->max_gf_interval != 0) {
+ oxcf->max_gf_interval =
+ VPXMAX(oxcf->max_gf_interval, oxcf->min_gf_interval);
+ }
}
// Adjust maximum column tiles.