shithub: libvpx

Download patch

ref: c30a9cd97dbeee9cdd18527e9571304cb01d0073
parent: f30b323180c3c358b646414f79f33da5664eeccb
author: Paul Wilkins <paulwilkins@google.com>
date: Thu Feb 13 09:50:55 EST 2014

Remove some cases for turning off arf.

Flipping arf on and off too often is hurting some clips.
This change makes no difference for 50-75% of our test
clips but helps some by a big margin. (eg. std-hd crew
by 6% and one of the YT and YT-hd clips by 14%)

Average improvements for 2 pass, speed 2 (psnr,ssim)
are as follows:-

derf  0.165%, 0.210%
yt  1.210%, 1.464%
yt-hd 1.189%, 1.471%
std-hd 1.031%, 0.886%

Change-Id: I121fe66cfb4a62d384b23b484a7d648789641969

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1566,13 +1566,7 @@
       (i >= MIN_GF_INTERVAL) &&
       // for real scene cuts (not forced kfs) dont allow arf very near kf.
       (rc->next_key_frame_forced ||
-        (i <= (rc->frames_to_key - MIN_GF_INTERVAL))) &&
-      ((next_frame.pcnt_inter > 0.75) ||
-       (next_frame.pcnt_second_ref > 0.5)) &&
-      ((mv_in_out_accumulator / (double)i > -0.2) ||
-       (mv_in_out_accumulator > -2.0)) &&
-      (boost_score > 100)) {
-
+      (i <= (rc->frames_to_key - MIN_GF_INTERVAL)))) {
     // Alternative boost calculation for alt ref
     rc->gfu_boost = calc_arf_boost(cpi, 0, (i - 1), (i - 1), &f_boost,
                                    &b_boost);
--