From f27e1d645e609c01fbacfc2425818b56126df567 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Sun, 13 Jul 2008 14:56:01 +0000 Subject: simplify vorbis windowing Originally committed as revision 14205 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dsputil.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) (limited to 'libavcodec/dsputil.c') diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 9ec077e569..55929d0e76 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3930,17 +3930,40 @@ void ff_vector_fmul_add_add_c(float *dst, const float *src0, const float *src1, dst[i*step] = src0[i] * src1[i] + src2[i] + src3; } +void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){ + int i; + for(i=0; i>31; + // is this faster on some gcc/cpu combinations? +// if(tmp > 0x43c0ffff) tmp = 0xFFFF; +// else tmp = 0; + } + return tmp - 0x8000; +} + void ff_float_to_int16_c(int16_t *dst, const float *src, long len){ int i; - for(i=0; i>31; - // is this faster on some gcc/cpu combinations? -// if(tmp > 0x43c0ffff) tmp = 0xFFFF; -// else tmp = 0; + for(i=0; ivector_fmul = vector_fmul_c; c->vector_fmul_reverse = vector_fmul_reverse_c; c->vector_fmul_add_add = ff_vector_fmul_add_add_c; + c->vector_fmul_window = ff_vector_fmul_window_c; c->float_to_int16 = ff_float_to_int16_c; + c->float_to_int16_interleave = ff_float_to_int16_interleave_c; c->add_int16 = add_int16_c; c->sub_int16 = sub_int16_c; c->scalarproduct_int16 = scalarproduct_int16_c; -- cgit v1.2.3