aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/float_dsp.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-09-24 15:00:53 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-12-05 11:23:36 -0500
commitac7eb4cb20ea84cfc911794722695d501b354ee9 (patch)
treeb9736adb1c0e993f0051b11cc249b67404e518f3 /libavutil/float_dsp.c
parentda025d115a1ada58081cd869e85b81a1c183ae9e (diff)
downloadffmpeg-ac7eb4cb20ea84cfc911794722695d501b354ee9.tar.gz
float_dsp: add vector_dmul_scalar() to multiply a vector of doubles
Include x86-optimized versions for SSE2 and AVX.
Diffstat (limited to 'libavutil/float_dsp.c')
-rw-r--r--libavutil/float_dsp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c
index b6b11818b5..22139defe4 100644
--- a/libavutil/float_dsp.c
+++ b/libavutil/float_dsp.c
@@ -44,11 +44,20 @@ static void vector_fmul_scalar_c(float *dst, const float *src, float mul,
dst[i] = src[i] * mul;
}
+static void vector_dmul_scalar_c(double *dst, const double *src, double mul,
+ int len)
+{
+ int i;
+ for (i = 0; i < len; i++)
+ dst[i] = src[i] * mul;
+}
+
void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact)
{
fdsp->vector_fmul = vector_fmul_c;
fdsp->vector_fmac_scalar = vector_fmac_scalar_c;
fdsp->vector_fmul_scalar = vector_fmul_scalar_c;
+ fdsp->vector_dmul_scalar = vector_dmul_scalar_c;
#if ARCH_ARM
ff_float_dsp_init_arm(fdsp);