diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-08-20 14:46:58 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-08-29 13:07:37 +0200 |
commit | 6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0 (patch) | |
tree | 24a69c3793e5791b75d5e7b421583ddfda1f7b44 /libavcodec/x86/dsputil_init.c | |
parent | 79aec43ce813a3e270743ca64fa3f31fa43df80b (diff) | |
download | ffmpeg-6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0.tar.gz |
x86: avcodec: Use convenience macros to check for CPU flags
Diffstat (limited to 'libavcodec/x86/dsputil_init.c')
-rw-r--r-- | libavcodec/x86/dsputil_init.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/x86/dsputil_init.c b/libavcodec/x86/dsputil_init.c index 898c3639cf..a38cf24d3c 100644 --- a/libavcodec/x86/dsputil_init.c +++ b/libavcodec/x86/dsputil_init.c @@ -20,6 +20,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavcodec/dsputil.h" #include "libavcodec/simple_idct.h" #include "dsputil_x86.h" @@ -695,22 +696,22 @@ av_cold void ff_dsputil_init_x86(DSPContext *c, AVCodecContext *avctx) c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_cmov; #endif - if (cpu_flags & AV_CPU_FLAG_MMX) + if (X86_MMX(cpu_flags)) dsputil_init_mmx(c, avctx, cpu_flags); - if (cpu_flags & AV_CPU_FLAG_MMXEXT) + if (X86_MMXEXT(cpu_flags)) dsputil_init_mmxext(c, avctx, cpu_flags); - if (cpu_flags & AV_CPU_FLAG_SSE) + if (X86_SSE(cpu_flags)) dsputil_init_sse(c, avctx, cpu_flags); - if (cpu_flags & AV_CPU_FLAG_SSE2) + if (X86_SSE2(cpu_flags)) dsputil_init_sse2(c, avctx, cpu_flags); - if (cpu_flags & AV_CPU_FLAG_SSSE3) + if (EXTERNAL_SSSE3(cpu_flags)) dsputil_init_ssse3(c, avctx, cpu_flags); - if (cpu_flags & AV_CPU_FLAG_SSE4) + if (EXTERNAL_SSE4(cpu_flags)) dsputil_init_sse4(c, avctx, cpu_flags); if (CONFIG_ENCODERS) |