Change to KF boost calculation.
authorPaul Wilkins <paulwilkins@google.com>
Wed, 12 Oct 2016 19:50:08 +0000 (20:50 +0100)
committerpaulwilkins <paulwilkins@google.com>
Fri, 28 Oct 2016 14:35:59 +0000 (15:35 +0100)
commit715c65914bda7cbdabc274394fe701cbe65bea1a
treefe04191f09460dfc354ef47fce43cba5e8bc2c50
parentde859676ddd91978fe7d17c8dc39130b04c438e7
Change to KF boost calculation.

This  change is a step in a larger change to the way boost and interval are
determined for ARF and Key frames.

This patch contains some pluming for the general case but focuses on the
key frame boost calculation. This now relies more heavily on the rate at
which the error score increases between the primary and secondary reference
frame. This seems to be less fragile when dealing with different frame sizes.
For example larger image formats tend in the first pass to see a higher
% of intra coded blocks and the use of this number in calculating the frame
decay factor was leading to much lower boost numbers for 4K, for example,
than the same clip coded at 2K.

This change does give overall gains but they are MUCH larger for the 4K Netflix
set. For the 4K Netflix set the average gain is around 3% with some clips > 20%
whereas for the same set at 2K the average gain is 0.5-1%.

In general for small image formats the boost is most often reduced a little whereas
4K clips the boost is increased. There are some -ve cases such as Akiyo at 352x288
where the reduced boost hurts the metrics, especially for SSIM, even while
the set as a whole improves. This is most notable at very low Q and may be the
subject of a future patch.

Some common code for KF and ARF was separated in this patch for the purposes of
tuning but may later be re-merged if appropriate.

Change-Id: Iaa15ac5a58d2be89181100d95cef6a8dc4b12d0d
vp9/encoder/vp9_firstpass.c