diff options
author | James Almer <jamrial@gmail.com> | 2014-03-17 17:07:34 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-18 15:00:50 +0100 |
commit | 7c8bf09eddf4fe738eb05bec68479024a66bbde9 (patch) | |
tree | 593c8e43f2d4045af13976ec7bd206a69a9f4195 /libswresample/resample.c | |
parent | c56d25c4764fee4b7b0e94212ff279f34c8ba0c8 (diff) | |
download | ffmpeg-7c8bf09eddf4fe738eb05bec68479024a66bbde9.tar.gz |
swresample: change COMMON_CORE_INT16 asm from SSSE3 to SSE2
pshuf+paddd is slightly faster than phaddd.
The real gain is in pre-ssse3 processors like AMD K8 and K10, which get
a big boost in performance compared to the mmxext version
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c index 8b1b6ca9af..034b47ae59 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -302,10 +302,10 @@ static int set_compensation(ResampleContext *c, int sample_delta, int compensati #include "resample_template.c" #undef TEMPLATE_RESAMPLE_S16_MMX2 -#if HAVE_SSSE3_INLINE -#define TEMPLATE_RESAMPLE_S16_SSSE3 +#if HAVE_SSE2_INLINE +#define TEMPLATE_RESAMPLE_S16_SSE2 #include "resample_template.c" -#undef TEMPLATE_RESAMPLE_S16_SSSE3 +#undef TEMPLATE_RESAMPLE_S16_SSE2 #endif #endif // HAVE_MMXEXT_INLINE @@ -317,8 +317,8 @@ static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, A for(i=0; i<dst->ch_count; i++){ #if HAVE_MMXEXT_INLINE -#if HAVE_SSSE3_INLINE - if(c->format == AV_SAMPLE_FMT_S16P && (mm_flags&AV_CPU_FLAG_SSSE3)) ret= swri_resample_int16_ssse3(c, (int16_t*)dst->ch[i], (const int16_t*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count); +#if HAVE_SSE2_INLINE + if(c->format == AV_SAMPLE_FMT_S16P && (mm_flags&AV_CPU_FLAG_SSE2)) ret= swri_resample_int16_sse2 (c, (int16_t*)dst->ch[i], (const int16_t*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count); else #endif if(c->format == AV_SAMPLE_FMT_S16P && (mm_flags&AV_CPU_FLAG_MMX2 )){ |