From 4fff623cae914340d0968855630d21ca69826b9a Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Sat, 1 Sep 2001 17:57:20 +0000 Subject: Enable MMX accelerated code on x86 Workaround a gcc-2.95.2 compiler bug in put_pixels_clamped_mmx, add_pixels_clamped_mmx Fix "debug" build for libffmpeg CVS patchset: 541 CVS date: 2001/09/01 17:57:20 --- src/libffmpeg/libavcodec/dsputil_mmx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libffmpeg/libavcodec/dsputil_mmx.c') diff --git a/src/libffmpeg/libavcodec/dsputil_mmx.c b/src/libffmpeg/libavcodec/dsputil_mmx.c index 29a069566..44b0b23d2 100644 --- a/src/libffmpeg/libavcodec/dsputil_mmx.c +++ b/src/libffmpeg/libavcodec/dsputil_mmx.c @@ -105,6 +105,7 @@ static void put_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line const DCTELEM *p; UINT8 *pix; int i; + static int p_inc = 32; /* hack to avoid gcc-2.95.2 loop unrolling bug */ /* read the pixels */ p = block; @@ -132,7 +133,7 @@ static void put_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line :"m"(*p) :"memory"); pix += line_size*4; - p += 32; + p += p_inc; } } @@ -141,6 +142,7 @@ static void add_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line const DCTELEM *p; UINT8 *pix; int i; + static int p_inc = 16; /* hack to avoid gcc-2.95.2 loop unrolling bug */ /* read the pixels */ p = block; @@ -172,7 +174,7 @@ static void add_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line :"m"(*p) :"memory"); pix += line_size*2; - p += 16; + p += p_inc; } } @@ -965,7 +967,7 @@ static void sub_pixels_xy2_mmx( DCTELEM *block, const UINT8 *pixels, int line void dsputil_init_mmx(void) { - mm_flags = mm_support(); + mm_flags = mm_accel(); #if 0 printf("CPU flags:"); if (mm_flags & MM_MMX) -- cgit v1.2.3