]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/mpegvideoenc.c
x86: mpegvideoenc: fix linking with --disable-mmx
[ffmpeg] / libavcodec / x86 / mpegvideoenc.c
index 184912da9421fa4ffaf3490de05b4a157cc7d126..946240dcd79460d27a7f06c24f5d67caf18c20a7 100644 (file)
@@ -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;
         }
     }