[FFmpeg-cvslog] Merge commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009'
James Almer
git at videolan.org
Tue Jan 31 19:55:36 EET 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jan 31 14:53:27 2017 -0300| [4d0e89ce27bc8d995bf9be831e62ea0b3893e375] | committer: James Almer
Merge commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009'
* commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009':
x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d0e89ce27bc8d995bf9be831e62ea0b3893e375
---
libavcodec/x86/hpeldsp_init.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c
index e8da184..a192924 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);
======================================================================
diff --cc libavcodec/x86/hpeldsp_init.c
index e8da184,a7a4515..a192924
--- a/libavcodec/x86/hpeldsp_init.c
+++ b/libavcodec/x86/hpeldsp_init.c
@@@ -264,21 -229,12 +264,18 @@@ static void hpeldsp_init_3dnow(HpelDSPC
#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,12 -251,9 +302,12 @@@ av_cold void ff_hpeldsp_init_x86(HpelDS
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);
+
if (CONFIG_VP3_DECODER)
ff_hpeldsp_vp3_init_x86(c, cpu_flags, flags);
}
More information about the ffmpeg-cvslog
mailing list