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/Makefile.am | 5 ++++- src/libffmpeg/config.h | 6 ------ src/libffmpeg/libavcodec/dsputil.c | 9 +++++++-- src/libffmpeg/libavcodec/dsputil.h | 15 ++------------- src/libffmpeg/libavcodec/dsputil_mmx.c | 8 +++++--- src/libffmpeg/libavcodec/mpegvideo.c | 2 +- src/libffmpeg/libavcodec/mpegvideo.h | 2 +- 7 files changed, 20 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index 992b45aec..b180b3ba4 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -21,7 +21,10 @@ xineplug_decode_ff_la_LDFLAGS = \ noinst_HEADERS = config.h debug: - @$(MAKE) CFLAGS="@DEBUG_CFLAGS@ -DCONFIG_DECODERS -DHAVE_AV_CONFIG_H" + @list='$(SUBDIRS)'; for subdir in $$list; do \ + (cd $$subdir && $(MAKE) $@) || exit;\ + done; + @$(MAKE) CFLAGS="@DEBUG_CFLAGS@" install-debug: debug @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am diff --git a/src/libffmpeg/config.h b/src/libffmpeg/config.h index 52fb2dff8..a28db4926 100644 --- a/src/libffmpeg/config.h +++ b/src/libffmpeg/config.h @@ -3,9 +3,3 @@ */ #include "../../config.h" - -#ifdef ARCH_X86 -/* -#define HAVE_MMX -*/ -#endif diff --git a/src/libffmpeg/libavcodec/dsputil.c b/src/libffmpeg/libavcodec/dsputil.c index da8b24941..c29574303 100644 --- a/src/libffmpeg/libavcodec/dsputil.c +++ b/src/libffmpeg/libavcodec/dsputil.c @@ -20,6 +20,7 @@ #include #include "avcodec.h" #include "dsputil.h" +#include "cpu_accel.h" void (*ff_idct)(DCTELEM *block); void (*get_pixels)(DCTELEM *block, const UINT8 *pixels, int line_size); @@ -413,9 +414,13 @@ void block_permute(INT16 *block) void dsputil_init(void) { int i, j; +#ifdef ARCH_X86 + uint32_t mm = mm_accel(); +#endif int use_permuted_mmx_idct; int accel_dsputil; + for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i; for(i=0;idct_unquantize = dct_unquantize_mpeg1_c; -#ifdef HAVE_MMX +#ifdef ARCH_X86 MPV_common_init_mmx(s); #endif s->mb_width = (s->width + 15) / 16; diff --git a/src/libffmpeg/libavcodec/mpegvideo.h b/src/libffmpeg/libavcodec/mpegvideo.h index e4a5617e8..31243471e 100644 --- a/src/libffmpeg/libavcodec/mpegvideo.h +++ b/src/libffmpeg/libavcodec/mpegvideo.h @@ -188,7 +188,7 @@ void MPV_common_end(MpegEncContext *s); void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]); void MPV_frame_start(MpegEncContext *s); void MPV_frame_end(MpegEncContext *s); -#ifdef HAVE_MMX +#ifdef ARCH_X86 void MPV_common_init_mmx(MpegEncContext *s); #endif -- cgit v1.2.3