From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavcodec/x86/motion_est.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ffmpeg/libavcodec/x86/motion_est.c') diff --git a/ffmpeg/libavcodec/x86/motion_est.c b/ffmpeg/libavcodec/x86/motion_est.c index 3ffb002..5f5d93e 100644 --- a/ffmpeg/libavcodec/x86/motion_est.c +++ b/ffmpeg/libavcodec/x86/motion_est.c @@ -26,7 +26,8 @@ #include "libavutil/avassert.h" #include "libavutil/mem.h" #include "libavutil/x86/asm.h" -#include "dsputil_mmx.h" +#include "libavutil/x86/cpu.h" +#include "dsputil_x86.h" #if HAVE_INLINE_ASM @@ -435,9 +436,9 @@ PIX_SAD(mmxext) av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) { #if HAVE_INLINE_ASM - int mm_flags = av_get_cpu_flags(); + int cpu_flags = av_get_cpu_flags(); - if (mm_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 (mm_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 ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != AV_CODEC_ID_SNOW) { + if (INLINE_SSE2(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != AV_CODEC_ID_SNOW) { c->sad[0]= sad16_sse2; } #endif /* HAVE_INLINE_ASM */ -- cgit v1.2.3