fastmemcpy.h: remove code duplication

Remove the mem2agpcpy_pic function, which is obviously duplicated from
the other function in this file.

Untested, as this is only used by the directx and directfb2 VOs.
This commit is contained in:
wm4 2012-07-29 14:36:43 +02:00
parent 273a6623e7
commit a4bab723b3
1 changed files with 2 additions and 28 deletions

View File

@ -27,37 +27,11 @@
// 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)
{
int i;
void *retval=dst;
if(dstStride == srcStride)
{
if (srcStride < 0) {
src = (uint8_t*)src + (height-1)*srcStride;
dst = (uint8_t*)dst + (height-1)*dstStride;
srcStride = -srcStride;
}
memcpy(dst, src, srcStride*height);
}
else
{
for(i=0; i<height; i++)
{
memcpy(dst, src, bytesPerLine);
src = (uint8_t*)src + srcStride;
dst = (uint8_t*)dst + dstStride;
}
}
return retval;
}
#define memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 0)
#define my_memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 1)
#define mem2agpcpy_pic memcpy_pic
/**
* \param limit2width always skip data between end of line and start of next
* instead of copying the full block when strides are the same