[FFmpeg-devel] [PATCH] lavc: fix build when optimizations are disabled

Stefano Sabatini stefasab at gmail.com
Mon Aug 27 13:22:20 CEST 2012


---
 libavcodec/dnxhdenc.c      |    2 +-
 libavcodec/mpegvideo.c     |    2 +-
 libavcodec/mpegvideo_enc.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 24767fd..273186d 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -294,7 +294,7 @@ static int dnxhd_encode_init(AVCodecContext *avctx)
        ctx->block_width_l2 = 3;
     }
 
-    if (ARCH_X86)
+    if (ARCH_X86 && HAVE_MMX)
         ff_dnxhdenc_init_x86(ctx);
 
     ctx->m.mb_height = (avctx->height + 15) / 16;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 77108cf..2d3113e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -185,7 +185,7 @@ av_cold int ff_dct_common_init(MpegEncContext *s)
         s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
     s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
 
-#if ARCH_X86
+#if ARCH_X86 && HAVE_MMX
     ff_MPV_common_init_x86(s);
 #elif ARCH_ALPHA
     ff_MPV_common_init_axp(s);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 6ec8609..68dc0ba 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -832,7 +832,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
     if (ff_MPV_common_init(s) < 0)
         return -1;
 
-    if (ARCH_X86)
+    if (ARCH_X86 && HAVE_MMX)
         ff_MPV_encode_init_x86(s);
 
     if (!s->dct_quantize)
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list