*/
#include "libavutil/common.h"
+#include "libavutil/float_dsp.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
-#include "dsputil.h"
#include "acelp_pitch_delay.h"
#include "celp_math.h"
+#include "audiodsp.h"
int ff_acelp_decode_8bit_to_1st_delay3(int ac_index)
{
}
int16_t ff_acelp_decode_gain_code(
- DSPContext *dsp,
+ AudioDSPContext *adsp,
int gain_corr_factor,
const int16_t* fc_v,
int mr_energy,
mr_energy += quant_energy[i] * ma_prediction_coeff[i];
mr_energy = gain_corr_factor * exp(M_LN10 / (20 << 23) * mr_energy) /
- sqrt(dsp->scalarproduct_int16(fc_v, fc_v, subframe_size));
+ sqrt(adsp->scalarproduct_int16(fc_v, fc_v, subframe_size));
return mr_energy >> 12;
}
// Note 10^(0.05 * -10log(average x2)) = 1/sqrt((average x2)).
float val = fixed_gain_factor *
exp2f(M_LOG2_10 * 0.05 *
- (ff_scalarproduct_float_c(pred_table, prediction_error, 4) +
+ (avpriv_scalarproduct_float_c(pred_table, prediction_error, 4) +
energy_mean)) /
sqrtf(fixed_mean_energy);