*/
#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"
if(erasure)
quant_energy[0] = FFMAX(avg_gain >> log2_ma_pred_order, -10240) - 4096; // -10 and -4 in (5.10)
else
- quant_energy[0] = (6165 * ((ff_log2(gain_corr_factor) >> 2) - (13 << 13))) >> 13;
+ quant_energy[0] = (6165 * ((ff_log2_q15(gain_corr_factor) >> 2) - (13 << 13))) >> 13;
}
int16_t ff_acelp_decode_gain_code(
// 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);