diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-08-29 19:01:05 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-09-08 18:18:34 +0200 |
commit | e0c6cce44729d94e2a5507a4b6d031f23e8bd7b6 (patch) | |
tree | 5118ee396e1879c3f90dfc1898e9bbd868e4b583 /libavcodec/x86/mpegvideoenc.c | |
parent | 6a0200f24de51eeb94a3a1f75ee105786a6e088d (diff) | |
download | ffmpeg-e0c6cce44729d94e2a5507a4b6d031f23e8bd7b6.tar.gz |
x86: Replace checks for CPU extensions and flags by convenience macros
This separates code relying on inline from that relying on external
assembly and fixes instances where the coalesced check was incorrect.
Diffstat (limited to 'libavcodec/x86/mpegvideoenc.c')
-rw-r--r-- | libavcodec/x86/mpegvideoenc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c index 31a6790328..59e3580153 100644 --- a/libavcodec/x86/mpegvideoenc.c +++ b/libavcodec/x86/mpegvideoenc.c @@ -21,6 +21,7 @@ #include "libavutil/cpu.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" #include "libavcodec/mpegvideo.h" @@ -86,19 +87,19 @@ void ff_MPV_encode_init_x86(MpegEncContext *s) if (dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX) { #if HAVE_MMX_INLINE - if (mm_flags & AV_CPU_FLAG_MMX && HAVE_MMX) + if (INLINE_MMX(mm_flags)) s->dct_quantize = dct_quantize_MMX; #endif #if HAVE_MMXEXT_INLINE - if (mm_flags & AV_CPU_FLAG_MMXEXT && HAVE_MMXEXT) + if (INLINE_MMXEXT(mm_flags)) s->dct_quantize = dct_quantize_MMX2; #endif #if HAVE_SSE2_INLINE - if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE2) + if (INLINE_SSE2(mm_flags)) s->dct_quantize = dct_quantize_SSE2; #endif #if HAVE_SSSE3_INLINE - if (mm_flags & AV_CPU_FLAG_SSSE3) + if (INLINE_SSSE3(mm_flags)) s->dct_quantize = dct_quantize_SSSE3; #endif } |