summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-05 14:27:54 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-05 14:27:54 +0000
commit6a09e8e2ed913cb44d74cac9c9e7a4cf7f4a18c1 (patch)
treeef08af22a70727d8ee9a902f622cf1d5042f5344 /libvo
parentac87b4a173d2aee564e7cdca3037f101d946fbad (diff)
downloadmpv-6a09e8e2ed913cb44d74cac9c9e7a4cf7f4a18c1.tar.bz2
mpv-6a09e8e2ed913cb44d74cac9c9e7a4cf7f4a18c1.tar.xz
Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/fastmemcpy.h7
-rw-r--r--libvo/vesa_lvo.c10
-rw-r--r--libvo/vo_3dfx.c8
-rw-r--r--libvo/vo_bl.c6
-rw-r--r--libvo/vo_directfb2.c20
-rw-r--r--libvo/vo_directx.c4
-rw-r--r--libvo/vo_dxr2.c4
-rw-r--r--libvo/vo_dxr3.c4
-rw-r--r--libvo/vo_fbdev.c2
-rw-r--r--libvo/vo_fbdev2.c4
-rw-r--r--libvo/vo_macosx.m2
-rw-r--r--libvo/vo_quartz.c2
-rw-r--r--libvo/vo_sdl.c12
-rw-r--r--libvo/vo_svga.c2
-rw-r--r--libvo/vo_syncfb.c10
-rw-r--r--libvo/vo_vesa.c8
-rw-r--r--libvo/vo_yuv4mpeg.c22
-rw-r--r--libvo/vo_zr.c8
-rw-r--r--libvo/vo_zr2.c6
19 files changed, 71 insertions, 70 deletions
diff --git a/libvo/fastmemcpy.h b/libvo/fastmemcpy.h
index d0316f44db..295efd8077 100644
--- a/libvo/fastmemcpy.h
+++ b/libvo/fastmemcpy.h
@@ -29,14 +29,15 @@
extern void * fast_memcpy(void * to, const void * from, size_t len);
extern void * mem2agpcpy(void * to, const void * from, size_t len);
-#define memcpy(a,b,c) fast_memcpy(a,b,c)
#else /* HAVE_MMX/MMX2/3DNOW/SSE/SSE2 */
#define mem2agpcpy(a,b,c) memcpy(a,b,c)
+#define fast_memcpy(a,b,c) memcpy(a,b,c)
#endif
#else /* USE_FASTMEMCPY */
#define mem2agpcpy(a,b,c) memcpy(a,b,c)
+#define fast_memcpy(a,b,c) memcpy(a,b,c)
#endif
static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLine, int height, int dstStride, int srcStride)
@@ -80,13 +81,13 @@ static inline void * memcpy_pic(void * dst, const void * src, int bytesPerLine,
srcStride = -srcStride;
}
- memcpy(dst, src, srcStride*height);
+ fast_memcpy(dst, src, srcStride*height);
}
else
{
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src = (uint8_t*)src + srcStride;
dst = (uint8_t*)dst + dstStride;
}
diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c
index e875ba4454..db69f28773 100644
--- a/libvo/vesa_lvo.c
+++ b/libvo/vesa_lvo.c
@@ -167,7 +167,7 @@ uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,i
dest = lvo_mem + bespitch * y + x;
src = image[0];
for(i=0;i<h;i++){
- memcpy(dest,src,w);
+ fast_memcpy(dest,src,w);
src+=stride[0];
dest += bespitch;
}
@@ -177,7 +177,7 @@ uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,i
dest = lvo_mem + bespitch*mga_vid_config.src_height + bespitch2 * y + x;
src = image[1];
for(i=0;i<h;i++){
- memcpy(dest,src,w);
+ fast_memcpy(dest,src,w);
src+=stride[1];
dest += bespitch2;
}
@@ -187,7 +187,7 @@ uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,i
+ bespitch2 * y + x;
src = image[2];
for(i=0;i<h;i++){
- memcpy(dest,src,w);
+ fast_memcpy(dest,src,w);
src+=stride[2];
dest += bespitch2;
}
@@ -207,7 +207,7 @@ uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y
bytpp = (image_bpp+7)/8;
dst = lvo_mem + (image_width * y + x)*bytpp;
/* vlvo_draw_slice_422(image,stride,w,h,x,y); just for speed */
- memcpy(dst,image[0],mga_vid_config.frame_size);
+ fast_memcpy(dst,image[0],mga_vid_config.frame_size);
}
return 0;
}
@@ -215,7 +215,7 @@ uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y
uint32_t vlvo_draw_frame(uint8_t *image[])
{
/* Note it's very strange but sometime for YUY2 draw_frame is called */
- memcpy(lvo_mem,image[0],mga_vid_config.frame_size);
+ fast_memcpy(lvo_mem,image[0],mga_vid_config.frame_size);
if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) {
mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_flip_page() was called\n");}
return 0;
diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c
index 28f60cd787..e5bb6f0db6 100644
--- a/libvo/vo_3dfx.c
+++ b/libvo/vo_3dfx.c
@@ -238,10 +238,10 @@ dump_yuv_planar(uint32_t *y, uint32_t *u, uint32_t *v, uint32_t to, uint32_t wid
for (j=0;j<jmax;j++)
{
//XXX this should be hand-rolled 32 bit memcpy for safeness.
- memcpy(fb_YUV->U + (uint32_t) VOODOO_YUV_STRIDE* j ,((uint8_t*) u) + uv_imax* j , uv_imax);
- memcpy(fb_YUV->V + (uint32_t) VOODOO_YUV_STRIDE* j ,((uint8_t*) v) + uv_imax* j , uv_imax);
- memcpy(fb_YUV->Y + (uint32_t) VOODOO_YUV_STRIDE* (j<<1) ,((uint8_t*) y) + y_imax * (j<<1) , y_imax);
- memcpy(fb_YUV->Y + (uint32_t) VOODOO_YUV_STRIDE*((j<<1)+1),((uint8_t*) y) + y_imax *((j<<1)+1), y_imax);
+ fast_memcpy(fb_YUV->U + (uint32_t) VOODOO_YUV_STRIDE* j ,((uint8_t*) u) + uv_imax* j , uv_imax);
+ fast_memcpy(fb_YUV->V + (uint32_t) VOODOO_YUV_STRIDE* j ,((uint8_t*) v) + uv_imax* j , uv_imax);
+ fast_memcpy(fb_YUV->Y + (uint32_t) VOODOO_YUV_STRIDE* (j<<1) ,((uint8_t*) y) + y_imax * (j<<1) , y_imax);
+ fast_memcpy(fb_YUV->Y + (uint32_t) VOODOO_YUV_STRIDE*((j<<1)+1),((uint8_t*) y) + y_imax *((j<<1)+1), y_imax);
}
LOG("video_out_3dfx: done planar dump\n");
}
diff --git a/libvo/vo_bl.c b/libvo/vo_bl.c
index b227eb88f0..7036c3c4f3 100644
--- a/libvo/vo_bl.c
+++ b/libvo/vo_bl.c
@@ -174,7 +174,7 @@ static int udp_init(bl_host_t *h) {
addr.sin_family = AF_INET;
addr.sin_port = htons(h->port);
- memcpy(&addr.sin_addr.s_addr, dest->h_addr_list[0], dest->h_length);
+ fast_memcpy(&addr.sin_addr.s_addr, dest->h_addr_list[0], dest->h_length);
h->fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (h->fd < 0) {
@@ -283,7 +283,7 @@ static void flip_page (void) {
if (prevpts >= 0) for (i = 0; i < no_bl_files; i++)
bl->write_frame(&bl_files[i], tmp, (vo_pts - prevpts)/90);
- memcpy(tmp, image, bl->width*bl->height*bl->channels);
+ fast_memcpy(tmp, image, bl->width*bl->height*bl->channels);
prevpts = vo_pts;
for (i = 0; i < no_bl_hosts; i++) bl->send_frame(&bl_hosts[i]);
@@ -331,7 +331,7 @@ static int draw_slice(uint8_t *srcimg[], int stride[],
dst=image; /* + zr->off_y + zr->image_width*(y/zr->vdec)+x;*/
// copy Y:
for (i = 0; i < h; i++) {
- memcpy(dst,src,w);
+ fast_memcpy(dst,src,w);
dst+=bl->width;
src+=stride[0];
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index 15e56a886a..3a27d9bfaa 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -1233,7 +1233,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
srcp = src[0];
for (i=0;i<h;i++) {
- memcpy(dst,srcp,p);
+ fast_memcpy(dst,srcp,p);
dst += pitch;
srcp += stride[0];
}
@@ -1245,7 +1245,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
p = p/2;
for (i=0;i<h/2;i++) {
- memcpy(dst,srcp,p);
+ fast_memcpy(dst,srcp,p);
dst += pitch/2;
srcp += stride[2];
}
@@ -1254,7 +1254,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
srcp = src[1];
for (i=0;i<h/2;i++) {
- memcpy(dst,srcp,p);
+ fast_memcpy(dst,srcp,p);
dst += pitch/2;
srcp += stride[1];
}
@@ -1266,7 +1266,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
p = p/2;
for (i=0;i<h/2;i++) {
- memcpy(dst,srcp,p);
+ fast_memcpy(dst,srcp,p);
dst += pitch/2;
srcp += stride[1];
}
@@ -1275,7 +1275,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
srcp = src[2];
for (i=0;i<h/2;i++) {
- memcpy(dst,srcp,p);
+ fast_memcpy(dst,srcp,p);
dst += pitch/2;
srcp += stride[2];
}
@@ -1327,7 +1327,7 @@ static uint32_t put_image(mp_image_t *mpi){
src = mpi->planes[0]+mpi->y*mpi->stride[0]+mpi->x;
for (i=0;i<mpi->h;i++) {
- memcpy(dst+i*pitch,src+i*mpi->stride[0],p);
+ fast_memcpy(dst+i*pitch,src+i*mpi->stride[0],p);
}
@@ -1338,14 +1338,14 @@ static uint32_t put_image(mp_image_t *mpi){
src = mpi->planes[2]+mpi->y*mpi->stride[2]+mpi->x/2;
for (i=0;i<mpi->h/2;i++) {
- memcpy(dst+i*pitch/2,src+i*mpi->stride[2],p);
+ fast_memcpy(dst+i*pitch/2,src+i*mpi->stride[2],p);
}
dst += pitch*height/4;
src = mpi->planes[1]+mpi->y*mpi->stride[1]+mpi->x/2;
for (i=0;i<mpi->h/2;i++) {
- memcpy(dst+i*pitch/2,src+i*mpi->stride[1],p);
+ fast_memcpy(dst+i*pitch/2,src+i*mpi->stride[1],p);
}
} else {
@@ -1355,14 +1355,14 @@ static uint32_t put_image(mp_image_t *mpi){
src = mpi->planes[1]+mpi->y*mpi->stride[1]+mpi->x/2;
for (i=0;i<mpi->h/2;i++) {
- memcpy(dst+i*pitch/2,src+i*mpi->stride[1],p);
+ fast_memcpy(dst+i*pitch/2,src+i*mpi->stride[1],p);
}
dst += pitch*height/4;
src = mpi->planes[2]+mpi->y*mpi->stride[2]+mpi->x/2;
for (i=0;i<mpi->h/2;i++) {
- memcpy(dst+i*pitch/2,src+i*mpi->stride[2],p);
+ fast_memcpy(dst+i*pitch/2,src+i*mpi->stride[2],p);
}
}
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 3521f9dfeb..cb36a2ba2b 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -1179,7 +1179,7 @@ static void flip_page(void)
static int draw_frame(uint8_t *src[])
{
- memcpy( image, *src, dstride * image_height );
+ fast_memcpy( image, *src, dstride * image_height );
return 0;
}
@@ -1262,7 +1262,7 @@ static uint32_t put_image(mp_image_t *mpi){
}
else //packed
{
- memcpy( image, mpi->planes[0], image_height * dstride);
+ fast_memcpy( image, mpi->planes[0], image_height * dstride);
}
return VO_TRUE;
}
diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c
index f43ed25f6c..87a5d3fdb3 100644
--- a/libvo/vo_dxr2.c
+++ b/libvo/vo_dxr2.c
@@ -165,13 +165,13 @@ int write_dxr2(unsigned char *data, int len)
}
while (len>0) if ((dxr2bufpos+len) <= BUF_SIZE) {
- memcpy(dxr2buf+dxr2bufpos, data, len);
+ fast_memcpy(dxr2buf+dxr2bufpos, data, len);
dxr2bufpos+=len;
len=0;
} else {
int copylen=BUF_SIZE-dxr2bufpos;
if(copylen > 0) {
- memcpy(dxr2buf+dxr2bufpos, data, copylen);
+ fast_memcpy(dxr2buf+dxr2bufpos, data, copylen);
dxr2bufpos += copylen;
data+=copylen;
len-=copylen;
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index f08a706127..8d86b61a83 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -727,7 +727,7 @@ static void draw_osd(void)
if ( !cleared )
{
spued->count=spubuf->count;
- memcpy( spued->data,spubuf->data,DATASIZE );
+ fast_memcpy( spued->data,spubuf->data,DATASIZE );
cleared=1;
}
}
@@ -1106,7 +1106,7 @@ static struct lut_entry *new_lookuptable(overlay_t *o)
},*p;
p = malloc(sizeof(m));
- memcpy(p,m,sizeof(m));
+ fast_memcpy(p,m,sizeof(m));
return p;
}
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index f59aa024b6..a8675ee95b 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1075,7 +1075,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x,
s = src[0];
while (h) {
- memcpy(d, s, w * fb_pixel_size);
+ fast_memcpy(d, s, w * fb_pixel_size);
d += fb_line_len;
s += stride[0];
h--;
diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c
index 053c193526..f303832e59 100644
--- a/libvo/vo_fbdev2.c
+++ b/libvo/vo_fbdev2.c
@@ -354,7 +354,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
int i;
for (i = 0; i < h; i++) {
- memcpy(dest, in, w * fb_pixel_size);
+ fast_memcpy(dest, in, w * fb_pixel_size);
dest += next;
in += stride[0];
}
@@ -371,7 +371,7 @@ static void flip_page(void)
int i, out_offset = 0, in_offset = 0;
for (i = 0; i < in_height; i++) {
- memcpy(center + out_offset, next_frame + in_offset,
+ fast_memcpy(center + out_offset, next_frame + in_offset,
in_width * fb_pixel_size);
out_offset += fb_line_len;
in_offset += in_width * fb_pixel_size;
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index fdbff85a14..1b72f602b6 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -202,7 +202,7 @@ static int draw_frame(uint8_t *src[])
{
case IMGFMT_BGR32:
case IMGFMT_RGB32:
- memcpy(image_data, src[0], image_width*image_height*image_bytes);
+ fast_memcpy(image_data, src[0], image_width*image_height*image_bytes);
break;
case IMGFMT_YUY2:
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index a47f58c942..32b0b80c10 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -1021,7 +1021,7 @@ static int draw_frame(uint8_t *src[])
switch (image_format)
{
case IMGFMT_RGB32:
- memcpy(image_data,src[0],image_size);
+ fast_memcpy(image_data,src[0],image_size);
return 0;
case IMGFMT_UYVY:
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 415c43de17..177003e0e7 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -1052,11 +1052,11 @@ static int draw_frame(uint8_t *src[])
mysrc+=priv->framePlaneYUY;
for(i = 0; i < priv->height; i++) {
mysrc-=priv->stridePlaneYUY;
- memcpy (dst, mysrc, priv->stridePlaneYUY);
+ fast_memcpy (dst, mysrc, priv->stridePlaneYUY);
dst+=priv->overlay->pitches[0];
}
}
- else memcpy (dst, src[0], priv->framePlaneYUY);
+ else fast_memcpy (dst, src[0], priv->framePlaneYUY);
SDL_OVR_UNLOCK
break;
@@ -1075,11 +1075,11 @@ static int draw_frame(uint8_t *src[])
mysrc+=priv->framePlaneRGB;
for(i = 0; i < priv->height; i++) {
mysrc-=priv->stridePlaneRGB;
- memcpy (dst, mysrc, priv->stridePlaneRGB);
+ fast_memcpy (dst, mysrc, priv->stridePlaneRGB);
dst += priv->surface->pitch;
}
}
- else memcpy (dst, src[0], priv->framePlaneRGB);
+ else fast_memcpy (dst, src[0], priv->framePlaneRGB);
SDL_SRF_UNLOCK(priv->surface)
} else {
SDL_SRF_LOCK(priv->rgbsurface, -1)
@@ -1088,11 +1088,11 @@ static int draw_frame(uint8_t *src[])
mysrc+=priv->framePlaneRGB;
for(i = 0; i < priv->height; i++) {
mysrc-=priv->stridePlaneRGB;
- memcpy (dst, mysrc, priv->stridePlaneRGB);
+ fast_memcpy (dst, mysrc, priv->stridePlaneRGB);
dst += priv->rgbsurface->pitch;
}
}
- else memcpy (dst, src[0], priv->framePlaneRGB);
+ else fast_memcpy (dst, src[0], priv->framePlaneRGB);
SDL_SRF_UNLOCK(priv->rgbsurface)
}
break;
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index acd2a104f6..182880a2a9 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -206,7 +206,7 @@ int i;
rgbplane=PageStore[0].vbase + (y*mode_stride) + (x*modeinfo->bytesperpixel);
for(i=0;i<h;i++){
//i'm afraid that memcpy is better optimized than memset;)
- memcpy(rgbplane,zerobuf,w*modeinfo->bytesperpixel);
+ fast_memcpy(rgbplane,zerobuf,w*modeinfo->bytesperpixel);
// memset(rgbplane,0,w*modeinfo->bytesperpixel);
rgbplane+=mode_stride;
}
diff --git a/libvo/vo_syncfb.c b/libvo/vo_syncfb.c
index a6b965e264..472f89c617 100644
--- a/libvo/vo_syncfb.c
+++ b/libvo/vo_syncfb.c
@@ -127,7 +127,7 @@ write_frame_YUV420P2(uint_8 *y,uint_8 *cr, uint_8 *cb)
for(h=0; h < _config.src_height; h++)
{
- memcpy(dest, y, _config.src_width);
+ fast_memcpy(dest, y, _config.src_width);
y += _config.src_width;
dest += bespitch;
}
@@ -161,7 +161,7 @@ write_slice_YUV420P2(uint_8 *y,uint_8 *cr, uint_8 *cb,uint_32 slice_num)
for(h=0; h < 16; h++)
{
- memcpy(dest, y, _config.src_width);
+ fast_memcpy(dest, y, _config.src_width);
y += _config.src_width;
dest += bespitch;
}
@@ -190,7 +190,7 @@ write_slice_YUV420P3(uint_8 *y,uint_8 *cr, uint_8 *cb,int stride[],uint_32 ypos,
dest = frame_mem + bufinfo.offset + (bespitch * ypos);
for(h=0; h < ysize; h++)
{
- memcpy(dest, y, xsize);
+ fast_memcpy(dest, y, xsize);
y += stride[0];
dest += bespitch;
}
@@ -201,7 +201,7 @@ write_slice_YUV420P3(uint_8 *y,uint_8 *cr, uint_8 *cb,int stride[],uint_32 ypos,
dest = frame_mem + bufinfo.offset_p2 + (bespitch * ypos)/4;
for(h=0; h < ysize; h++)
{
- memcpy(dest, cr, xsize);
+ fast_memcpy(dest, cr, xsize);
cr += stride[1];
dest += bespitch/2;
}
@@ -209,7 +209,7 @@ write_slice_YUV420P3(uint_8 *y,uint_8 *cr, uint_8 *cb,int stride[],uint_32 ypos,
dest = frame_mem + bufinfo.offset_p3 + (bespitch * ypos)/4;
for(h=0; h < ysize; h++)
{
- memcpy(dest, cb, xsize);
+ fast_memcpy(dest, cb, xsize);
cb += stride[2];
dest += bespitch/2;
}
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 50df7f26be..a7c51197a0 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -217,7 +217,7 @@ static void __vbeSetPixel(int x, int y, int r, int g, int b)
color = (r << shift_r) | (g << shift_g) | (b << shift_b);
offset = y * bpl + (x * pixel_size);
if(!VALID_WIN_FRAME(offset)) __vbeSwitchBank(offset);
- memcpy(VIDEO_PTR(offset), &color, pixel_size);
+ fast_memcpy(VIDEO_PTR(offset), &color, pixel_size);
}
/*
@@ -226,7 +226,7 @@ static void __vbeSetPixel(int x, int y, int r, int g, int b)
*/
static void __vbeCopyBlockFast(unsigned long offset,uint8_t *image,unsigned long size)
{
- memcpy(&win.ptr[offset],image,size);
+ fast_memcpy(&win.ptr[offset],image,size);
}
static void __vbeCopyBlock(unsigned long offset,uint8_t *image,unsigned long size)
@@ -236,7 +236,7 @@ static void __vbeCopyBlock(unsigned long offset,uint8_t *image,unsigned long siz
{
if(!VALID_WIN_FRAME(offset)) __vbeSwitchBank(offset);
delta = min(size,win.high - offset);
- memcpy(VIDEO_PTR(offset),&image[src_idx],delta);
+ fast_memcpy(VIDEO_PTR(offset),&image[src_idx],delta);
src_idx += delta;
offset += delta;
size -= delta;
@@ -649,7 +649,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
else fs_mode = 1;
}
if((err=vbeInit()) != VBE_OK) { PRINT_VBE_ERR("vbeInit",err); return -1; }
- memcpy(vib.VESASignature,"VBE2",4);
+ fast_memcpy(vib.VESASignature,"VBE2",4);
if(!vib_set && (err=vbeGetControllerInfo(&vib)) != VBE_OK)
{
PRINT_VBE_ERR("vbeGetControllerInfo",err);
diff --git a/libvo/vo_yuv4mpeg.c b/libvo/vo_yuv4mpeg.c
index 1b5b5696e9..c06cf28e8f 100644
--- a/libvo/vo_yuv4mpeg.c
+++ b/libvo/vo_yuv4mpeg.c
@@ -175,9 +175,9 @@ static void swap_fields(uint8_t *ptr, const int h, const int stride)
for (i=0; i<h; i +=2)
{
- memcpy(rgb_line_buffer , ptr + stride * i , stride);
- memcpy(ptr + stride * i , ptr + stride * (i+1), stride);
- memcpy(ptr + stride * (i+1), rgb_line_buffer , stride);
+ fast_memcpy(rgb_line_buffer , ptr + stride * i , stride);
+ fast_memcpy(ptr + stride * i , ptr + stride * (i+1), stride);
+ fast_memcpy(ptr + stride * (i+1), rgb_line_buffer , stride);
}
}
@@ -227,16 +227,16 @@ static void deinterleave_fields(uint8_t *ptr, const int stride,
while(k_start < modv)
{
i = j = k_start;
- memcpy(rgb_line_buffer, ptr + stride * i, stride);
+ fast_memcpy(rgb_line_buffer, ptr + stride * i, stride);
while (!line_state[j])
{
line_state[j] = 1;
i = j;
j = j * 2 % modv;
- memcpy(ptr + stride * i, ptr + stride * j, stride);
+ fast_memcpy(ptr + stride * i, ptr + stride * j, stride);
}
- memcpy(ptr + stride * i, rgb_line_buffer, stride);
+ fast_memcpy(ptr + stride * i, rgb_line_buffer, stride);
while(k_start < modv && line_state[k_start])
k_start++;
@@ -377,7 +377,7 @@ static int draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x,int y)
dst = image_y + image_width * y + x;
for (i = 0; i < h; i++)
{
- memcpy(dst, src, w);
+ fast_memcpy(dst, src, w);
src += stride[0];
dst += image_width;
}
@@ -390,8 +390,8 @@ static int draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x,int y)
uint8_t *dstv = image_v + imgstride * (y >> 1) + (x >> 1);
for (i = 0; i < h / 2; i++)
{
- memcpy(dstu, src1 , w >> 1);
- memcpy(dstv, src2, w >> 1);
+ fast_memcpy(dstu, src1 , w >> 1);
+ fast_memcpy(dstv, src2, w >> 1);
src1 += stride[1];
src2 += stride[2];
dstu += imgstride;
@@ -405,7 +405,7 @@ static int draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x,int y)
dst = rgb_buffer + (image_width * y + x) * 3;
for (i = 0; i < h; i++)
{
- memcpy(dst, src, w * 3);
+ fast_memcpy(dst, src, w * 3);
src += stride[0];
dst += image_width * 3;
}
@@ -424,7 +424,7 @@ static int draw_frame(uint8_t * src[])
case IMGFMT_BGR24:
case IMGFMT_RGB24:
- memcpy(rgb_buffer, src[0], image_width * image_height * 3);
+ fast_memcpy(rgb_buffer, src[0], image_width * image_height * 3);
break;
}
return 0;
diff --git a/libvo/vo_zr.c b/libvo/vo_zr.c
index f64bf419d2..f919ee9227 100644
--- a/libvo/vo_zr.c
+++ b/libvo/vo_zr.c
@@ -546,7 +546,7 @@ static int draw_frame(uint8_t * src[]) {
source = src[0] + 2*g->yoff*zr->vdec*zr->stride + 2*g->xoff;
dest = zr->image + 2*zr->off_y;
for (i = 0; i < g->height/zr->vdec; i++) {
- memcpy(dest, source, zr->image_width*2);
+ fast_memcpy(dest, source, zr->image_width*2);
dest += 2*zr->image_width;
source += zr->vdec*zr->stride;
}
@@ -619,7 +619,7 @@ static int draw_slice(uint8_t *srcimg[], int stride[],
// copy Y:
for (i = 0; i < h; i++) {
if ((i + x)%zr->vdec == 0) {
- memcpy(dst,src,w);
+ fast_memcpy(dst,src,w);
dst+=zr->image_width;
}
src+=stride[0];
@@ -633,8 +633,8 @@ static int draw_slice(uint8_t *srcimg[], int stride[],
zr->image_width/2+(x/2);
for (i = 0; i< h/2; i++) {
if ((i+x/2)%zr->vdec == 0) {
- memcpy(dst1,src1,w/2);
- memcpy(dst2,src2,w/2);
+ fast_memcpy(dst1,src1,w/2);
+ fast_memcpy(dst2,src2,w/2);
dst1+=zr->image_width/2;
dst2+=zr->image_width/2;
}
diff --git a/libvo/vo_zr2.c b/libvo/vo_zr2.c
index 760294d87f..613496d48c 100644
--- a/libvo/vo_zr2.c
+++ b/libvo/vo_zr2.c
@@ -151,7 +151,7 @@ static uint32_t draw_image(mp_image_t *mpi) {
}
/* copy the jpeg image to the buffer which we acquired */
- memcpy(p->buf + p->zrq.size*p->frame, mpi->planes[0], size);
+ fast_memcpy(p->buf + p->zrq.size*p->frame, mpi->planes[0], size);
return VO_TRUE;
}
@@ -394,7 +394,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
* We make configuration changes to a temporary params structure,
* compare it with the old params structure and only apply the new
* config if it is different from the old one. */
- memcpy(&zptmp, &p->zp, sizeof(zptmp));
+ fast_memcpy(&zptmp, &p->zp, sizeof(zptmp));
/* translate the configuration to zoran understandable format */
zptmp.decimation = 0;
@@ -423,7 +423,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
if (memcmp(&zptmp, &p->zp, sizeof(zptmp))) {
/* config differs, we must update */
- memcpy(&p->zp, &zptmp, sizeof(zptmp));
+ fast_memcpy(&p->zp, &zptmp, sizeof(zptmp));
stop_playing(p);
if (ioctl(p->vdes, MJPIOC_S_PARAMS, &p->zp) < 0) {
ERROR("error writing display params to card\n");