• paulwilkins's avatar
    Fix issues with mixed ARF and GF groups. · ade9693a
    paulwilkins authored
    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
    ade9693a