• paulwilkins's avatar
    Changes to modified error. · 5680b451
    paulwilkins authored
    The modified error was a derivative of the "coded_error"
    that was used to allocate bits between different frames on the
    assumption that the allocation should be linear in terms of this
    modified error.  I.e. a frame with double the modified error score
    should all things being equal get double the number of bits. The
    code also included upper and lower caps derived from input
    VBR parameters.
    
    This patch improves the initial calculation of the clip mean error
    (now called "mean_mod_score" as it is no longer a prediction error)
    used as the midpoint for the rate distribution function and normalizes
    the output "modified scores" scores such that 1.0 indicates a frame
    in the middle of the distribution.  The VBR upper and lower caps are
    then applied directly to a  frame's normalized score.
    
    This refactoring is intended to make it easier to drop in alternative
    distribution functions or to base the rate allocation on a corpus wide
    midpoint (rather than the clip mean).
    
    Change-Id: I4fb09de637e93566bfc4e022b2e7d04660817195
    5680b451
vp9_firstpass.h 5.58 KB