Commit 7e98da9c authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

opus_celt: do not use double precision exp2

Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 505cb8e3
...@@ -485,7 +485,7 @@ static void celt_denormalize(CeltFrame *f, CeltBlock *block, float *data) ...@@ -485,7 +485,7 @@ static void celt_denormalize(CeltFrame *f, CeltBlock *block, float *data)
for (i = f->start_band; i < f->end_band; i++) { for (i = f->start_band; i < f->end_band; i++) {
float *dst = data + (ff_celt_freq_bands[i] << f->size); 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++) for (j = 0; j < ff_celt_freq_range[i] << f->size; j++)
dst[j] *= norm; dst[j] *= norm;
...@@ -664,7 +664,7 @@ static void process_anticollapse(CeltFrame *f, CeltBlock *block, float *X) ...@@ -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 /* 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 */ short blocks don't have the same energy as long */
r = exp2(1 - Ediff); r = exp2f(1 - Ediff);
if (f->size == 3) if (f->size == 3)
r *= M_SQRT2; r *= M_SQRT2;
r = FFMIN(thresh, r) * sqrt_1; r = FFMIN(thresh, r) * sqrt_1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment