summaryrefslogtreecommitdiffstats
path: root/libvo/fastmemcpy.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-07-29 14:28:41 +0200
committerwm4 <wm4@nowhere>2012-07-30 01:33:40 +0200
commit273a6623e7b97bb133486707a656f00209820b43 (patch)
tree52bbe0508d02e58a9bb731ecefc414a1d08d4d0b /libvo/fastmemcpy.h
parent94b7db20bcb82efba04bf5c56fea3f545d547b12 (diff)
downloadmpv-273a6623e7b97bb133486707a656f00209820b43.tar.bz2
mpv-273a6623e7b97bb133486707a656f00209820b43.tar.xz
libvo: remove custom assembler memcpy implementations (aka fastmemcpy)
aclib[_template].c contained inline assembler versions of memcpy using MMX/SSE/3dnow etc. instructions. It's possible that this gave quite a speed a decade ago, but it's unlikely to have any use on modern systems. Also, libc implementations already have their own optimizations for the native memcpy function. I did not verify my assumptions eith benchmarks, so I could be wrong. Also note that some platforms have extremely crappy libc implementations, and it's well possible that these might suffer from a major performance loss (hello Windows). Unfortunately, I do not care.
Diffstat (limited to 'libvo/fastmemcpy.h')
-rw-r--r--libvo/fastmemcpy.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/libvo/fastmemcpy.h b/libvo/fastmemcpy.h
index f03287564f..bc83abb5d5 100644
--- a/libvo/fastmemcpy.h
+++ b/libvo/fastmemcpy.h
@@ -24,13 +24,8 @@
#include <string.h>
#include <stddef.h>
-void * fast_memcpy(void * to, const void * from, size_t len);
-void * mem2agpcpy(void * to, const void * from, size_t len);
-
-#if ! defined(CONFIG_FASTMEMCPY) || ! (HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW /* || HAVE_SSE || HAVE_SSE2 */)
-#define mem2agpcpy(a,b,c) memcpy(a,b,c)
-#define fast_memcpy(a,b,c) memcpy(a,b,c)
-#endif
+// meaningless ancient alias
+#define fast_memcpy memcpy
static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLine, int height, int dstStride, int srcStride)
{
@@ -45,13 +40,13 @@ static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLi
srcStride = -srcStride;
}
- mem2agpcpy(dst, src, srcStride*height);
+ memcpy(dst, src, srcStride*height);
}
else
{
for(i=0; i<height; i++)
{
- mem2agpcpy(dst, src, bytesPerLine);
+ memcpy(dst, src, bytesPerLine);
src = (uint8_t*)src + srcStride;
dst = (uint8_t*)dst + dstStride;
}
@@ -82,13 +77,13 @@ static inline void * memcpy_pic2(void * dst, const void * src,
srcStride = -srcStride;
}
- fast_memcpy(dst, src, srcStride*height);
+ memcpy(dst, src, srcStride*height);
}
else
{
for(i=0; i<height; i++)
{
- fast_memcpy(dst, src, bytesPerLine);
+ memcpy(dst, src, bytesPerLine);
src = (uint8_t*)src + srcStride;
dst = (uint8_t*)dst + dstStride;
}