opus_celt: do not use double precision exp2
authorRostislav Pehlivanov <atomnuker@gmail.com>
Thu, 22 Jun 2017 21:37:53 +0000 (22:37 +0100)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Thu, 22 Jun 2017 21:37:53 +0000 (22:37 +0100)
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
libavcodec/opus_celt.c

index feb604d..23749a7 100644 (file)
@@ -485,7 +485,7 @@ static void celt_denormalize(CeltFrame *f, CeltBlock *block, float *data)
 
     for (i = f->start_band; i < f->end_band; i++) {
         float *dst = data + (ff_celt_freq_bands[i] << f->size);
-        float norm = exp2(block->energy[i] + ff_celt_mean_energy[i]);
+        float norm = exp2f(block->energy[i] + ff_celt_mean_energy[i]);
 
         for (j = 0; j < ff_celt_freq_range[i] << f->size; j++)
             dst[j] *= norm;
@@ -664,7 +664,7 @@ static void process_anticollapse(CeltFrame *f, CeltBlock *block, float *X)
 
         /* r needs to be multiplied by 2 or 2*sqrt(2) depending on LM because
         short blocks don't have the same energy as long */
-        r = exp2(1 - Ediff);
+        r = exp2f(1 - Ediff);
         if (f->size == 3)
             r *= M_SQRT2;
         r = FFMIN(thresh, r) * sqrt_1;