aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmavoice.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-23 14:31:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-23 14:31:55 +0100
commit8102f27b5b3dff54f8099019c2df4701ac5e5d4f (patch)
treef623e5063c24e6c4afc50338dfeecf7054c673a2 /libavcodec/wmavoice.c
parent24604ebaf85b5436d10da811f455dd710b353aca (diff)
parent73b704ac609d83e0be124589f24efd9b94947cf9 (diff)
downloadffmpeg-8102f27b5b3dff54f8099019c2df4701ac5e5d4f.tar.gz
Merge commit '73b704ac609d83e0be124589f24efd9b94947cf9'
* commit '73b704ac609d83e0be124589f24efd9b94947cf9': arm: Add some missing header #includes floatdsp: move scalarproduct_float from dsputil to avfloatdsp. Conflicts: libavcodec/acelp_pitch_delay.c libavcodec/amrnbdec.c libavcodec/amrwbdec.c libavcodec/ra288.c libavcodec/x86/dsputil_mmx.c libavutil/x86/float_dsp.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 0ae3748911..c3b6ab3b5f 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -30,8 +30,8 @@
#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"
@@ -523,7 +523,7 @@ static int kalman_smoothen(WMAVoiceContext *s, int pitch,
/* 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;
@@ -532,7 +532,7 @@ static int kalman_smoothen(WMAVoiceContext *s, int pitch,
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;
@@ -562,8 +562,8 @@ static float tilt_factor(const float *lpcs, int n_lpcs)
{
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;
}
@@ -656,7 +656,8 @@ static void calc_input_response(WMAVoiceContext *s, float *lpcs,
-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;
}
@@ -1320,7 +1321,8 @@ static void synth_block_fcb_acb(WMAVoiceContext *s, GetBitContext *gb,
/* 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],