#include <stdint.h>
#include "libavutil/float_dsp.h"
+#include "libavutil/libm.h"
#include "imdct15.h"
#include "opus.h"
for (i = s->startband; i < s->endband; i++) {
float *dst = data + (celt_freq_bands[i] << s->duration);
- float norm = pow(2, frame->energy[i] + celt_mean_energy[i]);
+ float norm = exp2(frame->energy[i] + celt_mean_energy[i]);
for (j = 0; j < celt_freq_range[i] << s->duration; j++)
dst[j] *= norm;
/* depth in 1/8 bits */
depth = (1 + s->pulses[i]) / (celt_freq_range[i] << s->duration);
- thresh = pow(2, -1.0 - 0.125f * depth);
+ thresh = exp2f(-1.0 - 0.125f * depth);
sqrt_1 = 1.0f / sqrtf(celt_freq_range[i] << s->duration);
xptr = X + (celt_freq_bands[i] << s->duration);
/* 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 = pow(2, 1 - Ediff);
+ r = exp2(1 - Ediff);
if (s->duration == 3)
r *= M_SQRT2;
r = FFMIN(thresh, r) * sqrt_1;