Merge commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009'
authorJames Almer <jamrial@gmail.com>
Tue, 31 Jan 2017 17:53:27 +0000 (14:53 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 31 Jan 2017 17:53:27 +0000 (14:53 -0300)
* commit 'c3e83ad3b7d75f3597f47ada2616ba4479665009':
  x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate

Merged-by: James Almer <jamrial@gmail.com>
1  2 
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);
  }