• Urvang Joshi's avatar
    optimize_b_greedy: Avoid left shift of negative value. · 6eb35eb4
    Urvang Joshi authored
    Before:
    -------
    accu_error was always <= 0:
    - It was initialized to zero, and
    - Became more and more negative through the iterations.
    
    This meant that RDOPT() macro usage on accu_error was causing left shift
    of negative value.
    
    Now:
    ----
    - accu_error is initialized to a large positive value.
    - It becomes smaller on every iteration but remains >= always.
    
    This is functionally equivalent: verified that there's no change in
    output due to this patch.
    
    BUG=aomedia:600
    
    Change-Id: I654572a72234c588c8f332d5b66a5587fc6610b4
    6eb35eb4
encodemb.c 64.3 KB