• John Koleszar's avatar
    vpxenc: prevent wraparound in the --rate-hist ringbuffer · 05239f0c
    John Koleszar authored
    For clips that are near 60fps and have a lot of alt refs, it's possible
    that the ring buffer holding the previous frames sizes/pts could wrap
    around, leading to a division by zero.
    
    In addition to checking for this condition in the ring buffer loop,
    the buffer size is made dependent on the actual frame rate in use,
    rather than defaulting to 60, which should improve accuracy at frame
    rates >= ~60.
    
    Change-Id: If5a04d6e847316dc5f7504f25c01164cf9332be8
    05239f0c
vpxenc.c 63.9 KB