aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/motion-test.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-04-10 11:29:51 +0000
committerDiego Biurrun <diego@biurrun.de>2009-04-10 11:29:51 +0000
commite4732ba98b2a20251c60cbc9d314f585866aca1b (patch)
tree85670a0092a7b10ddd24c673367d035e82886120 /libavcodec/motion-test.c
parent4f313925ec6dd32ed9e741fca40a0e22ca0c7879 (diff)
downloadffmpeg-e4732ba98b2a20251c60cbc9d314f585866aca1b.tar.gz
Fix sigill on non-MMX2 CPUs.
Originally committed as revision 18410 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion-test.c')
-rw-r--r--libavcodec/motion-test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c
index e24c7de6d2..86baa22842 100644
--- a/libavcodec/motion-test.c
+++ b/libavcodec/motion-test.c
@@ -29,6 +29,7 @@
#include <sys/time.h>
#include <unistd.h>
+#include "config.h"
#include "dsputil.h"
#include "libavutil/lfg.h"
@@ -128,6 +129,7 @@ int main(int argc, char **argv)
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 @@ int main(int argc, char **argv)
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);