[vlc-commits] avcodec: add AVX, XOP, FMA4

Rémi Denis-Courmont git at videolan.org
Sat Aug 4 16:29:08 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug  4 17:28:26 2012 +0300| [aea55cc937c52799c500c63e5ff922b05781bc4d] | committer: Rémi Denis-Courmont

avcodec: add AVX, XOP, FMA4

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aea55cc937c52799c500c63e5ff922b05781bc4d
---

 modules/codec/avcodec/cpu.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/cpu.c b/modules/codec/avcodec/cpu.c
index 1b10aaa..3dfb26c 100644
--- a/modules/codec/avcodec/cpu.c
+++ b/modules/codec/avcodec/cpu.c
@@ -67,7 +67,18 @@ unsigned GetVlcDspMask( void )
     if( !vlc_CPU_SSE4_2() )
         mask |= AV_CPU_FLAG_SSE42;
 # endif
-    // TODO: AVX
+# ifdef AV_CPU_FLAG_AVX
+    if( !vlc_CPU_AVX() )
+        mask |= AV_CPU_FLAG_AVX;
+# endif
+# ifdef AV_CPU_FLAG_XOP
+    if( !vlc_CPU_XOP() )
+        mask |= AV_CPU_FLAG_XOP;
+# endif
+# ifdef AV_CPU_FLAG_FMA4
+    if( !vlc_CPU_FMA4() )
+        mask |= AV_CPU_FLAG_FMA4;
+# endif
 #endif
 
 #if defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__)



More information about the vlc-commits mailing list