#include <math.h>
#include "libavutil/channel_layout.h"
+#include "libavutil/float_dsp.h"
#include "libavutil/mem.h"
-#include "dsputil.h"
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
/* find best fitting point in history */
do {
- dot = ff_scalarproduct_float_c(in, ptr, size);
+ dot = avpriv_scalarproduct_float_c(in, ptr, size);
if (dot > optimal_gain) {
optimal_gain = dot;
best_hist_ptr = ptr;
if (optimal_gain <= 0)
return -1;
- dot = ff_scalarproduct_float_c(best_hist_ptr, best_hist_ptr, size);
+ dot = avpriv_scalarproduct_float_c(best_hist_ptr, best_hist_ptr, size);
if (dot <= 0) // would be 1.0
return -1;
{
float rh0, rh1;
- rh0 = 1.0 + ff_scalarproduct_float_c(lpcs, lpcs, n_lpcs);
- rh1 = lpcs[0] + ff_scalarproduct_float_c(lpcs, &lpcs[1], n_lpcs - 1);
+ rh0 = 1.0 + avpriv_scalarproduct_float_c(lpcs, lpcs, n_lpcs);
+ rh1 = lpcs[0] + avpriv_scalarproduct_float_c(lpcs, &lpcs[1], n_lpcs - 1);
return rh1 / rh0;
}
-1.8 * tilt_factor(coeffs, remainder - 1),
coeffs, remainder);
}
- sq = (1.0 / 64.0) * sqrtf(1 / ff_scalarproduct_float_c(coeffs, coeffs, remainder));
+ sq = (1.0 / 64.0) * sqrtf(1 / avpriv_scalarproduct_float_c(coeffs, coeffs,
+ remainder));
for (n = 0; n < remainder; n++)
coeffs[n] *= sq;
}
/* Calculate gain for adaptive & fixed codebook signal.
* see ff_amr_set_fixed_gain(). */
idx = get_bits(gb, 7);
- fcb_gain = expf(ff_scalarproduct_float_c(s->gain_pred_err, gain_coeff, 6) -
+ fcb_gain = expf(avpriv_scalarproduct_float_c(s->gain_pred_err,
+ gain_coeff, 6) -
5.2409161640 + wmavoice_gain_codebook_fcb[idx]);
acb_gain = wmavoice_gain_codebook_acb[idx];
pred_err = av_clipf(wmavoice_gain_codebook_fcb[idx],