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/motion_est.c | |
parent | 79aec43ce813a3e270743ca64fa3f31fa43df80b (diff) |
x86: avcodec: Use convenience macros to check for CPU flags
Diffstat (limited to 'libavcodec/x86/motion_est.c')
-rw-r--r-- | libavcodec/x86/motion_est.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/x86/motion_est.c b/libavcodec/x86/motion_est.c index 361c16f02a..41b9c5c781 100644 --- a/libavcodec/x86/motion_est.c +++ b/libavcodec/x86/motion_est.c @@ -26,6 +26,7 @@ #include "libavutil/internal.h" #include "libavutil/mem.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "dsputil_x86.h" #if HAVE_INLINE_ASM @@ -437,7 +438,7 @@ av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); - if (cpu_flags & AV_CPU_FLAG_MMX) { + if (INLINE_MMX(cpu_flags)) { c->pix_abs[0][0] = sad16_mmx; c->pix_abs[0][1] = sad16_x2_mmx; c->pix_abs[0][2] = sad16_y2_mmx; @@ -450,7 +451,7 @@ av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) c->sad[0]= sad16_mmx; c->sad[1]= sad8_mmx; } - if (cpu_flags & AV_CPU_FLAG_MMXEXT) { + if (INLINE_MMXEXT(cpu_flags)) { c->pix_abs[0][0] = sad16_mmxext; c->pix_abs[1][0] = sad8_mmxext; @@ -466,7 +467,7 @@ av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) c->pix_abs[1][3] = sad8_xy2_mmxext; } } - if ((cpu_flags & AV_CPU_FLAG_SSE2) && !(cpu_flags & AV_CPU_FLAG_3DNOW)) { + if (INLINE_SSE2(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_3DNOW)) { c->sad[0]= sad16_sse2; } #endif /* HAVE_INLINE_ASM */ |