Commit e4732ba9 authored by Diego Biurrun's avatar Diego Biurrun

Fix sigill on non-MMX2 CPUs.

Originally committed as revision 18410 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4f313925
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#include "config.h"
#include "dsputil.h" #include "dsputil.h"
#include "libavutil/lfg.h" #include "libavutil/lfg.h"
...@@ -128,6 +129,7 @@ int main(int argc, char **argv) ...@@ -128,6 +129,7 @@ int main(int argc, char **argv)
int c; int c;
DSPContext cctx, mmxctx; DSPContext cctx, mmxctx;
int flags[2] = { FF_MM_MMX, FF_MM_MMX2 }; int flags[2] = { FF_MM_MMX, FF_MM_MMX2 };
int flags_size = HAVE_MMX2 ? 2 : 1;
for(;;) { for(;;) {
c = getopt(argc, argv, "h"); c = getopt(argc, argv, "h");
...@@ -145,7 +147,7 @@ int main(int argc, char **argv) ...@@ -145,7 +147,7 @@ int main(int argc, char **argv)
ctx = avcodec_alloc_context(); ctx = avcodec_alloc_context();
ctx->dsp_mask = FF_MM_FORCE; ctx->dsp_mask = FF_MM_FORCE;
dsputil_init(&cctx, ctx); dsputil_init(&cctx, ctx);
for (c = 0; c < 1; c++) { for (c = 0; c < flags_size; c++) {
int x; int x;
ctx->dsp_mask = FF_MM_FORCE | flags[c]; ctx->dsp_mask = FF_MM_FORCE | flags[c];
dsputil_init(&mmxctx, ctx); dsputil_init(&mmxctx, ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment