shithub: opus

Download patch

ref: 6ae5101fb43846dea3ae6613d6f8ce04e5294572
parent: 1a9e8539d38d4bd79fd9717ad8d97b7e95ea264f
author: Jean-Marc Valin <[email protected]>
date: Fri May 11 08:09:05 EDT 2012

Fixes a fixed-point overflow by scaling pitch search more conservatively

--- a/celt/pitch.c
+++ b/celt/pitch.c
@@ -114,7 +114,7 @@
    opus_val32 maxabs = MAX32(1, celt_maxabs32(x[0], len));
    if (C==2)
       maxabs = MAX32(maxabs, celt_maxabs32(x[1], len));
-   shift = IMAX(0,celt_ilog2(maxabs)-11);
+   shift = IMAX(0,celt_ilog2(maxabs)-10);
    if (C==2)
       shift++;
 #endif