summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--gui/mplayer/mw.c2
-rw-r--r--gui/mplayer/pb.c2
-rw-r--r--libaf/af_format.c2
-rw-r--r--libao2/ao_dsound.c10
-rw-r--r--libao2/ao_jack.c4
-rw-r--r--libao2/ao_sdl.c8
-rw-r--r--libao2/ao_win32.c2
-rw-r--r--libmenu/vf_menu.c4
-rw-r--r--libmpcodecs/ad_mpc.c2
-rw-r--r--libmpcodecs/native/nuppelvideo.c6
-rw-r--r--libmpcodecs/vd_mpng.c2
-rw-r--r--libmpcodecs/vd_mtga.c10
-rw-r--r--libmpcodecs/vf_bmovl.c6
-rw-r--r--libmpcodecs/vf_detc.c2
-rw-r--r--libmpcodecs/vf_down3dright.c2
-rw-r--r--libmpcodecs/vf_filmdint.c12
-rw-r--r--libmpcodecs/vf_fspp.c12
-rw-r--r--libmpcodecs/vf_il.c12
-rw-r--r--libmpcodecs/vf_ivtc.c2
-rw-r--r--libmpcodecs/vf_kerndeint.c12
-rw-r--r--libmpcodecs/vf_noise.c4
-rw-r--r--libmpcodecs/vf_phase.c4
-rw-r--r--libmpcodecs/vf_pp7.c6
-rw-r--r--libmpcodecs/vf_pullup.c10
-rw-r--r--libmpcodecs/vf_softpulldown.c2
-rw-r--r--libmpcodecs/vf_spp.c8
-rw-r--r--libmpcodecs/vf_telecine.c2
-rw-r--r--libmpcodecs/vf_tfields.c26
-rw-r--r--libmpcodecs/vf_tinterlace.c2
-rw-r--r--libmpcodecs/vf_unsharp.c4
-rw-r--r--libmpcodecs/vf_uspp.c6
-rw-r--r--libmpcodecs/vf_yadif.c4
-rw-r--r--libmpcodecs/vf_yvu9.c2
-rw-r--r--libmpdemux/demux_asf.c8
-rw-r--r--libmpdemux/demux_gif.c4
-rw-r--r--libmpdemux/demuxer.c4
-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
-rw-r--r--mencoder.c16
-rw-r--r--mp3lib/sr1.c2
-rw-r--r--stream/tvi_v4l.c14
58 files changed, 192 insertions, 191 deletions
diff --git a/gui/mplayer/mw.c b/gui/mplayer/mw.c
index 142eca3185..1762eea45d 100644
--- a/gui/mplayer/mw.c
+++ b/gui/mplayer/mw.c
@@ -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;
}
diff --git a/gui/mplayer/pb.c b/gui/mplayer/pb.c
index 3fad991c28..0a06abf9b0 100644
--- a/gui/mplayer/pb.c
+++ b/gui/mplayer/pb.c
@@ -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 );
}
diff --git a/libaf/af_format.c b/libaf/af_format.c
index 193a4e7f9b..df95a03aeb 100644
--- a/libaf/af_format.c
+++ b/libaf/af_format.c
@@ -287,7 +287,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
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;
}
}
diff --git a/libao2/ao_dsound.c b/libao2/ao_dsound.c
index 79f70b1b76..5f6bc8daea 100644
--- a/libao2/ao_dsound.c
+++ b/libao2/ao_dsound.c
@@ -199,7 +199,7 @@ static BOOL CALLBACK DirectSoundEnum(LPGUID guid,LPCSTR desc,LPCSTR module,LPVOI
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 *data, int len)
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 *data, int len)
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;
}
diff --git a/libao2/ao_jack.c b/libao2/ao_jack.c
index 556a887a4b..1e9dbff8c8 100644
--- a/libao2/ao_jack.c
+++ b/libao2/ao_jack.c
@@ -111,10 +111,10 @@ static int write_buffer(unsigned char* data, int len) {
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;
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index 6ec56d1665..0da9bb338f 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -88,10 +88,10 @@ static int write_buffer(unsigned char* data,int len){
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* data,int len){
#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;
diff --git a/libao2/ao_win32.c b/libao2/ao_win32.c
index 0f39b51767..71146b43a2 100644
--- a/libao2/ao_win32.c
+++ b/libao2/ao_win32.c
@@ -299,7 +299,7 @@ static int write_waveOutBuffer(unsigned char* data,int len){
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;
diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c
index 7996c24adc..3b1e1cc2a1 100644
--- a/libmenu/vf_menu.c
+++ b/libmenu/vf_menu.c
@@ -146,8 +146,8 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
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;
diff --git a/libmpcodecs/ad_mpc.c b/libmpcodecs/ad_mpc.c
index e91998df7b..435a6cb0e5 100644
--- a/libmpcodecs/ad_mpc.c
+++ b/libmpcodecs/ad_mpc.c
@@ -54,7 +54,7 @@ static mpc_int32_t cb_read(void *data, void *buf, mpc_int32_t size) {
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);
diff --git a/libmpcodecs/native/nuppelvideo.c b/libmpcodecs/native/nuppelvideo.c
index c7d88eca66..cac116f3eb 100644
--- a/libmpcodecs/native/nuppelvideo.c
+++ b/libmpcodecs/native/nuppelvideo.c
@@ -67,7 +67,7 @@ void decode_nuv( unsigned char *encoded, int encoded_size,
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, int encoded_size,
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;
}
diff --git a/libmpcodecs/vd_mpng.c b/libmpcodecs/vd_mpng.c
index d8725f7c08..f4af973e8d 100644
--- a/libmpcodecs/vd_mpng.c
+++ b/libmpcodecs/vd_mpng.c
@@ -58,7 +58,7 @@ static void pngReadFN( png_structp pngstr,png_bytep buffer,png_size_t size )
{
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;
}
diff --git a/libmpcodecs/vd_mtga.c b/libmpcodecs/vd_mtga.c
index a328ab037c..f9f2301da2 100644
--- a/libmpcodecs/vd_mtga.c
+++ b/libmpcodecs/vd_mtga.c
@@ -110,20 +110,20 @@ static void decode_rle_tga(TGAInfo *info, unsigned char *data, mp_image_t *mpi)
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(TGAInfo *info, unsigned char *data, mp_image
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;
}
diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c
index 90b6ccd15e..ef7ce19ce9 100644
--- a/libmpcodecs/vf_bmovl.c
+++ b/libmpcodecs/vf_bmovl.c
@@ -388,14 +388,14 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi, double pts){
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 );
}
diff --git a/libmpcodecs/vf_detc.c b/libmpcodecs/vf_detc.c
index 52932d8d6b..27be5d393c 100644
--- a/libmpcodecs/vf_detc.c
+++ b/libmpcodecs/vf_detc.c
@@ -60,7 +60,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
diff --git a/libmpcodecs/vf_down3dright.c b/libmpcodecs/vf_down3dright.c
index 84e2f693b2..8bccf0cb84 100644
--- a/libmpcodecs/vf_down3dright.c
+++ b/libmpcodecs/vf_down3dright.c
@@ -67,7 +67,7 @@ static void toright(unsigned char *dst[3], unsigned char *src[3],
*t++ = *sR++;
}
if (p->scaleh == 1) {
- memcpy(to + dst, to, dst);
+ fast_memcpy(to + dst, to, dst);
to += dst;
}
to += dst;
diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c
index 26896626e2..0fb8ea69d1 100644
--- a/libmpcodecs/vf_filmdint.c
+++ b/libmpcodecs/vf_filmdint.c
@@ -97,7 +97,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int
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, unsigned char *a, unsigned char *b,
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, unsigned char *a, unsigned char *b,
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, unsigned char *a, unsigned char *b,
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;
}
diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c
index 541dfb6564..acb39f5c56 100644
--- a/libmpcodecs/vf_fspp.c
+++ b/libmpcodecs/vf_fspp.c
@@ -421,15 +421,15 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src,
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, uint8_t *dst, uint8_t *src,
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_s* vf, mp_image_t *mpi, double pts)
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;
diff --git a/libmpcodecs/vf_il.c b/libmpcodecs/vf_il.c
index edc847ccff..a5af511c6e 100644
--- a/libmpcodecs/vf_il.c
+++ b/libmpcodecs/vf_il.c
@@ -58,20 +58,20 @@ static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride,
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;
}
diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c
index 9c30a02477..4f9ca36d7c 100644
--- a/libmpcodecs/vf_ivtc.c
+++ b/libmpcodecs/vf_ivtc.c
@@ -47,7 +47,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int
for(i=0; i<height; i++)
{
- memcpy(dst, src, bytesPerLine);
+ fast_memcpy(dst, src, bytesPerLine);
src+= srcStride;
dst+= dstStride;
}
diff --git a/libmpcodecs/vf_kerndeint.c b/libmpcodecs/vf_kerndeint.c
index f512601fb3..41da44ebfb 100644
--- a/libmpcodecs/vf_kerndeint.c
+++ b/libmpcodecs/vf_kerndeint.c
@@ -128,16 +128,16 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
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_s* vf, mp_image_t *mpi, double pts){
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;
}
diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c
index d430ef3281..360cd4dfec 100644
--- a/libmpcodecs/vf_noise.c
+++ b/libmpcodecs/vf_noise.c
@@ -278,12 +278,12 @@ static void noise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int
{
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;
}
diff --git a/libmpcodecs/vf_phase.c b/libmpcodecs/vf_phase.c
index 42957cd77e..45c76a1466 100644
--- a/libmpcodecs/vf_phase.c
+++ b/libmpcodecs/vf_phase.c
@@ -45,8 +45,8 @@ static void do_plane(unsigned char *to, unsigned char *from,
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);</