Fix issues with mixed ARF and GF groups.
authorpaulwilkins <paulwilkins@google.com>
Thu, 14 May 2015 16:16:36 +0000 (17:16 +0100)
committerpaulwilkins <paulwilkins@google.com>
Wed, 20 May 2015 15:46:44 +0000 (16:46 +0100)
commitade9693a30821af5c28b947090aa6d41cb27ea20
treefe2551336b5da9626d2d7cc96f49f83cac9e7df7
parent976f7f42c1ad1ff3cc0792572f9c4f41f05bb375
Fix issues with mixed ARF and GF groups.

This patch addresses two issues that can occur when the
encoder chooses to use a mixture of ARF and GF groups.

The first issue relates to a failure to reset the "ARF active" flag
correctly when transitioning from coding ARF groups to coding
GF groups. This caused some golden frames to be  encoded
with an incorrect bit rate target as if they were ARF overlay frames.

The second issue relates to the encoding of a single short GF group
just before a key frame.  Where the last group before a key frame
is an ARF group we expect the final frame before the key frame  to
be an low data rate overlay frame. However, when the last  group
is a GF group, the final frame before the key frame should be a normal
frame with a normal bit allocation. This issue had the potential to cause
a single poorly coded frame just before a key frame. If that key frame
were a forced key frame rather than a real scene cut, this might cause
pulsing.

Change-Id: Idf1eb5eaf63a231495a74de7899236e1ead9fb00
vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_firstpass.c
vp9/encoder/vp9_ratectrl.c