[FFmpeg-cvslog] x86: Consistently use cpu flag detection macros in places that still miss it

Diego Biurrun git at videolan.org
Tue Jan 14 14:51:03 CET 2014


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Jan 13 18:52:32 2014 +0100| [46bacb5cc6169ff5e8e982495c4925467c1d8bb7] | committer: Diego Biurrun

x86: Consistently use cpu flag detection macros in places that still miss it

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46bacb5cc6169ff5e8e982495c4925467c1d8bb7
---

 libavcodec/x86/mpegaudiodsp.c |    2 +-
 libswscale/x86/swscale.c      |    4 ++--
 libswscale/x86/yuv2rgb.c      |    5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/libavcodec/x86/mpegaudiodsp.c b/libavcodec/x86/mpegaudiodsp.c
index 3f0943c..f45cb7e 100644
--- a/libavcodec/x86/mpegaudiodsp.c
+++ b/libavcodec/x86/mpegaudiodsp.c
@@ -243,7 +243,7 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
     }
 
 #if HAVE_SSE2_INLINE
-    if (cpu_flags & AV_CPU_FLAG_SSE2) {
+    if (INLINE_SSE2(cpu_flags)) {
         s->apply_window_float = apply_window_mp3;
     }
 #endif /* HAVE_SSE2_INLINE */
diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
index b14d97d..a2bce48 100644
--- a/libswscale/x86/swscale.c
+++ b/libswscale/x86/swscale.c
@@ -307,11 +307,11 @@ av_cold void ff_sws_init_swscale_x86(SwsContext *c)
     int cpu_flags = av_get_cpu_flags();
 
 #if HAVE_MMX_INLINE
-    if (cpu_flags & AV_CPU_FLAG_MMX)
+    if (INLINE_MMX(cpu_flags))
         sws_init_swscale_mmx(c);
 #endif
 #if HAVE_MMXEXT_INLINE
-    if (cpu_flags & AV_CPU_FLAG_MMXEXT)
+    if (INLINE_MMXEXT(cpu_flags))
         sws_init_swscale_mmxext(c);
 #endif
 
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
index 6f4f7f5..bacc87f 100644
--- a/libswscale/x86/yuv2rgb.c
+++ b/libswscale/x86/yuv2rgb.c
@@ -35,6 +35,7 @@
 #include "libswscale/swscale_internal.h"
 #include "libavutil/attributes.h"
 #include "libavutil/x86/asm.h"
+#include "libavutil/x86/cpu.h"
 #include "libavutil/cpu.h"
 
 #if HAVE_INLINE_ASM
@@ -79,7 +80,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
         return NULL;
 
 #if HAVE_MMXEXT_INLINE
-    if (cpu_flags & AV_CPU_FLAG_MMXEXT) {
+    if (INLINE_MMXEXT(cpu_flags)) {
         switch (c->dstFormat) {
         case AV_PIX_FMT_RGB24:
             return yuv420_rgb24_mmxext;
@@ -89,7 +90,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
     }
 #endif
 
-    if (cpu_flags & AV_CPU_FLAG_MMX) {
+    if (INLINE_MMX(cpu_flags)) {
         switch (c->dstFormat) {
             case AV_PIX_FMT_RGB32:
                 if (c->srcFormat == AV_PIX_FMT_YUVA420P) {



More information about the ffmpeg-cvslog mailing list