summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_firstpass.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2018-07-20 13:12:34 +0100
committerPaul Wilkins <paulwilkins@google.com>2018-07-20 16:38:32 +0100
commit7409225a3cd465142bd20cec313270c0ecd0589b (patch)
treeccca8d0cee2cd05f2945d6fe909eb92c9a7eb79c /vp9/encoder/vp9_firstpass.c
parente70fa980b87309553722700310ffee1e0c5bce40 (diff)
downloadlibvpx-7409225a3cd465142bd20cec313270c0ecd0589b.tar
libvpx-7409225a3cd465142bd20cec313270c0ecd0589b.tar.gz
libvpx-7409225a3cd465142bd20cec313270c0ecd0589b.tar.bz2
libvpx-7409225a3cd465142bd20cec313270c0ecd0589b.zip
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
Diffstat (limited to 'vp9/encoder/vp9_firstpass.c')
-rw-r--r--vp9/encoder/vp9_firstpass.c1
1 files changed, 1 insertions, 0 deletions
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