diff dsputil.c @ 7564:7cf793954871 libavcodec

simd int->float 20% faster ac3 if downmixing, 15% if not
author lorenm
date Wed, 13 Aug 2008 23:35:40 +0000
parents 8390efaa0c03
children 1fbfce20cb79
line wrap: on
line diff
--- a/dsputil.c	Wed Aug 13 23:33:48 2008 +0000
+++ b/dsputil.c	Wed Aug 13 23:35:40 2008 +0000
@@ -3948,6 +3948,12 @@
     }
 }
 
+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 @@
     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;