diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-29 18:13:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-29 18:13:00 +0200 |
commit | 8579d4b2f0cc7d46dc75e0a0e42d556d653463fc (patch) | |
tree | 8ab65fc1ed0ff0371f552430a33f5ebf57bc5dea /libavcodec/x86/mpegvideoenc.c | |
parent | 1c66807636ed8da5cf81d75cc8bb2726c6d6bc21 (diff) | |
parent | 7baa115a33ab516c85ac94f6c5cdaee73e65ddf8 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
build: export filtered -lz flag in config.mak
build: add separate setting for host linker
configure: probe_cc: use separate variable for linker output flag
x86: Always compile files with functions that are called unconditionally
x86: mpegvideoenc: fix linking with --disable-mmx
x86: mpegvideoenc: Do not abuse HAVE_ variables for template instantiation
Conflicts:
Makefile
configure
libavcodec/x86/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/mpegvideoenc.c')
-rw-r--r-- | libavcodec/x86/mpegvideoenc.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c index 2d190f979f..3d75919ba2 100644 --- a/libavcodec/x86/mpegvideoenc.c +++ b/libavcodec/x86/mpegvideoenc.c @@ -30,39 +30,44 @@ extern uint16_t ff_inv_zigzag_direct16[64]; -#if HAVE_SSSE3 -#define HAVE_SSSE3_BAK -#endif -#undef HAVE_SSSE3 -#define HAVE_SSSE3 0 - -#undef HAVE_SSE2 -#undef HAVE_MMXEXT -#define HAVE_SSE2 0 -#define HAVE_MMXEXT 0 +#define COMPILE_TEMPLATE_MMXEXT 0 +#define COMPILE_TEMPLATE_SSE2 0 +#define COMPILE_TEMPLATE_SSSE3 0 #define RENAME(a) a ## _MMX #define RENAMEl(a) a ## _mmx #include "mpegvideoenc_template.c" -#undef HAVE_MMXEXT -#define HAVE_MMXEXT 1 +#undef COMPILE_TEMPLATE_SSSE3 +#undef COMPILE_TEMPLATE_SSE2 +#undef COMPILE_TEMPLATE_MMXEXT +#define COMPILE_TEMPLATE_MMXEXT 1 +#define COMPILE_TEMPLATE_SSE2 0 +#define COMPILE_TEMPLATE_SSSE3 0 #undef RENAME #undef RENAMEl #define RENAME(a) a ## _MMX2 #define RENAMEl(a) a ## _mmx2 #include "mpegvideoenc_template.c" -#undef HAVE_SSE2 -#define HAVE_SSE2 1 +#undef COMPILE_TEMPLATE_MMXEXT +#undef COMPILE_TEMPLATE_SSE2 +#undef COMPILE_TEMPLATE_SSSE3 +#define COMPILE_TEMPLATE_MMXEXT 0 +#define COMPILE_TEMPLATE_SSE2 1 +#define COMPILE_TEMPLATE_SSSE3 0 #undef RENAME #undef RENAMEl #define RENAME(a) a ## _SSE2 #define RENAMEl(a) a ## _sse2 #include "mpegvideoenc_template.c" -#ifdef HAVE_SSSE3_BAK -#undef HAVE_SSSE3 -#define HAVE_SSSE3 1 +#if HAVE_SSSE3 +#undef COMPILE_TEMPLATE_MMXEXT +#undef COMPILE_TEMPLATE_SSE2 +#undef COMPILE_TEMPLATE_SSSE3 +#define COMPILE_TEMPLATE_MMXEXT 0 +#define COMPILE_TEMPLATE_SSE2 1 +#define COMPILE_TEMPLATE_SSSE3 1 #undef RENAME #undef RENAMEl #define RENAME(a) a ## _SSSE3 @@ -84,11 +89,11 @@ void ff_MPV_encode_init_x86(MpegEncContext *s) s->dct_quantize = dct_quantize_SSSE3; } else #endif - if (mm_flags & AV_CPU_FLAG_SSE2) { + if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE) { s->dct_quantize = dct_quantize_SSE2; - } else if (mm_flags & AV_CPU_FLAG_MMXEXT) { + } else if (mm_flags & AV_CPU_FLAG_MMXEXT && HAVE_MMXEXT) { s->dct_quantize = dct_quantize_MMX2; - } else { + } else if (mm_flags & AV_CPU_FLAG_MMX && HAVE_MMX) { s->dct_quantize = dct_quantize_MMX; } } |