diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2008-08-13 23:35:40 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2008-08-13 23:35:40 +0000 |
commit | 911e21a306dc7fddb3e8f0acb827ff89eaf9418d (patch) | |
tree | 31343bb32b071255ade7cbd1d5d8cfda57e36462 /libavcodec/dsputil.c | |
parent | ac2e556456bf8be035bdee386e8ec2a63ebb870d (diff) | |
download | ffmpeg-streaming-911e21a306dc7fddb3e8f0acb827ff89eaf9418d.zip ffmpeg-streaming-911e21a306dc7fddb3e8f0acb827ff89eaf9418d.tar.gz |
simd int->float
20% faster ac3 if downmixing, 15% if not
Originally committed as revision 14743 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index b6df158..241bad0 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3948,6 +3948,12 @@ void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, c } } +static void int32_to_float_fmul_scalar_c(float *dst, const int *src, float mul, int len){ + int i; + for(i=0; i<len; i++) + dst[i] = src[i] * mul; +} + static av_always_inline int float_to_int16_one(const float *src){ int_fast32_t tmp = *(const int32_t*)src; if(tmp & 0xf0000){ @@ -4489,6 +4495,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) 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->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_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; |