Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2014-05-16 02:54:00 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-05-16 07:27:03 +0400
commita9bf713d350a07edd17bd0cc88df92261cda79f2 (patch)
treee92b57ed09d316d96b1bcd25a967e2d5172c926c /libswresample/resample.c
parentcdff1cc98f3be4b8d5e51a352fc565d1a4e36f45 (diff)
swresample: add swri_resample_float_avx
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/resample.c')
-rw-r--r--libswresample/resample.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index 0ce74d076c..0fef28373b 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -323,6 +323,12 @@ static int set_compensation(ResampleContext *c, int sample_delta, int compensati
#undef TEMPLATE_RESAMPLE_DBL_SSE2
#endif
+#if HAVE_AVX_INLINE
+#define TEMPLATE_RESAMPLE_FLT_AVX
+#include "resample_template.c"
+#undef TEMPLATE_RESAMPLE_FLT_AVX
+#endif
+
#endif // HAVE_MMXEXT_INLINE
static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed){
@@ -343,6 +349,10 @@ static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, A
#endif
if(c->format == AV_SAMPLE_FMT_S16P) ret= swri_resample_int16(c, (int16_t*)dst->ch[i], (const int16_t*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count);
else if(c->format == AV_SAMPLE_FMT_S32P) ret= swri_resample_int32(c, (int32_t*)dst->ch[i], (const int32_t*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count);
+#if HAVE_AVX_INLINE
+ else if(c->format == AV_SAMPLE_FMT_FLTP && (mm_flags&AV_CPU_FLAG_AVX))
+ ret= swri_resample_float_avx (c, (float*)dst->ch[i], (const float*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count);
+#endif
#if HAVE_SSE_INLINE
else if(c->format == AV_SAMPLE_FMT_FLTP && (mm_flags&AV_CPU_FLAG_SSE))
ret= swri_resample_float_sse (c, (float*)dst->ch[i], (const float*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count);