aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmavoice.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-28 16:28:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-28 16:28:48 +0200
commit416d2f7a1244e7e93e291786ac98313153f87db5 (patch)
tree231d0d704cda257e4bc2a210df6b2fe553f407c6 /libavcodec/wmavoice.c
parentfb6fb0dedbc103ba9cd4e7d63edee15317143b21 (diff)
parent7627c35a81241c98768d2d1f13d576591cac0b1c (diff)
downloadffmpeg-416d2f7a1244e7e93e291786ac98313153f87db5.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: vc1: export some functions configure: use HOSTCC_C/O in check_host_cc configure: use AS_O setting in check_as configure: use LD_O setting in check_ld() Revert "dsputil: make {add/put/put_signed}_pixels_clamped() non-static." build: Restore dependency of acelp_filters.o on celp_math.o celp_math: Replace duplicate ff_dot_productf() by ff_scalarproduct_c() celp_math: Move ff_cos() to the only place it is used build: Use portable abstraction for linker/hostcc output file syntax configure: Fix shared library creation for OpenBSD vp56: Don't use DECLARE_ALIGN on a typedef name mss1: move code that will be reused by MSS2 decoder into separate file mss1: merge decode_intra() and decode_inter() avprobe: Get rid of ugly casts in the options table vf_hqdn3d: Remove a duplicate inline declaration Conflicts: Makefile configure ffprobe.c libavcodec/Makefile libavcodec/amrnbdec.c libavcodec/amrwbdec.c libavcodec/celp_math.c libavcodec/celp_math.h libavcodec/dsputil.c libavcodec/lsp.c libavcodec/mss1.c libavcodec/ra288.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index c61b223793..0a9961c882 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -28,11 +28,12 @@
#define UNCHECKED_BITSTREAM_READER 1
#include <math.h>
+
+#include "dsputil.h"
#include "avcodec.h"
#include "get_bits.h"
#include "put_bits.h"
#include "wmavoice_data.h"
-#include "celp_math.h"
#include "celp_filters.h"
#include "acelp_vectors.h"
#include "acelp_filters.h"
@@ -518,7 +519,7 @@ static int kalman_smoothen(WMAVoiceContext *s, int pitch,
/* find best fitting point in history */
do {
- dot = ff_dot_productf(in, ptr, size);
+ dot = ff_scalarproduct_float_c(in, ptr, size);
if (dot > optimal_gain) {
optimal_gain = dot;
best_hist_ptr = ptr;
@@ -527,7 +528,7 @@ static int kalman_smoothen(WMAVoiceContext *s, int pitch,
if (optimal_gain <= 0)
return -1;
- dot = ff_dot_productf(best_hist_ptr, best_hist_ptr, size);
+ dot = ff_scalarproduct_float_c(best_hist_ptr, best_hist_ptr, size);
if (dot <= 0) // would be 1.0
return -1;
@@ -557,8 +558,8 @@ static float tilt_factor(const float *lpcs, int n_lpcs)
{
float rh0, rh1;
- rh0 = 1.0 + ff_dot_productf(lpcs, lpcs, n_lpcs);
- rh1 = lpcs[0] + ff_dot_productf(lpcs, &lpcs[1], n_lpcs - 1);
+ rh0 = 1.0 + ff_scalarproduct_float_c(lpcs, lpcs, n_lpcs);
+ rh1 = lpcs[0] + ff_scalarproduct_float_c(lpcs, &lpcs[1], n_lpcs - 1);
return rh1 / rh0;
}
@@ -651,7 +652,7 @@ 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_dot_productf(coeffs, coeffs, remainder));
+ sq = (1.0 / 64.0) * sqrtf(1 / ff_scalarproduct_float_c(coeffs, coeffs, remainder));
for (n = 0; n < remainder; n++)
coeffs[n] *= sq;
}
@@ -1315,7 +1316,7 @@ 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_dot_productf(s->gain_pred_err, gain_coeff, 6) -
+ fcb_gain = expf(ff_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],