summaryrefslogtreecommitdiff
path: root/libavcodec/x86
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-01-11 16:04:17 +0100
committerDiego Biurrun <diego@biurrun.de>2016-07-20 18:33:26 +0200
commitc3e83ad3b7d75f3597f47ada2616ba4479665009 (patch)
tree7a1c4e192425bd6854294259f655aa04f2cea86f /libavcodec/x86
parent1dfc3cf89d0eb026af28be46294b85d79499ffb5 (diff)
x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate
Diffstat (limited to 'libavcodec/x86')
-rw-r--r--libavcodec/x86/hpeldsp_init.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c
index 673142807d..a7a45152c9 100644
--- a/libavcodec/x86/hpeldsp_init.c
+++ b/libavcodec/x86/hpeldsp_init.c
@@ -229,15 +229,12 @@ static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int cpu_flags)
#endif /* HAVE_AMD3DNOW_EXTERNAL */
}
-static void hpeldsp_init_sse2(HpelDSPContext *c, int flags, int cpu_flags)
+static void hpeldsp_init_sse2_fast(HpelDSPContext *c, int flags, int cpu_flags)
{
#if HAVE_SSE2_EXTERNAL
- if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) {
- // these functions are slower than mmx on AMD, but faster on Intel
- c->put_pixels_tab[0][0] = ff_put_pixels16_sse2;
- c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_sse2;
- c->avg_pixels_tab[0][0] = ff_avg_pixels16_sse2;
- }
+ c->put_pixels_tab[0][0] = ff_put_pixels16_sse2;
+ c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_sse2;
+ c->avg_pixels_tab[0][0] = ff_avg_pixels16_sse2;
#endif /* HAVE_SSE2_EXTERNAL */
}
@@ -254,8 +251,8 @@ av_cold void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags)
if (EXTERNAL_MMXEXT(cpu_flags))
hpeldsp_init_mmxext(c, flags, cpu_flags);
- if (EXTERNAL_SSE2(cpu_flags))
- hpeldsp_init_sse2(c, flags, cpu_flags);
+ if (EXTERNAL_SSE2_FAST(cpu_flags))
+ hpeldsp_init_sse2_fast(c, flags, cpu_flags);
if (CONFIG_VP3_DECODER)
ff_hpeldsp_vp3_init_x86(c, cpu_flags, flags);