mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +00:00
memcpy_pic() added (copy image plane with src/dst stride)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5505 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a2a8eec208
commit
133757919e
@ -39,4 +39,23 @@ static inline void * mem2agpcpy_pic(void * dst, void * src, int bytesPerLine, in
|
||||
return retval;
|
||||
}
|
||||
|
||||
static inline void * memcpy_pic(void * dst, void * src, int bytesPerLine, int height, int dstStride, int srcStride)
|
||||
{
|
||||
int i;
|
||||
void *retval=dst;
|
||||
|
||||
if(dstStride == srcStride) memcpy(dst, src, srcStride*height);
|
||||
else
|
||||
{
|
||||
for(i=0; i<height; i++)
|
||||
{
|
||||
memcpy(dst, src, bytesPerLine);
|
||||
src+= srcStride;
|
||||
dst+= dstStride;
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user