shithub: opus

Download patch

ref: 2b73a27ecebafe55755f569680031ac5759e9f74
parent: 6391fe82298c5ff673e0249a2b48f2f9fef51ecd
author: Jean-Marc Valin <[email protected]>
date: Tue May 26 20:05:27 EDT 2009

1024 pulses ought to be enough for everybody

--- a/libcelt/rate.h
+++ b/libcelt/rate.h
@@ -59,8 +59,8 @@
       switch (N)
       {
          case 3:
-            hi = 32767;
-            for (i=0;i<15;i++)
+            hi = 1024;
+            for (i=0;i<10;i++)
             {
                int pulses = (lo+hi)>>1;
                if (log2_frac(((UMUL16_16(pulses,pulses)>>1)+1)>>1, 4) > bits)
@@ -70,8 +70,8 @@
             }
             break;
          case 4:
-            hi = 1172;
-            for (i=0;i<15;i++)
+            hi = 1024;
+            for (i=0;i<10;i++)
             {
                int pulses = (lo+hi)>>1;
                if (log2_frac((UMUL32(UMUL16_16(pulses,pulses)+2,pulses))/3<<3, 4) > bits)