[MPlayer-cvslog] r23475 - in trunk: gui/mplayer/mw.c gui/mplayer/pb.c libaf/af_format.c libao2/ao_dsound.c libao2/ao_jack.c libao2/ao_sdl.c libao2/ao_win32.c libmenu/vf_menu.c libmpcodecs/ad_mpc.c libmpcodecs/native/nuppelvideo.c libmpcodecs/vd_mpng.c libmpcodecs/vd_mtga.c libmpcodecs/vf_bmovl.c libmpcodecs/vf_detc.c libmpcodecs/vf_down3dright.c libmpcodecs/vf_filmdint.c libmpcodecs/vf_fspp.c libmpcodecs/vf_il.c libmpcodecs/vf_ivtc.c libmpcodecs/vf_kerndeint.c libmpcodecs/vf_noise.c libmpcodecs/vf_phase.c libmpcodecs/vf_pp7.c libmpcodecs/vf_pullup.c libmpcodecs/vf_softpulldown.c libmpcodecs/vf_spp.c libmpcodecs/vf_telecine.c libmpcodecs/vf_tfields.c libmpcodecs/vf_tinterlace.c libmpcodecs/vf_unsharp.c libmpcodecs/vf_uspp.c libmpcodecs/vf_yadif.c libmpcodecs/vf_yvu9.c libmpdemux/demux_asf.c libmpdemux/demux_gif.c libmpdemux/demuxer.c libvo/fastmemcpy.h libvo/vesa_lvo.c libvo/vo_3dfx.c libvo/vo_bl.c libvo/vo_directfb2.c libvo/vo_directx.c libvo/vo_dxr2.c libvo/vo_dxr3.c libvo/vo_fbdev.c libvo/vo_fbdev2.c libvo/vo_macosx.m libvo/vo_quartz.c libvo/vo_sdl.c libvo/vo_svga.c libvo/vo_syncfb.c libvo/vo_vesa.c libvo/vo_yuv4mpeg.c libvo/vo_zr.c libvo/vo_zr2.c mencoder.c mp3lib/sr1.c stream/tvi_v4l.c
reimar
subversion at mplayerhq.hu
Tue Jun 5 16:27:54 CEST 2007
Author: reimar
Date: Tue Jun 5 16:27:54 2007
New Revision: 23475
Log:
Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.
Modified:
trunk/gui/mplayer/mw.c
trunk/gui/mplayer/pb.c
trunk/libaf/af_format.c
trunk/libao2/ao_dsound.c
trunk/libao2/ao_jack.c
trunk/libao2/ao_sdl.c
trunk/libao2/ao_win32.c
trunk/libmenu/vf_menu.c
trunk/libmpcodecs/ad_mpc.c
trunk/libmpcodecs/native/nuppelvideo.c
trunk/libmpcodecs/vd_mpng.c
trunk/libmpcodecs/vd_mtga.c
trunk/libmpcodecs/vf_bmovl.c
trunk/libmpcodecs/vf_detc.c
trunk/libmpcodecs/vf_down3dright.c
trunk/libmpcodecs/vf_filmdint.c
trunk/libmpcodecs/vf_fspp.c
trunk/libmpcodecs/vf_il.c
trunk/libmpcodecs/vf_ivtc.c
trunk/libmpcodecs/vf_kerndeint.c
trunk/libmpcodecs/vf_noise.c
trunk/libmpcodecs/vf_phase.c
trunk/libmpcodecs/vf_pp7.c
trunk/libmpcodecs/vf_pullup.c
trunk/libmpcodecs/vf_softpulldown.c
trunk/libmpcodecs/vf_spp.c
trunk/libmpcodecs/vf_telecine.c
trunk/libmpcodecs/vf_tfields.c
trunk/libmpcodecs/vf_tinterlace.c
trunk/libmpcodecs/vf_unsharp.c
trunk/libmpcodecs/vf_uspp.c
trunk/libmpcodecs/vf_yadif.c
trunk/libmpcodecs/vf_yvu9.c
trunk/libmpdemux/demux_asf.c
trunk/libmpdemux/demux_gif.c
trunk/libmpdemux/demuxer.c
trunk/libvo/fastmemcpy.h
trunk/libvo/vesa_lvo.c
trunk/libvo/vo_3dfx.c
trunk/libvo/vo_bl.c
trunk/libvo/vo_directfb2.c
trunk/libvo/vo_directx.c
trunk/libvo/vo_dxr2.c
trunk/libvo/vo_dxr3.c
trunk/libvo/vo_fbdev.c
trunk/libvo/vo_fbdev2.c
trunk/libvo/vo_macosx.m
trunk/libvo/vo_quartz.c
trunk/libvo/vo_sdl.c
trunk/libvo/vo_svga.c
trunk/libvo/vo_syncfb.c
trunk/libvo/vo_vesa.c
trunk/libvo/vo_yuv4mpeg.c
trunk/libvo/vo_zr.c
trunk/libvo/vo_zr2.c
trunk/mencoder.c
trunk/mp3lib/sr1.c
trunk/stream/tvi_v4l.c
Modified: trunk/gui/mplayer/mw.c
==============================================================================
--- trunk/gui/mplayer/mw.c (original)
+++ trunk/gui/mplayer/mw.c Tue Jun 5 16:27:54 2007
@@ -65,7 +65,7 @@ void mplMainDraw( void )
btnModify( evSetMoviePosition,guiIntfStruct.Position );
btnModify( evSetVolume,guiIntfStruct.Volume );
- memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
+ fast_memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
Render( &appMPlayer.mainWindow,appMPlayer.Items,appMPlayer.NumberOfItems,mplDrawBuffer,appMPlayer.main.Bitmap.ImageSize );
mplMainRender=0;
}
Modified: trunk/gui/mplayer/pb.c
==============================================================================
--- trunk/gui/mplayer/pb.c (original)
+++ trunk/gui/mplayer/pb.c Tue Jun 5 16:27:54 2007
@@ -88,7 +88,7 @@ void mplPBDraw( void )
vo_mouse_autohide=0;
- memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize );
+ fast_memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize );
Render( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.NumberOfBarItems,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
}
Modified: trunk/libaf/af_format.c
==============================================================================
--- trunk/libaf/af_format.c (original)
+++ trunk/libaf/af_format.c Tue Jun 5 16:27:54 2007
@@ -287,7 +287,7 @@ static af_data_t* play(struct af_instanc
if(c->bps != l->bps)
change_bps(c->audio,l->audio,len,c->bps,l->bps);
else
- memcpy(l->audio,c->audio,len*c->bps);
+ fast_memcpy(l->audio,c->audio,len*c->bps);
break;
}
}
Modified: trunk/libao2/ao_dsound.c
==============================================================================
--- trunk/libao2/ao_dsound.c (original)
+++ trunk/libao2/ao_dsound.c Tue Jun 5 16:27:54 2007
@@ -199,7 +199,7 @@ static BOOL CALLBACK DirectSoundEnum(LPG
if(device_num==*device_index){
mp_msg(MSGT_AO, MSGL_V,"<--");
if(guid){
- memcpy(&device,guid,sizeof(GUID));
+ fast_memcpy(&device,guid,sizeof(GUID));
}
}
mp_msg(MSGT_AO, MSGL_V,"\n");
@@ -337,14 +337,14 @@ static int write_buffer(unsigned char *d
numsamp = dwBytes1 / (ao_data.channels * sampsize); // number of samples for each channel in this buffer
for( i = 0; i < numsamp; i++ ) for( j = 0; j < ao_data.channels; j++ ) {
- memcpy(lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+ fast_memcpy(lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
}
if (NULL != lpvPtr2 )
{
numsamp = dwBytes2 / (ao_data.channels * sampsize);
for( i = 0; i < numsamp; i++ ) for( j = 0; j < ao_data.channels; j++ ) {
- memcpy(lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+ fast_memcpy(lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
}
}
@@ -352,8 +352,8 @@ static int write_buffer(unsigned char *d
if(write_offset>=buffer_size)write_offset=dwBytes2;
} else {
// Write to pointers without reordering.
- memcpy(lpvPtr1,data,dwBytes1);
- if (NULL != lpvPtr2 )memcpy(lpvPtr2,data+dwBytes1,dwBytes2);
+ fast_memcpy(lpvPtr1,data,dwBytes1);
+ if (NULL != lpvPtr2 )fast_memcpy(lpvPtr2,data+dwBytes1,dwBytes2);
write_offset+=dwBytes1+dwBytes2;
if(write_offset>=buffer_size)write_offset=dwBytes2;
}
Modified: trunk/libao2/ao_jack.c
==============================================================================
--- trunk/libao2/ao_jack.c (original)
+++ trunk/libao2/ao_jack.c Tue Jun 5 16:27:54 2007
@@ -111,10 +111,10 @@ static int write_buffer(unsigned char* d
if (len > free) len = free;
if (first_len > len) first_len = len;
// till end of buffer
- memcpy (&buffer[write_pos], data, first_len);
+ fast_memcpy (&buffer[write_pos], data, first_len);
if (len > first_len) { // we have to wrap around
// remaining part from beginning of buffer
- memcpy (buffer, &data[first_len], len - first_len);
+ fast_memcpy (buffer, &data[first_len], len - first_len);
}
write_pos = (write_pos + len) % BUFFSIZE;
return len;
Modified: trunk/libao2/ao_sdl.c
==============================================================================
--- trunk/libao2/ao_sdl.c (original)
+++ trunk/libao2/ao_sdl.c Tue Jun 5 16:27:54 2007
@@ -88,10 +88,10 @@ static int write_buffer(unsigned char* d
if (len > free) len = free;
if (first_len > len) first_len = len;
// till end of buffer
- memcpy (&buffer[write_pos], data, first_len);
+ fast_memcpy (&buffer[write_pos], data, first_len);
if (len > first_len) { // we have to wrap around
// remaining part from beginning of buffer
- memcpy (buffer, &data[first_len], len - first_len);
+ fast_memcpy (buffer, &data[first_len], len - first_len);
}
write_pos = (write_pos + len) % BUFFSIZE;
return len;
@@ -106,14 +106,14 @@ static int read_buffer(unsigned char* da
#ifdef USE_SDL_INTERNAL_MIXER
SDL_MixAudio (data, &buffer[read_pos], first_len, volume);
#else
- memcpy (data, &buffer[read_pos], first_len);
+ fast_memcpy (data, &buffer[read_pos], first_len);
#endif
if (len > first_len) { // we have to wrap around
// remaining part from beginning of buffer
#ifdef USE_SDL_INTERNAL_MIXER
SDL_MixAudio (&data[first_len], buffer, len - first_len, volume);
#else
- memcpy (&data[first_len], buffer, len - first_len);
+ fast_memcpy (&data[first_len], buffer, len - first_len);
#endif
}
read_pos = (read_pos + len) % BUFFSIZE;
Modified: trunk/libao2/ao_win32.c
==============================================================================
--- trunk/libao2/ao_win32.c (original)
+++ trunk/libao2/ao_win32.c Tue Jun 5 16:27:54 2007
@@ -299,7 +299,7 @@ static int write_waveOutBuffer(unsigned
waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR));
x=BUFFER_SIZE-buf_write_pos;
if(x>len) x=len;
- memcpy(current->lpData+buf_write_pos,data+len2,x);
+ fast_memcpy(current->lpData+buf_write_pos,data+len2,x);
if(buf_write_pos==0)full_buffers++;
len2+=x; len-=x;
buffered_bytes+=x; buf_write_pos+=x;
Modified: trunk/libmenu/vf_menu.c
==============================================================================
--- trunk/libmenu/vf_menu.c (original)
+++ trunk/libmenu/vf_menu.c Tue Jun 5 16:27:54 2007
@@ -146,8 +146,8 @@ static void get_image(struct vf_instance
if(mpi->type == MP_IMGTYPE_TEMP && (!(mpi->flags&MP_IMGFLAG_PRESERVE)) ) {
dmpi = vf_get_image(vf->next,mpi->imgfmt,mpi->type, mpi->flags, mpi->w, mpi->h);
- memcpy(mpi->planes,dmpi->planes,MP_MAX_PLANES*sizeof(unsigned char*));
- memcpy(mpi->stride,dmpi->stride,MP_MAX_PLANES*sizeof(unsigned int));
+ fast_memcpy(mpi->planes,dmpi->planes,MP_MAX_PLANES*sizeof(unsigned char*));
+ fast_memcpy(mpi->stride,dmpi->stride,MP_MAX_PLANES*sizeof(unsigned int));
mpi->flags|=MP_IMGFLAG_DIRECT;
mpi->priv=(void*)dmpi;
return;
Modified: trunk/libmpcodecs/ad_mpc.c
==============================================================================
--- trunk/libmpcodecs/ad_mpc.c (original)
+++ trunk/libmpcodecs/ad_mpc.c Tue Jun 5 16:27:54 2007
@@ -54,7 +54,7 @@ static mpc_int32_t cb_read(void *data, v
if (d->pos < d->header_len) {
if (s > d->header_len - d->pos)
s = d->header_len - d->pos;
- memcpy(p, &d->header[d->pos], s);
+ fast_memcpy(p, &d->header[d->pos], s);
} else
s = 0;
memset(&p[s], 0, size - s);
Modified: trunk/libmpcodecs/native/nuppelvideo.c
==============================================================================
--- trunk/libmpcodecs/native/nuppelvideo.c (original)
+++ trunk/libmpcodecs/native/nuppelvideo.c Tue Jun 5 16:27:54 2007
@@ -67,7 +67,7 @@ void decode_nuv( unsigned char *encoded,
switch(encodedh->comptype)
{
case '0': /* raw YUV420 */
- memcpy(decoded, encoded + 12, out_len);
+ fast_memcpy(decoded, encoded + 12, out_len);
break;
case '1': /* RTJpeg */
RTjpeg_decompressYUV420 ( ( __s8 * ) encoded + 12, decoded );
@@ -102,13 +102,13 @@ void decode_nuv( unsigned char *encoded,
break;
case 'L': /* copy last frame */
#ifdef KEEP_BUFFER
- memcpy ( decoded, previous_buffer, width*height*3/2);
+ fast_memcpy ( decoded, previous_buffer, width*height*3/2);
#endif
break;
}
#ifdef KEEP_BUFFER
- memcpy(previous_buffer, decoded, width*height*3/2);
+ fast_memcpy(previous_buffer, decoded, width*height*3/2);
#endif
break;
}
Modified: trunk/libmpcodecs/vd_mpng.c
==============================================================================
--- trunk/libmpcodecs/vd_mpng.c (original)
+++ trunk/libmpcodecs/vd_mpng.c Tue Jun 5 16:27:54 2007
@@ -58,7 +58,7 @@ static void pngReadFN( png_structp pngst
{
char * p = pngstr->io_ptr;
if(size>pngLength-pngPointer && pngLength>=pngPointer) size=pngLength-pngPointer;
- memcpy( buffer,(char *)&p[pngPointer],size );
+ fast_memcpy( buffer,(char *)&p[pngPointer],size );
pngPointer+=size;
}
Modified: trunk/libmpcodecs/vd_mtga.c
==============================================================================
--- trunk/libmpcodecs/vd_mtga.c (original)
+++ trunk/libmpcodecs/vd_mtga.c Tue Jun 5 16:27:54 2007
@@ -110,20 +110,20 @@ static void decode_rle_tga(TGAInfo *info
if (packet_header & 0x80) /* runlength encoded packet */
{
- memcpy(final, data, num_bytes);
+ fast_memcpy(final, data, num_bytes);
// Note: this will be slow when DR to vram!
i=num_bytes;
while(2*i<=replen){
- memcpy(final+i,final,i);
+ fast_memcpy(final+i,final,i);
i*=2;
}
- memcpy(final+i,final,replen-i);
+ fast_memcpy(final+i,final,replen-i);
data += num_bytes;
}
else /* raw packet */
{
- memcpy(final, data, replen);
+ fast_memcpy(final, data, replen);
data += replen;
}
@@ -144,7 +144,7 @@ static void decode_uncompressed_tga(TGAI
for (row = info->start_row; (!info->origin && row) || (info->origin && row < info->height); row += info->increment)
{
final = mpi->planes[0] + mpi->stride[0] * row;
- memcpy(final, data, info->width * num_bytes);
+ fast_memcpy(final, data, info->width * num_bytes);
data += info->width * num_bytes;
}
Modified: trunk/libmpcodecs/vf_bmovl.c
==============================================================================
--- trunk/libmpcodecs/vf_bmovl.c (original)
+++ trunk/libmpcodecs/vf_bmovl.c Tue Jun 5 16:27:54 2007
@@ -388,14 +388,14 @@ put_image(struct vf_instance_s* vf, mp_i
if(vf->priv->opaque) { // Just copy buffer memory to screen
for( ypos=vf->priv->y1 ; ypos < vf->priv->y2 ; ypos++ ) {
- memcpy( dmpi->planes[0] + (ypos*dmpi->stride[0]) + vf->priv->x1,
+ fast_memcpy( dmpi->planes[0] + (ypos*dmpi->stride[0]) + vf->priv->x1,
vf->priv->bitmap.y + (ypos*vf->priv->w) + vf->priv->x1,
vf->priv->x2 - vf->priv->x1 );
if(ypos%2) {
- memcpy( dmpi->planes[1] + ((ypos/2)*dmpi->stride[1]) + (vf->priv->x1/2),
+ fast_memcpy( dmpi->planes[1] + ((ypos/2)*dmpi->stride[1]) + (vf->priv->x1/2),
vf->priv->bitmap.u + (((ypos/2)*(vf->priv->w)/2)) + (vf->priv->x1/2),
(vf->priv->x2 - vf->priv->x1)/2 );
- memcpy( dmpi->planes[2] + ((ypos/2)*dmpi->stride[2]) + (vf->priv->x1/2),
+ fast_memcpy( dmpi->planes[2] + ((ypos/2)*dmpi->stride[2]) + (vf->priv->x1/2),
vf->priv->bitmap.v + (((ypos/2)*(vf->priv->w)/2)) + (vf->priv->x1/2),
(vf->priv->x2 - vf->priv->x1)/2 );
}
Modified: trunk/libmpcodecs/vf_detc.c
==============================================================================
--- trunk/libmpcodecs/vf_detc.c (original)
+++ trunk/libmpcodecs/vf_detc.c Tue Jun 5 16:27:54 2007
@@ -60,7 +60,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
Modified: trunk/libmpcodecs/vf_down3dright.c
==============================================================================
--- trunk/libmpcodecs/vf_down3dright.c (original)
+++ trunk/libmpcodecs/vf_down3dright.c Tue Jun 5 16:27:54 2007
@@ -67,7 +67,7 @@ static void toright(unsigned char *dst[3
*t++ = *sR++;
}
if (p->scaleh == 1) {
- memcpy(to + dst, to, dst);
+ fast_memcpy(to + dst, to, dst);
to += dst;
}
to += dst;
Modified: trunk/libmpcodecs/vf_filmdint.c
==============================================================================
--- trunk/libmpcodecs/vf_filmdint.c (original)
+++ trunk/libmpcodecs/vf_filmdint.c Tue Jun 5 16:27:54 2007
@@ -97,7 +97,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
@@ -711,7 +711,7 @@ dint_copy_plane(unsigned char *d, unsign
long bos = b - a;
long cos = c - a;
if (field) {
- memcpy(d, b, w);
+ fast_memcpy(d, b, w);
h--;
d += ds;
a += ss;
@@ -720,8 +720,8 @@ dint_copy_plane(unsigned char *d, unsign
cos += ss;
while (h > 2) {
if (threshold >= 128) {
- memcpy(d, a, w);
- memcpy(d+ds, a+bos, w);
+ fast_memcpy(d, a, w);
+ fast_memcpy(d+ds, a+bos, w);
} else if (mmx2 == 1) {
ret += dint_copy_line_mmx2(d, a, bos, cos, ds, ss, w, threshold);
} else
@@ -730,9 +730,9 @@ dint_copy_plane(unsigned char *d, unsign
d += 2*ds;
a += 2*ss;
}
- memcpy(d, a, w);
+ fast_memcpy(d, a, w);
if (h == 2)
- memcpy(d+ds, a+bos, w);
+ fast_memcpy(d+ds, a+bos, w);
return ret;
}
Modified: trunk/libmpcodecs/vf_fspp.c
==============================================================================
--- trunk/libmpcodecs/vf_fspp.c (original)
+++ trunk/libmpcodecs/vf_fspp.c Tue Jun 5 16:27:54 2007
@@ -421,15 +421,15 @@ static void filter(struct vf_priv_s *p,
if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
for(y=0; y<height; y++){
int index= 8 + 8*stride + y*stride;
- memcpy(p->src + index, src + y*src_stride, width);//this line can be avoided by using DR & user fr.buffers
+ fast_memcpy(p->src + index, src + y*src_stride, width);//this line can be avoided by using DR & user fr.buffers
for(x=0; x<8; x++){
p->src[index - x - 1]= p->src[index + x ];
p->src[index + width + x ]= p->src[index + width - x - 1];
}
}
for(y=0; y<8; y++){
- memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride);
- memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride);
+ fast_memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride);
+ fast_memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride);
}
//FIXME (try edge emu)
@@ -456,8 +456,8 @@ static void filter(struct vf_priv_s *p,
column_fidct_s((int16_t*)(&p->threshold_mtx[0]), block+x*8, block3+x*8, 8); //yes, this is a HOTSPOT
}
row_idct_s(block3+0*8, p->temp + (y&15)*stride+x0+2-(y&1), stride, 2*(BLOCKSZ-1));
- memcpy(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling
- memcpy(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM));
+ fast_memcpy(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling
+ fast_memcpy(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM));
}
//
es=width+8-x0; // 8, ...
@@ -532,7 +532,7 @@ static int put_image(struct vf_instance_
if(mpi->pict_type != 3 && mpi->qscale && !vf->priv->qp){
if(!vf->priv->non_b_qp)
vf->priv->non_b_qp= malloc(mpi->qstride * ((mpi->h + 15) >> 4));
- memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4));
+ fast_memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4));
}
if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
char *qp_tab= vf->priv->non_b_qp;
Modified: trunk/libmpcodecs/vf_il.c
==============================================================================
--- trunk/libmpcodecs/vf_il.c (original)
+++ trunk/libmpcodecs/vf_il.c Tue Jun 5 16:27:54 2007
@@ -58,20 +58,20 @@ static void interleave(uint8_t *dst, uin
switch(interleave){
case -1:
for(y=0; y < m; y++){
- memcpy(dst + dstStride* y , src + srcStride*(y*2 + a), w);
- memcpy(dst + dstStride*(y + m), src + srcStride*(y*2 + b), w);
+ fast_memcpy(dst + dstStride* y , src + srcStride*(y*2 + a), w);
+ fast_memcpy(dst + dstStride*(y + m), src + srcStride*(y*2 + b), w);
}
break;
case 0:
for(y=0; y < m; y++){
- memcpy(dst + dstStride* y*2 , src + srcStride*(y*2 + a), w);
- memcpy(dst + dstStride*(y*2+1), src + srcStride*(y*2 + b), w);
+ fast_memcpy(dst + dstStride* y*2 , src + srcStride*(y*2 + a), w);
+ fast_memcpy(dst + dstStride*(y*2+1), src + srcStride*(y*2 + b), w);
}
break;
case 1:
for(y=0; y < m; y++){
- memcpy(dst + dstStride*(y*2+a), src + srcStride* y , w);
- memcpy(dst + dstStride*(y*2+b), src + srcStride*(y + m), w);
+ fast_memcpy(dst + dstStride*(y*2+a), src + srcStride* y , w);
+ fast_memcpy(dst + dstStride*(y*2+b), src + srcStride*(y + m), w);
}
break;
}
Modified: trunk/libmpcodecs/vf_ivtc.c
==============================================================================
--- trunk/libmpcodecs/vf_ivtc.c (original)
+++ trunk/libmpcodecs/vf_ivtc.c Tue Jun 5 16:27:54 2007
@@ -47,7 +47,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
Modified: trunk/libmpcodecs/vf_kerndeint.c
==============================================================================
--- trunk/libmpcodecs/vf_kerndeint.c (original)
+++ trunk/libmpcodecs/vf_kerndeint.c Tue Jun 5 16:27:54 2007
@@ -128,16 +128,16 @@ static int put_image(struct vf_instance_
dstp = dstp_saved + (1-order) * dst_pitch;
for (y=0; y<h; y+=2) {
- memcpy(dstp, srcp, w);
+ fast_memcpy(dstp, srcp, w);
srcp += 2*src_pitch;
dstp += 2*dst_pitch;
}
// Copy through the lines that will be missed below.
- memcpy(dstp_saved + order*dst_pitch, srcp_saved + (1-order)*src_pitch, w);
- memcpy(dstp_saved + (2+order)*dst_pitch, srcp_saved + (3-order)*src_pitch, w);
- memcpy(dstp_saved + (h-2+order)*dst_pitch, srcp_saved + (h-1-order)*src_pitch, w);
- memcpy(dstp_saved + (h-4+order)*dst_pitch, srcp_saved + (h-3-order)*src_pitch, w);
+ fast_memcpy(dstp_saved + order*dst_pitch, srcp_saved + (1-order)*src_pitch, w);
+ fast_memcpy(dstp_saved + (2+order)*dst_pitch, srcp_saved + (3-order)*src_pitch, w);
+ fast_memcpy(dstp_saved + (h-2+order)*dst_pitch, srcp_saved + (h-1-order)*src_pitch, w);
+ fast_memcpy(dstp_saved + (h-4+order)*dst_pitch, srcp_saved + (h-3-order)*src_pitch, w);
/* For the other field choose adaptively between using the previous field
or the interpolant from the current field. */
@@ -270,7 +270,7 @@ static int put_image(struct vf_instance_
srcp = mpi->planes[z];
dstp = pmpi->planes[z];
for (y=0; y<h; y++) {
- memcpy(dstp, srcp, w);
+ fast_memcpy(dstp, srcp, w);
srcp += src_pitch;
dstp += psrc_pitch;
}
Modified: trunk/libmpcodecs/vf_noise.c
==============================================================================
--- trunk/libmpcodecs/vf_noise.c (original)
+++ trunk/libmpcodecs/vf_noise.c Tue Jun 5 16:27:54 2007
@@ -278,12 +278,12 @@ static void noise(uint8_t *dst, uint8_t
{
if(src==dst) return;
- if(dstStride==srcStride) memcpy(dst, src, srcStride*height);
+ if(dstStride==srcStride) fast_memcpy(dst, src, srcStride*height);
else
{
for(y=0; y<height; y++)
{
- memcpy(dst, src, width);
+ fast_memcpy(dst, src, width);
dst+= dstStride;
src+= srcStride;
}
Modified: trunk/libmpcodecs/vf_phase.c
==============================================================================
--- trunk/libmpcodecs/vf_phase.c (original)
+++ trunk/libmpcodecs/vf_phase.c Tue Jun 5 16:27:54 2007
@@ -45,8 +45,8 @@ static void do_plane(unsigned char *to,
for(end=to+h*ts, buf=*bufp, top=1; to<end; from+=fs, to+=ts, buf+=w, top^=1)
{
- memcpy(to, mode==(top?BOTTOM_FIRST:TOP_FIRST)?buf:from, w);
- memcpy(buf, from, w);
+ fast_memcpy(to, mode==(top?BOTTOM_FIRST:TOP_FIRST)?buf:from, w);
+ fast_memcpy(buf, from, w);
}
}
Modified: trunk/libmpcodecs/vf_pp7.c
==============================================================================
--- trunk/libmpcodecs/vf_pp7.c (original)
+++ trunk/libmpcodecs/vf_pp7.c Tue Jun 5 16:27:54 2007
@@ -290,15 +290,15 @@ static void filter(struct vf_priv_s *p,
if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
for(y=0; y<height; y++){
int index= 8 + 8*stride + y*stride;
- memcpy(p_src + index, src + y*src_stride, width);
+ fast_memcpy(p_src + index, src + y*src_stride, width);
for(x=0; x<8; x++){
p_src[index - x - 1]= p_src[index + x ];
p_src[index + width + x ]= p_src[index + width - x - 1];
}
}
for(y=0; y<8; y++){
- memcpy(p_src + ( 7-y)*stride, p_src + ( y+8)*stride, stride);
- memcpy(p_src + (height+8+y)*stride, p_src + (height-y+7)*stride, stride);
+ fast_memcpy(p_src + ( 7-y)*stride, p_src + ( y+8)*stride, stride);
+ fast_memcpy(p_src + (height+8+y)*stride, p_src + (height-y+7)*stride, stride);
}
//FIXME (try edge emu)
Modified: trunk/libmpcodecs/vf_pullup.c
==============================================================================
--- trunk/libmpcodecs/vf_pullup.c (original)
+++ trunk/libmpcodecs/vf_pullup.c Tue Jun 5 16:27:54 2007
@@ -31,7 +31,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
@@ -47,10 +47,10 @@ static inline void *il_memcpy_pic(void *
for(i=h>>1; i; i--)
{
- memcpy(dst, src0, w);
+ fast_memcpy(dst, src0, w);
src0 += ss;
dst += ds;
- memcpy(dst, src1, w);
+ fast_memcpy(dst, src1, w);
src1 += ss;
dst += ds;
}
@@ -153,8 +153,8 @@ static int put_image(struct vf_instance_
}
}
if (mpi->qscale) {
- memcpy(b->planes[3], mpi->qscale, c->w[3]);
- memcpy(b->planes[3]+c->w[3], mpi->qscale, c->w[3]);
+ fast_memcpy(b->planes[3], mpi->qscale, c->w[3]);
+ fast_memcpy(b->planes[3]+c->w[3], mpi->qscale, c->w[3]);
}
p = mpi->fields & MP_IMGFIELD_TOP_FIRST ? 0 :
Modified: trunk/libmpcodecs/vf_softpulldown.c
==============================================================================
--- trunk/libmpcodecs/vf_softpulldown.c (original)
+++ trunk/libmpcodecs/vf_softpulldown.c Tue Jun 5 16:27:54 2007
@@ -24,7 +24,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
Modified: trunk/libmpcodecs/vf_spp.c
==============================================================================
--- trunk/libmpcodecs/vf_spp.c (original)
+++ trunk/libmpcodecs/vf_spp.c Tue Jun 5 16:27:54 2007
@@ -380,15 +380,15 @@ static void filter(struct vf_priv_s *p,
if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
for(y=0; y<height; y++){
int index= 8 + 8*stride + y*stride;
- memcpy(p->src + index, src + y*src_stride, width);
+ fast_memcpy(p->src + index, src + y*src_stride, width);
for(x=0; x<8; x++){
p->src[index - x - 1]= p->src[index + x ];
p->src[index + width + x ]= p->src[index + width - x - 1];
}
}
for(y=0; y<8; y++){
- memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride);
- memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride);
+ fast_memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride);
+ fast_memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride);
}
//FIXME (try edge emu)
@@ -478,7 +478,7 @@ static int put_image(struct vf_instance_
if(mpi->pict_type != 3 && mpi->qscale && !vf->priv->qp){
if(!vf->priv->non_b_qp)
vf->priv->non_b_qp= malloc(mpi->qstride * ((mpi->h + 15) >> 4));
- memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4));
+ fast_memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4));
}
if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
char *qp_tab= vf->priv->non_b_qp;
Modified: trunk/libmpcodecs/vf_telecine.c
==============================================================================
--- trunk/libmpcodecs/vf_telecine.c (original)
+++ trunk/libmpcodecs/vf_telecine.c Tue Jun 5 16:27:54 2007
@@ -22,7 +22,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
Modified: trunk/libmpcodecs/vf_tfields.c
==============================================================================
--- trunk/libmpcodecs/vf_tfields.c (original)
+++ trunk/libmpcodecs/vf_tfields.c Tue Jun 5 16:27:54 2007
@@ -27,7 +27,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
@@ -68,7 +68,7 @@ static void qpel_li_3DNOW(unsigned char
long crap1, crap2;
if (up) {
ssd = -ss;
- memcpy(d, s, w);
+ fast_memcpy(d, s, w);
d += ds;
s += ss;
}
@@ -92,7 +92,7 @@ static void qpel_li_3DNOW(unsigned char
d += ds;
s += ss;
}
- if (!up) memcpy(d, s, w);
+ if (!up) fast_memcpy(d, s, w);
asm volatile("emms \n\t" : : : "memory");
}
#endif
@@ -104,7 +104,7 @@ static void qpel_li_MMX2(unsigned char *
long crap1, crap2;
if (up) {
ssd = -ss;
- memcpy(d, s, w);
+ fast_memcpy(d, s, w);
d += ds;
s += ss;
}
@@ -129,7 +129,7 @@ static void qpel_li_MMX2(unsigned char *
d += ds;
s += ss;
}
- if (!up) memcpy(d, s, w);
+ if (!up) fast_memcpy(d, s, w);
asm volatile("emms \n\t" : : : "memory");
}
#endif
@@ -141,7 +141,7 @@ static void qpel_li_MMX(unsigned char *d
int crap1, crap2;
if (up) {
ssd = -ss;
- memcpy(d, s, w);
+ fast_memcpy(d, s, w);
d += ds;
s += ss;
}
@@ -179,7 +179,7 @@ static void qpel_li_MMX(unsigned char *d
d += ds;
s += ss;
}
- if (!up) memcpy(d, s, w);
+ if (!up) fast_memcpy(d, s, w);
asm volatile("emms \n\t" : : : "memory");
}
@@ -193,7 +193,7 @@ static void qpel_4tap_MMX(unsigned char
int crap1, crap2;
if (up) {
ssd = -ss;
- memcpy(d, s, w);
+ fast_memcpy(d, s, w);
d += ds; s += ss;
}
for (j=0; j<w; j++)
@@ -259,7 +259,7 @@ static void qpel_4tap_MMX(unsigned char
for (j=0; j<w; j++)
d[j] = (s[j+ssd] + 3*s[j])>>2;
d += ds; s += ss;
- if (!up) memcpy(d, s, w);
+ if (!up) fast_memcpy(d, s, w);
asm volatile("emms \n\t" : : : "memory");
}
#endif
@@ -276,7 +276,7 @@ static void qpel_li_C(unsigned char *d,
int i, j, ssd=ss;
if (up) {
ssd = -ss;
- memcpy(d, s, w);
+ fast_memcpy(d, s, w);
d += ds;
s += ss;
}
@@ -286,7 +286,7 @@ static void qpel_li_C(unsigned char *d,
d += ds;
s += ss;
}
- if (!up) memcpy(d, s, w);
+ if (!up) fast_memcpy(d, s, w);
}
static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
@@ -294,7 +294,7 @@ static void qpel_4tap_C(unsigned char *d
int i, j, ssd=ss;
if (up) {
ssd = -ss;
- memcpy(d, s, w);
+ fast_memcpy(d, s, w);
d += ds; s += ss;
}
for (j=0; j<w; j++)
@@ -308,7 +308,7 @@ static void qpel_4tap_C(unsigned char *d
for (j=0; j<w; j++)
d[j] = (s[j+ssd] + 3*s[j] + 2)>>2;
d += ds; s += ss;
- if (!up) memcpy(d, s, w);
+ if (!up) fast_memcpy(d, s, w);
}
static void (*qpel_li)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up);
Modified: trunk/libmpcodecs/vf_tinterlace.c
==============================================================================
--- trunk/libmpcodecs/vf_tinterlace.c (original)
+++ trunk/libmpcodecs/vf_tinterlace.c Tue Jun 5 16:27:54 2007
@@ -43,7 +43,7 @@ static inline void *my_memcpy_pic(void *
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
Modified: trunk/libmpcodecs/vf_unsharp.c
==============================================================================
--- trunk/libmpcodecs/vf_unsharp.c (original)
+++ trunk/libmpcodecs/vf_unsharp.c Tue Jun 5 16:27:54 2007
@@ -85,10 +85,10 @@ static void unsharp( uint8_t *dst, uint8
if( src == dst )
return;
if( dstStride == srcStride )
- memcpy( dst, src, srcStride*height );
+ fast_memcpy( dst, src, srcStride*height );
else
for( y=0; y<height; y++, dst+=dstStride, src+=srcStride )
- memcpy( dst, src, width );
+ fast_memcpy( dst, src, width );
return;
}
Modified: trunk/libmpcodecs/vf_uspp.c
==============================================================================
--- trunk/libmpcodecs/vf_uspp.c (original)
+++ trunk/libmpcodecs/vf_uspp.c Tue Jun 5 16:27:54 2007
@@ -154,15 +154,15 @@ static void filter(struct vf_priv_s *p,
continue; // HACK avoid crash for Y8 colourspace
for(y=0; y<h; y++){
int index= block + block*stride + y*stride;
- memcpy(p->src[i] + index, src[i] + y*src_stride[i], w);
+ fast_memcpy(p->src[i] + index, src[i] + y*src_stride[i], w);
for(x=0; x<block; x++){
p->src[i][index - x - 1]= p->src[i][index + x ];
p->src[i][index + w + x ]= p->src[i][index + w - x - 1];
}
}
for(y=0; y<block; y++){
- memcpy(p->src[i] + ( block-1-y)*stride, p->src[i] + ( y+block )*stride, stride);
- memcpy(p->src[i] + (h+block +y)*stride, p->src[i] + (h-y+block-1)*stride, stride);
+ fast_memcpy(p->src[i] + ( block-1-y)*stride, p->src[i] + ( y+block )*stride, stride);
+ fast_memcpy(p->src[i] + (h+block +y)*stride, p->src[i] + (h-y+block-1)*stride, stride);
}
p->frame->linesize[i]= stride;
Modified: trunk/libmpcodecs/vf_yadif.c
==============================================================================
--- trunk/libmpcodecs/vf_yadif.c (original)
+++ trunk/libmpcodecs/vf_yadif.c Tue Jun 5 16:27:54 2007
@@ -62,7 +62,7 @@ static void (*filter_line)(struct vf_pri
static void store_ref(struct vf_priv_s *p, uint8_t *src[3], int src_stride[3], int width, int height){
int i;
- memcpy (p->ref[3], p->ref[0], sizeof(uint8_t *)*3);
+ fast_memcpy (p->ref[3], p->ref[0], sizeof(uint8_t *)*3);
memmove(p->ref[0], p->ref[1], sizeof(uint8_t *)*3*3);
for(i=0; i<3; i++){
@@ -363,7 +363,7 @@ static void filter(struct vf_priv_s *p,
uint8_t *dst2= &dst[i][y*dst_stride[i]];
filter_line(p, dst2, prev, cur, next, w, refs, parity ^ tff);
}else{
- memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w);
+ fast_memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w);
}
}
}
Modified: trunk/libmpcodecs/vf_yvu9.c
==============================================================================
--- trunk/libmpcodecs/vf_yvu9.c (original)
+++ trunk/libmpcodecs/vf_yvu9.c Tue Jun 5 16:27:54 2007
@@ -37,7 +37,7 @@ static int put_image(struct vf_instance_
mpi->w, mpi->h);
for(y=0;y<mpi->h;y++)
- memcpy(dmpi->planes[0]+dmpi->stride[0]*y,
+ fast_memcpy(dmpi->planes[0]+dmpi->stride[0]*y,
mpi->planes[0]+mpi->stride[0]*y,
mpi->w);
Modified: trunk/libmpdemux/demux_asf.c
==============================================================================
--- trunk/libmpdemux/demux_asf.c (original)
+++ trunk/libmpdemux/demux_asf.c Tue Jun 5 16:27:54 2007
@@ -56,12 +56,12 @@ static void asf_descrambling(unsigned ch
//i+=asf_scrambling_h*asf_scrambling_w;
for(x=0;x<asf->scrambling_w;x++)
for(y=0;y<asf->scrambling_h;y++){
- memcpy(dst+i,s2+(y*asf->scrambling_w+x)*asf->scrambling_b,asf->scrambling_b);
+ fast_memcpy(dst+i,s2+(y*asf->scrambling_w+x)*asf->scrambling_b,asf->scrambling_b);
i+=asf->scrambling_b;
}
s2+=asf->scrambling_h*asf->scrambling_w*asf->scrambling_b;
}
- //if(i<len) memcpy(dst+i,src+i,len-i);
+ //if(i<len) fast_memcpy(dst+i,src+i,len-i);
free(*src);
*src = dst;
}
@@ -154,7 +154,7 @@ static void demux_asf_append_to_packet(d
{
if(dp->len!=offs && offs!=-1) mp_msg(MSGT_DEMUX,MSGL_V,"warning! fragment.len=%d BUT next fragment offset=%d \n",dp->len,offs);
dp->buffer=realloc(dp->buffer,dp->len+len+FF_INPUT_BUFFER_PADDING_SIZE);
- memcpy(dp->buffer+dp->len,data,len);
+ fast_memcpy(dp->buffer+dp->len,data,len);
memset(dp->buffer+dp->len+len, 0, FF_INPUT_BUFFER_PADDING_SIZE);
mp_dbg(MSGT_DEMUX,MSGL_DBG4,"data appended! %d+%d\n",dp->len,len);
dp->len+=len;
@@ -224,7 +224,7 @@ static int demux_asf_read_packet(demuxer
return 0;
}
dp=new_demux_packet(len);
- memcpy(dp->buffer,data,len);
+ fast_memcpy(dp->buffer,data,len);
if (asf->asf_is_dvr_ms)
dp->pts=time*0.0000001f;
else
Modified: trunk/libmpdemux/demux_gif.c
==============================================================================
--- trunk/libmpdemux/demux_gif.c (original)
+++ trunk/libmpdemux/demux_gif.c Tue Jun 5 16:27:54 2007
@@ -145,7 +145,7 @@ static int demux_gif_fill_buffer(demuxer
dp = new_demux_packet(priv->w * priv->h);
buf = calloc(gif->Image.Width, gif->Image.Height);
if (priv->useref)
- memcpy(dp->buffer, priv->refimg, priv->w * priv->h);
+ fast_memcpy(dp->buffer, priv->refimg, priv->w * priv->h);
else
memset(dp->buffer, gif->SBackGroundColor, priv->w * priv->h);
@@ -199,7 +199,7 @@ static int demux_gif_fill_buffer(demuxer
memcpy_transp_pic(dest, buf, w, h, priv->w, gif->Image.Width,
transparency, transparent_col);
- if (refmode == 1) memcpy(priv->refimg, dp->buffer, priv->w * priv->h);
+ if (refmode == 1) fast_memcpy(priv->refimg, dp->buffer, priv->w * priv->h);
if (refmode == 2 && priv->useref) {
dest = priv->refimg + priv->w * t + l;
memset(buf, gif->SBackGroundColor, len);
Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c (original)
+++ trunk/libmpdemux/demuxer.c Tue Jun 5 16:27:54 2007
@@ -429,7 +429,7 @@ while(len>0){
if(!ds_fill_buffer(ds)) return bytes;
} else {
if(x>len) x=len;
- if(mem) memcpy(mem+bytes,&ds->buffer[ds->buffer_pos],x);
+ if(mem) fast_memcpy(mem+bytes,&ds->buffer[ds->buffer_pos],x);
bytes+=x;len-=x;ds->buffer_pos+=x;
}
}
@@ -445,7 +445,7 @@ while(len>0){
if(!ds_fill_buffer(ds)) return bytes;
} else {
if(x>len) x=len;
- if(mem) memcpy(mem+bytes,&ds->buffer[ds->buffer_pos],x);
+ if(mem) fast_memcpy(mem+bytes,&ds->buffer[ds->buffer_pos],x);
bytes+=x;len-=x;ds->buffer_pos+=x;
return bytes; // stop at end of package! (for correct timestamping)
}
Modified: trunk/libvo/fastmemcpy.h
==============================================================================
--- trunk/libvo/fastmemcpy.h (original)
+++ trunk/libvo/fastmemcpy.h Tue Jun 5 16:27:54 2007
@@ -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 * d
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;
}
Modified: trunk/libvo/vesa_lvo.c
==============================================================================
--- trunk/libvo/vesa_lvo.c (original)
+++ trunk/libvo/vesa_lvo.c Tue Jun 5 16:27:54 2007
@@ -167,7 +167,7 @@ uint32_t vlvo_draw_slice_420(uint8_t *im
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 *im
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 *im
+ 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[
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[
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;
Modified: trunk/libvo/vo_3dfx.c
==============================================================================
--- trunk/libvo/vo_3dfx.c (original)
+++ trunk/libvo/vo_3dfx.c Tue Jun 5 16:27:54 2007
@@ -238,10 +238,10 @@ dump_yuv_planar(uint32_t *y, uint32_t *u
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");
}
Modified: trunk/libvo/vo_bl.c
==============================================================================
--- trunk/libvo/vo_bl.c (original)
+++ trunk/libvo/vo_bl.c Tue Jun 5 16:27:54 2007
@@ -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[],
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];
Modified: trunk/libvo/vo_directfb2.c
==============================================================================
--- trunk/libvo/vo_directfb2.c (original)
+++ trunk/libvo/vo_directfb2.c Tue Jun 5 16:27:54 2007
@@ -1233,7 +1233,7 @@ static int draw_slice(uint8_t *src[], in
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[], in
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[], in
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[], in
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[], in
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 *mp
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 *mp
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 *mp
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);
}
}
Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c (original)
+++ trunk/libvo/vo_directx.c Tue Jun 5 16:27:54 2007
@@ -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 *mp
}
else //packed
{
- memcpy( image, mpi->planes[0], image_height * dstride);
+ fast_memcpy( image, mpi->planes[0], image_height * dstride);
}
return VO_TRUE;
}
Modified: trunk/libvo/vo_dxr2.c
==============================================================================
--- trunk/libvo/vo_dxr2.c (original)
+++ trunk/libvo/vo_dxr2.c Tue Jun 5 16:27:54 2007
@@ -165,13 +165,13 @@ int write_dxr2(unsigned char *data, int
}
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;
Modified: trunk/libvo/vo_dxr3.c
==============================================================================
--- trunk/libvo/vo_dxr3.c (original)
+++ trunk/libvo/vo_dxr3.c Tue Jun 5 16:27:54 2007
@@ -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
},*p;
p = malloc(sizeof(m));
- memcpy(p,m,sizeof(m));
+ fast_memcpy(p,m,sizeof(m));
return p;
}
Modified: trunk/libvo/vo_fbdev.c
==============================================================================
--- trunk/libvo/vo_fbdev.c (original)
+++ trunk/libvo/vo_fbdev.c Tue Jun 5 16:27:54 2007
@@ -1075,7 +1075,7 @@ static int draw_slice(uint8_t *src[], in
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--;
Modified: trunk/libvo/vo_fbdev2.c
==============================================================================
--- trunk/libvo/vo_fbdev2.c (original)
+++ trunk/libvo/vo_fbdev2.c Tue Jun 5 16:27:54 2007
@@ -354,7 +354,7 @@ static int draw_slice(uint8_t *src[], in
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;
Modified: trunk/libvo/vo_macosx.m
==============================================================================
--- trunk/libvo/vo_macosx.m (original)
+++ trunk/libvo/vo_macosx.m Tue Jun 5 16:27:54 2007
@@ -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:
Modified: trunk/libvo/vo_quartz.c
==============================================================================
--- trunk/libvo/vo_quartz.c (original)
+++ trunk/libvo/vo_quartz.c Tue Jun 5 16:27:54 2007
@@ -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:
Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c (original)
+++ trunk/libvo/vo_sdl.c Tue Jun 5 16:27:54 2007
@@ -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;
Modified: trunk/libvo/vo_svga.c
==============================================================================
--- trunk/libvo/vo_svga.c (original)
+++ trunk/libvo/vo_svga.c Tue Jun 5 16:27:54 2007
@@ -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;
}
Modified: trunk/libvo/vo_syncfb.c
==============================================================================
--- trunk/libvo/vo_syncfb.c (original)
+++ trunk/libvo/vo_syncfb.c Tue Jun 5 16:27:54 2007
@@ -127,7 +127,7 @@ write_frame_YUV420P2(uint_8 *y,uint_8 *c
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 *c
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 *c
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 *c
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 *c
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;
}
Modified: trunk/libvo/vo_vesa.c
==============================================================================
--- trunk/libvo/vo_vesa.c (original)
+++ trunk/libvo/vo_vesa.c Tue Jun 5 16:27:54 2007
@@ -217,7 +217,7 @@ static void __vbeSetPixel(int x, int y,
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,
*/
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
{
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,
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);
Modified: trunk/libvo/vo_yuv4mpeg.c
==============================================================================
--- trunk/libvo/vo_yuv4mpeg.c (original)
+++ trunk/libvo/vo_yuv4mpeg.c Tue Jun 5 16:27:54 2007
@@ -175,9 +175,9 @@ static void swap_fields(uint8_t *ptr, co
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
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[],
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[],
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[],
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;
Modified: trunk/libvo/vo_zr.c
==============================================================================
--- trunk/libvo/vo_zr.c (original)
+++ trunk/libvo/vo_zr.c Tue Jun 5 16:27:54 2007
@@ -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[],
// 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[],
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;
}
Modified: trunk/libvo/vo_zr2.c
==============================================================================
--- trunk/libvo/vo_zr2.c (original)
+++ trunk/libvo/vo_zr2.c Tue Jun 5 16:27:54 2007
@@ -151,7 +151,7 @@ static uint32_t draw_image(mp_image_t *m
}
/* 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
* 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
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");
Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c (original)
+++ trunk/mencoder.c Tue Jun 5 16:27:54 2007
@@ -338,10 +338,10 @@ static int dec_audio(sh_audio_t *sh_audi
if(ret>0) sh_audio->a_out_buffer_len+=ret; else at_eof=1;
}
if(len>sh_audio->a_out_buffer_len) len=sh_audio->a_out_buffer_len;
- memcpy(buffer+size,sh_audio->a_out_buffer,len);
+ fast_memcpy(buffer+size,sh_audio->a_out_buffer,len);
sh_audio->a_out_buffer_len-=len; size+=len;
if(sh_audio->a_out_buffer_len>0)
- memcpy(sh_audio->a_out_buffer,&sh_audio->a_out_buffer[len],sh_audio->a_out_buffer_len);
+ fast_memcpy(sh_audio->a_out_buffer,&sh_audio->a_out_buffer[len],sh_audio->a_out_buffer_len);
}
return size;
}
@@ -771,7 +771,7 @@ case VCODEC_COPY:
if (!curfile) {
if (sh_video->bih) {
mux_v->bih=malloc(sh_video->bih->biSize);
- memcpy(mux_v->bih, sh_video->bih, sh_video->bih->biSize);
+ fast_memcpy(mux_v->bih, sh_video->bih, sh_video->bih->biSize);
}
else
{
@@ -941,7 +941,7 @@ case ACODEC_COPY:
}
if (sh_audio->wf){
mux_a->wf=malloc(sizeof(WAVEFORMATEX) + sh_audio->wf->cbSize);
- memcpy(mux_a->wf, sh_audio->wf, sizeof(WAVEFORMATEX) + sh_audio->wf->cbSize);
+ fast_memcpy(mux_a->wf, sh_audio->wf, sizeof(WAVEFORMATEX) + sh_audio->wf->cbSize);
if(!sh_audio->i_bps) sh_audio->i_bps=mux_a->wf->nAvgBytesPerSec;
} else {
mux_a->wf = malloc(sizeof(WAVEFORMATEX));
@@ -1222,7 +1222,7 @@ if(sh_audio){
mux_a->wf->nAvgBytesPerSec=0.5f+(double)mux_a->size/mux_a->timer; // avg bps (VBR)
if(mux_a->buffer_len>=len){
mux_a->buffer_len-=len;
- memcpy(mux_a->buffer,mux_a->buffer+len,mux_a->buffer_len);
+ fast_memcpy(mux_a->buffer,mux_a->buffer+len,mux_a->buffer_len);
}
@@ -1573,9 +1573,9 @@ static uint8_t* flip_upside_down(uint8_t
int i;
for(i = 0; i < height/2; i++) {
- memcpy(tmp, &src[i*width], width);
- memcpy(&dst[i * width], &src[(height - i) * width], width);
- memcpy(&dst[(height - i) * width], tmp, width);
+ fast_memcpy(tmp, &src[i*width], width);
+ fast_memcpy(&dst[i * width], &src[(height - i) * width], width);
+ fast_memcpy(&dst[(height - i) * width], tmp, width);
}
free(tmp);
Modified: trunk/mp3lib/sr1.c
==============================================================================
--- trunk/mp3lib/sr1.c (original)
+++ trunk/mp3lib/sr1.c Tue Jun 5 16:27:54 2007
@@ -172,7 +172,7 @@ LOCAL void set_pointer(int backstep)
// if(backstep!=512 && backstep>fsizeold)
// printf("\rWarning! backstep (%d>%d) \n",backstep,fsizeold);
wordpointer = bsbuf + ssize - backstep;
- if (backstep) memcpy(wordpointer,bsbufold+fsizeold-backstep,backstep);
+ if (backstep) fast_memcpy(wordpointer,bsbufold+fsizeold-backstep,backstep);
bitindex = 0;
bitsleft+=8*backstep;
// printf("Backstep %d (bitsleft=%d)\n",backstep,bitsleft);
Modified: trunk/stream/tvi_v4l.c
==============================================================================
--- trunk/stream/tvi_v4l.c (original)
+++ trunk/stream/tvi_v4l.c Tue Jun 5 16:27:54 2007
@@ -1416,9 +1416,9 @@ static inline void copy_frame(priv_t *pr
}
// YV12 uses VIDEO_PALETTE_YUV420P, but the planes are swapped
if (priv->format == IMGFMT_YV12) {
- memcpy(dest, source, priv->width * priv->height);
- memcpy(dest+priv->width * priv->height*5/4, source+priv->width * priv->height, priv->width * priv->height/4);
- memcpy(dest+priv->width * priv->height, source+priv->width * priv->height*5/4, priv->width * priv->height/4);
+ fast_memcpy(dest, source, priv->width * priv->height);
+ fast_memcpy(dest+priv->width * priv->height*5/4, source+priv->width * priv->height, priv->width * priv->height/4);
+ fast_memcpy(dest+priv->width * priv->height, source+priv->width * priv->height*5/4, priv->width * priv->height/4);
return;
}
@@ -1429,7 +1429,7 @@ static inline void copy_frame(priv_t *pr
case VIDEO_PALETTE_RGB565:
sptr = source + (priv->height-1)*priv->bytesperline;
for (i = 0; i < priv->height; i++) {
- memcpy(dest, sptr, priv->bytesperline);
+ fast_memcpy(dest, sptr, priv->bytesperline);
dest += priv->bytesperline;
sptr -= priv->bytesperline;
}
@@ -1437,7 +1437,7 @@ static inline void copy_frame(priv_t *pr
case VIDEO_PALETTE_UYVY:
case VIDEO_PALETTE_YUV420P:
default:
- memcpy(dest, source, priv->bytesperline * priv->height);
+ fast_memcpy(dest, source, priv->bytesperline * priv->height);
}
}
@@ -1665,7 +1665,7 @@ static double grab_video_frame(priv_t *p
pthread_mutex_lock(&priv->video_buffer_mutex);
interval = (double)priv->video_timebuffer[priv->video_head]*1e-6;
- memcpy(buffer, priv->video_ringbuffer[priv->video_head], len);
+ fast_memcpy(buffer, priv->video_ringbuffer[priv->video_head], len);
priv->video_cnt--;
priv->video_head = (priv->video_head+1)%priv->video_buffer_size_current;
pthread_mutex_unlock(&priv->video_buffer_mutex);
@@ -1766,7 +1766,7 @@ static double grab_audio_frame(priv_t *p
while (priv->audio_head == priv->audio_tail) {
usleep(10000);
}
- memcpy(buffer, priv->audio_ringbuffer+priv->audio_head*priv->audio_in.blocksize, len);
+ fast_memcpy(buffer, priv->audio_ringbuffer+priv->audio_head*priv->audio_in.blocksize, len);
priv->audio_head = (priv->audio_head+1) % priv->audio_buffer_size;
priv->audio_cnt--;
priv->audio_sent_blocks_total++;
More information about the MPlayer-cvslog
mailing list