diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-20 15:41:14 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-22 11:55:42 -0800 |
commit | 5959bfaca396ecaf63a8123055f499688b79cae3 (patch) | |
tree | a32f22fb1a5ad7ddc731e9cee13ffface840cb4a /libavutil/float_dsp.c | |
parent | 42d324694883cdf1fff1612ac70fa403692a1ad4 (diff) | |
download | ffmpeg-5959bfaca396ecaf63a8123055f499688b79cae3.tar.gz |
floatdsp: move butterflies_float from dsputil to avfloatdsp.
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
Diffstat (limited to 'libavutil/float_dsp.c')
-rw-r--r-- | libavutil/float_dsp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c index aa5293710b..c6e2b41d66 100644 --- a/libavutil/float_dsp.c +++ b/libavutil/float_dsp.c @@ -89,6 +89,18 @@ static void vector_fmul_reverse_c(float *dst, const float *src0, dst[i] = src0[i] * src1[-i]; } +static void butterflies_float_c(float *restrict v1, float *restrict v2, + int len) +{ + int i; + + for (i = 0; i < len; i++) { + float t = v1[i] - v2[i]; + v1[i] += v2[i]; + v2[i] = t; + } +} + void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) { fdsp->vector_fmul = vector_fmul_c; @@ -98,6 +110,7 @@ void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) fdsp->vector_fmul_window = vector_fmul_window_c; fdsp->vector_fmul_add = vector_fmul_add_c; fdsp->vector_fmul_reverse = vector_fmul_reverse_c; + fdsp->butterflies_float = butterflies_float_c; #if ARCH_ARM ff_float_dsp_init_arm(fdsp); |