ref: 7409225a3cd465142bd20cec313270c0ecd0589b
parent: e70fa980b87309553722700310ffee1e0c5bce40
author: Paul Wilkins <paulwilkins@google.com>
date: Fri Jul 20 09:12:34 EDT 2018
Fix issue with short static KF groups. Where a KF group is very short but static make sure it is coded as a single GF group. Previously there was a bug where such groups could be coded as an arf group with the arf in the next scene. Change-Id: I4504ae2b03c4877fcecfa58dd503879aa4eefac4
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2917,6 +2917,7 @@
// Should we use the alternate reference frame.
if ((zero_motion_accumulator < 0.995) && allow_alt_ref &&
+ (twopass->kf_zeromotion_pct < STATIC_KF_GROUP_THRESH) &&
(i < cpi->oxcf.lag_in_frames) && (i >= rc->min_gf_interval)) {
const int forward_frames = (rc->frames_to_key - i >= i - 1)
? i - 1