shithub: opus

Download patch

ref: 129964098baf22f0a024d441e0dc9f4314671a8c
parent: ae01e119cbbd9b8c4897dd842933b327a9d7eb20
author: Jean-Marc Valin <[email protected]>
date: Wed Aug 4 05:13:24 EDT 2010

More float conversion cleanup

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -803,7 +803,7 @@
          for (c=0;c<C;c++)
             for (i=0;i<16;i++)
                in[C*(transient_time+i-16)+c] /= 1+transientWindow[i]*((1<<transient_shift)-1);
-         gain_1 = 1./(1<<transient_shift);
+         gain_1 = 1.f/(1<<transient_shift);
          for (c=0;c<C;c++)
             for (i=transient_time;i<N+st->overlap;i++)
                in[C*i+c] *= gain_1;
@@ -1624,7 +1624,7 @@
                e[i] = 0;
          } else if (S1 < S2)
          {
-            celt_word16 ratio = celt_sqrt(frac_div32(SHR32(S1,1)+1,S2+1.));
+            celt_word16 ratio = celt_sqrt(frac_div32(SHR32(S1,1)+1,S2+1));
             for (i=0;i<len+overlap;i++)
                e[i] = MULT16_16_Q15(ratio, e[i]);
          }