• John Koleszar's avatar
    Avoid heap allocation of firstpass stats · 26c6a44c
    John Koleszar authored
    The total_stats, this_frame_stats, and total_left_stats structures
    were previously create by a heap allocation, despite being of fixed
    size. These structures were allocated and deallocated during
    {de,}allocate_compressor_data, which is reinvoked whenever the frame
    size changes. Unfortunately, this clobbers the total_stats and
    total_left_stats data.
    
    Historically, these were variable size at one time, due to the first
    pass motion map, which necessitated their being created by a unique
    heap allocation. However, this bug with the total_stats being
    clobbered has probably been present since that initial implementation.
    
    These structures are instead moved to be stored within the struct
    twopass_rc directly, rather than being heap allocated separately.
    
    Change-Id: I7f9e519e25c58b92969071f0e99fa80307e0682b
    26c6a44c