summaryrefslogtreecommitdiff
path: root/libavcodec/x86/mpegvideoenc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-28 17:45:24 +0200
committerDiego Biurrun <diego@biurrun.de>2012-08-29 00:26:56 +0200
commit2f2aa2e5426d89762b3c156275d903419e9cf570 (patch)
treed7b2e5b7b68f0ab9804e8f9c6e2c509a2bfa0d25 /libavcodec/x86/mpegvideoenc.c
parentd39791bf398bedd842ed75260e9de6fcc64c6fe0 (diff)
x86: mpegvideoenc: fix linking with --disable-mmx
The optimized dct_quantize template functions reference optimized fdct symbols, so these functions must only be enabled if the relevant optimizations have been enabled by configure.
Diffstat (limited to 'libavcodec/x86/mpegvideoenc.c')
-rw-r--r--libavcodec/x86/mpegvideoenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c
index 184912da94..946240dcd7 100644
--- a/libavcodec/x86/mpegvideoenc.c
+++ b/libavcodec/x86/mpegvideoenc.c
@@ -89,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;
}
}