shithub: opus

Download patch

ref: a88d8365d42e5369777afa496b43ea88a1aa9106
parent: f396c08f772a5ad4b364a9a2104b4af3678b7428
author: Jean-Marc Valin <[email protected]>
date: Wed Jun 18 13:06:32 EDT 2014

Fixes a bug in silk_sum_sqr_shift() that was causing issues with Burg.

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.

--- a/silk/sum_sqr_shift.c
+++ b/silk/sum_sqr_shift.c
@@ -53,6 +53,7 @@
             /* Scale down */
             nrg = (opus_int32)silk_RSHIFT_uint( (opus_uint32)nrg, 2 );
             shft = 2;
+            i+=2;
             break;
         }
     }