aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsputil.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2008-08-13 23:35:40 +0000
committerLoren Merritt <lorenm@u.washington.edu>2008-08-13 23:35:40 +0000
commit911e21a306dc7fddb3e8f0acb827ff89eaf9418d (patch)
tree31343bb32b071255ade7cbd1d5d8cfda57e36462 /libavcodec/dsputil.c
parentac2e556456bf8be035bdee386e8ec2a63ebb870d (diff)
downloadffmpeg-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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index b6df158b3e..241bad0d4f 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;