mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 06:42:03 +00:00
get rid of void pointer arithmetic, as spotted by ICC
Original thread: date: Jan 25, 2007 5:01 PM subject: Re: [MPlayer-dev-eng] [PATCH] get rid of *void pointer arithemtic in libvo/fastmemcpy.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22018 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3c991851c4
commit
80c237677f
@ -7,6 +7,7 @@
|
|||||||
#if defined(HAVE_MMX) || defined(HAVE_MMX2) || defined(HAVE_3DNOW) \
|
#if defined(HAVE_MMX) || defined(HAVE_MMX2) || defined(HAVE_3DNOW) \
|
||||||
/* || defined(HAVE_SSE) || defined(HAVE_SSE2) */
|
/* || defined(HAVE_SSE) || defined(HAVE_SSE2) */
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
extern void * fast_memcpy(void * to, const void * from, size_t len);
|
extern void * fast_memcpy(void * to, const void * from, size_t len);
|
||||||
extern void * mem2agpcpy(void * to, const void * from, size_t len);
|
extern void * mem2agpcpy(void * to, const void * from, size_t len);
|
||||||
@ -28,8 +29,8 @@ static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLi
|
|||||||
if(dstStride == srcStride)
|
if(dstStride == srcStride)
|
||||||
{
|
{
|
||||||
if (srcStride < 0) {
|
if (srcStride < 0) {
|
||||||
src += (height-1)*srcStride;
|
src = (uint8_t*)src + (height-1)*srcStride;
|
||||||
dst += (height-1)*dstStride;
|
dst = (uint8_t*)dst + (height-1)*dstStride;
|
||||||
srcStride = -srcStride;
|
srcStride = -srcStride;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,8 +41,8 @@ static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLi
|
|||||||
for(i=0; i<height; i++)
|
for(i=0; i<height; i++)
|
||||||
{
|
{
|
||||||
mem2agpcpy(dst, src, bytesPerLine);
|
mem2agpcpy(dst, src, bytesPerLine);
|
||||||
src+= srcStride;
|
src = (uint8_t*)src + srcStride;
|
||||||
dst+= dstStride;
|
dst = (uint8_t*)dst + dstStride;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,8 +57,8 @@ static inline void * memcpy_pic(void * dst, const void * src, int bytesPerLine,
|
|||||||
if(dstStride == srcStride)
|
if(dstStride == srcStride)
|
||||||
{
|
{
|
||||||
if (srcStride < 0) {
|
if (srcStride < 0) {
|
||||||
src += (height-1)*srcStride;
|
src = (uint8_t*)src + (height-1)*srcStride;
|
||||||
dst += (height-1)*dstStride;
|
dst = (uint8_t*)dst + (height-1)*dstStride;
|
||||||
srcStride = -srcStride;
|
srcStride = -srcStride;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,8 +69,8 @@ static inline void * memcpy_pic(void * dst, const void * src, int bytesPerLine,
|
|||||||
for(i=0; i<height; i++)
|
for(i=0; i<height; i++)
|
||||||
{
|
{
|
||||||
memcpy(dst, src, bytesPerLine);
|
memcpy(dst, src, bytesPerLine);
|
||||||
src+= srcStride;
|
src = (uint8_t*)src + srcStride;
|
||||||
dst+= dstStride;
|
dst = (uint8_t*)dst + dstStride;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user