shithub: libvpx

Download patch

ref: 82bbb230103ce9c1d1f5175b077a33ae45a13400
parent: c2876cf0fde6baf9cbdf3c7570adedfd1065f3db
author: Adrian Grange <agrange@google.com>
date: Tue Apr 16 11:12:20 EDT 2013

Fixed overflow test on boost calculation

Normalization of the frame boost value was being done
when it reached the value 1028. The intention was to
keep to a range of 10 bits, so it should have been
clipped above 1023.

Change-Id: I0afdddc1d2eb9e7822ec4578903cbe6ec0b33b91

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1963,7 +1963,7 @@
         (cpi->baseline_gf_interval * 100) + (boost - 100);
 
     // Prevent overflow
-    if (boost > 1028) {  // TODO(agrange) Should this be 1024?
+    if (boost > 1023) {
       int divisor = boost >> 10;
       boost /= divisor;
       allocation_chunks /= divisor;
--