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/videodsp_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/videodsp_init.c')
-rw-r--r-- | libavcodec/x86/videodsp_init.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/x86/videodsp_init.c b/libavcodec/x86/videodsp_init.c index 0b88845dad..f7fd267e11 100644 --- a/libavcodec/x86/videodsp_init.c +++ b/libavcodec/x86/videodsp_init.c @@ -24,6 +24,7 @@ #include "libavutil/cpu.h" #include "libavutil/mem.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavcodec/videodsp.h" #if HAVE_YASM @@ -103,17 +104,17 @@ av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc) int cpu_flags = av_get_cpu_flags(); #if ARCH_X86_32 - if (bpc <= 8 && cpu_flags & AV_CPU_FLAG_MMX) { + if (EXTERNAL_MMX(cpu_flags) && bpc <= 8) { ctx->emulated_edge_mc = emulated_edge_mc_mmx; } - if (cpu_flags & AV_CPU_FLAG_3DNOW) { + if (EXTERNAL_AMD3DNOW(cpu_flags)) { ctx->prefetch = ff_prefetch_3dnow; } #endif /* ARCH_X86_32 */ - if (cpu_flags & AV_CPU_FLAG_MMXEXT) { + if (EXTERNAL_MMXEXT(cpu_flags)) { ctx->prefetch = ff_prefetch_mmxext; } - if (bpc <= 8 && cpu_flags & AV_CPU_FLAG_SSE) { + if (EXTERNAL_SSE(cpu_flags) && bpc <= 8) { ctx->emulated_edge_mc = emulated_edge_mc_sse; } #endif /* HAVE_YASM */ |