From 54329dd5a5f8435c5a2747201af6c11b506ca50a Mon Sep 17 00:00:00 2001
From: Nick Kurshev <nickols_k@mail.ru>
Date: Thu, 2 Aug 2001 08:29:38 +0000
Subject: [PATCH] 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

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 58a0274aace..de9376bb0d9 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 00000000000..2a6f5c860d6
--- /dev/null
+++ b/libavcodec/fastmemcpy.h
@@ -0,0 +1 @@
+#include "../libvo/fastmemcpy.h"
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 01289d4d83f..be2470b7bd9 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -21,6 +21,14 @@
 #include <string.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
 /* 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 d394abdd3f0..52331a68d2e 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 326f0438631..d497d14c6c1 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 ec4b26bf282..49a99816782 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);
-- 
GitLab