From 7409225a3cd465142bd20cec313270c0ecd0589b Mon Sep 17 00:00:00 2001 From: Paul Wilkins Date: Fri, 20 Jul 2018 13:12:34 +0100 Subject: [PATCH] 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 --- vp9/encoder/vp9_firstpass.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 8e6b3bef7..d130edf5a 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2917,6 +2917,7 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { // 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 -- 2.40.0