diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 14:31:55 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 14:31:55 +0100 |
commit | 8102f27b5b3dff54f8099019c2df4701ac5e5d4f (patch) | |
tree | f623e5063c24e6c4afc50338dfeecf7054c673a2 /libavutil/float_dsp.c | |
parent | 24604ebaf85b5436d10da811f455dd710b353aca (diff) | |
parent | 73b704ac609d83e0be124589f24efd9b94947cf9 (diff) | |
download | ffmpeg-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 'libavutil/float_dsp.c')
-rw-r--r-- | libavutil/float_dsp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c index 05688e4c3f..50c9e60c32 100644 --- a/libavutil/float_dsp.c +++ b/libavutil/float_dsp.c @@ -104,6 +104,17 @@ static void butterflies_float_c(float *restrict v1, float *restrict v2, } } +float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len) +{ + float p = 0.0; + int i; + + for (i = 0; i < len; i++) + p += v1[i] * v2[i]; + + return p; +} + void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) { fdsp->vector_fmul = vector_fmul_c; @@ -114,6 +125,7 @@ void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) fdsp->vector_fmul_add = vector_fmul_add_c; fdsp->vector_fmul_reverse = vector_fmul_reverse_c; fdsp->butterflies_float = butterflies_float_c; + fdsp->scalarproduct_float = avpriv_scalarproduct_float_c; #if ARCH_ARM ff_float_dsp_init_arm(fdsp); |