From 54329dd5a5f8435c5a2747201af6c11b506ca50a Mon Sep 17 00:00:00 2001 From: Nick Kurshev Date: Thu, 2 Aug 2001 08:29:38 +0000 Subject: Adding fastmemcpy stuff to speedup mplayer project Originally committed as revision 27 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/Makefile | 3 ++- libavcodec/fastmemcpy.h | 1 + libavcodec/imgconvert.c | 8 ++++++++ libavcodec/imgresample.c | 10 ++++++++++ libavcodec/mpeg12.c | 8 ++++++++ libavcodec/mpegvideo.c | 9 +++++++++ 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 libavcodec/fastmemcpy.h (limited to 'libavcodec') diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 58a0274aac..de9376bb0d 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -35,7 +35,8 @@ SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) LIB= libavcodec.a TESTS= imgresample-test dct-test -all: $(LIB) apiexample +all: $(LIB) +tests: apiexample $(TESTS) $(LIB): $(OBJS) $(ASM_OBJS) rm -f $@ diff --git a/libavcodec/fastmemcpy.h b/libavcodec/fastmemcpy.h new file mode 100644 index 0000000000..2a6f5c860d --- /dev/null +++ b/libavcodec/fastmemcpy.h @@ -0,0 +1 @@ +#include "../libvo/fastmemcpy.h" diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 01289d4d83..be2470b7bd 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -21,6 +21,14 @@ #include #include "avcodec.h" +/* Stuff below is useful only for mplayer project */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + +#ifdef USE_FASTMEMCPY +#include "fastmemcpy.h" +#endif /* XXX: totally non optimized */ static void yuv422_to_yuv420p(UINT8 *lum, UINT8 *cb, UINT8 *cr, diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c index d394abdd3f..52331a68d2 100644 --- a/libavcodec/imgresample.c +++ b/libavcodec/imgresample.c @@ -23,6 +23,16 @@ #include "dsputil.h" #include "avcodec.h" +/* Stuff below is useful only for mplayer project */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + +#ifdef USE_FASTMEMCPY +#include "fastmemcpy.h" +#endif + + #define NB_COMPONENTS 3 #define PHASE_BITS 4 diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 326f043863..d497d14c6c 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -25,6 +25,14 @@ #include "mpeg12data.h" +/* Stuff below is useful only for mplayer project */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + +#ifdef USE_FASTMEMCPY +#include "fastmemcpy.h" +#endif //#define DEBUG #ifdef DEBUG diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index ec4b26bf28..49a9981678 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -24,6 +24,15 @@ #include "dsputil.h" #include "mpegvideo.h" +/* Stuff below is useful only for mplayer project */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + +#ifdef USE_FASTMEMCPY +#include "fastmemcpy.h" +#endif + static void encode_picture(MpegEncContext *s, int picture_number); static void rate_control_init(MpegEncContext *s); static int rate_estimate_qscale(MpegEncContext *s); -- cgit v1.2.3