diff options
author | James Almer <jamrial@gmail.com> | 2017-01-31 14:53:27 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-01-31 14:53:27 -0300 |
commit | 4d0e89ce27bc8d995bf9be831e62ea0b3893e375 (patch) | |
tree | 3038ec2641e899e7a28b75aa0cf0164e303857b4 /libavcodec/x86 | |
parent | ca8a3978e57c7c8f6abab8547f47483e407469b7 (diff) | |
parent | c3e83ad3b7d75f3597f47ada2616ba4479665009 (diff) | |
download | ffmpeg-4d0e89ce27bc8d995bf9be831e62ea0b3893e375.tar.gz |
Merge commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009'
* commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009':
x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/hpeldsp_init.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c index e8da184ae6..a19292485a 100644 --- a/libavcodec/x86/hpeldsp_init.c +++ b/libavcodec/x86/hpeldsp_init.c @@ -264,21 +264,18 @@ 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->put_pixels_tab[0][1] = ff_put_pixels16_x2_sse2; - c->put_pixels_tab[0][2] = ff_put_pixels16_y2_sse2; - c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_sse2; - c->avg_pixels_tab[0][0] = ff_avg_pixels16_sse2; - c->avg_pixels_tab[0][1] = ff_avg_pixels16_x2_sse2; - c->avg_pixels_tab[0][2] = ff_avg_pixels16_y2_sse2; - c->avg_pixels_tab[0][3] = ff_avg_pixels16_xy2_sse2; - } + c->put_pixels_tab[0][0] = ff_put_pixels16_sse2; + c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_sse2; + c->put_pixels_tab[0][1] = ff_put_pixels16_x2_sse2; + c->put_pixels_tab[0][2] = ff_put_pixels16_y2_sse2; + c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_sse2; + c->avg_pixels_tab[0][0] = ff_avg_pixels16_sse2; + c->avg_pixels_tab[0][1] = ff_avg_pixels16_x2_sse2; + c->avg_pixels_tab[0][2] = ff_avg_pixels16_y2_sse2; + c->avg_pixels_tab[0][3] = ff_avg_pixels16_xy2_sse2; #endif /* HAVE_SSE2_EXTERNAL */ } @@ -305,8 +302,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 (EXTERNAL_SSSE3(cpu_flags)) hpeldsp_init_ssse3(c, flags, cpu_flags); |