Fixes a bug in silk_sum_sqr_shift() that was causing issues with Burg.
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Wed, 18 Jun 2014 21:06:32 +0000 (17:06 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Wed, 18 Jun 2014 21:06:32 +0000 (17:06 -0400)
When an overflow happened in silk_sum_sqr_shift(), the sample pair causing
the overflow would be counted twice. This would lead to the C0 in
silk_burg_modified() being too large and cause problems on loud, tonal
signals. Thanks to Marcello Caramma for tracking down the problem.

silk/sum_sqr_shift.c

index 12514c9..129df19 100644 (file)
@@ -53,6 +53,7 @@ void silk_sum_sqr_shift(
             /* Scale down */
             nrg = (opus_int32)silk_RSHIFT_uint( (opus_uint32)nrg, 2 );
             shft = 2;
+            i+=2;
             break;
         }
     }