# HG changeset patch # User diego # Date 1239362991 0 # Node ID 016519c432ef0f46fcbe90d65ab2711708e9aad7 # Parent 621852d530879bbd5e328b2c113f9cf1917d7347 Fix sigill on non-MMX2 CPUs. diff -r 621852d53087 -r 016519c432ef motion-test.c --- a/motion-test.c Fri Apr 10 11:07:52 2009 +0000 +++ b/motion-test.c Fri Apr 10 11:29:51 2009 +0000 @@ -29,6 +29,7 @@ #include #include +#include "config.h" #include "dsputil.h" #include "libavutil/lfg.h" @@ -128,6 +129,7 @@ int c; DSPContext cctx, mmxctx; int flags[2] = { FF_MM_MMX, FF_MM_MMX2 }; + int flags_size = HAVE_MMX2 ? 2 : 1; for(;;) { c = getopt(argc, argv, "h"); @@ -145,7 +147,7 @@ ctx = avcodec_alloc_context(); ctx->dsp_mask = FF_MM_FORCE; dsputil_init(&cctx, ctx); - for (c = 0; c < 1; c++) { + for (c = 0; c < flags_size; c++) { int x; ctx->dsp_mask = FF_MM_FORCE | flags[c]; dsputil_init(&mmxctx, ctx);