[MPlayer-cvslog] r23476 - in trunk: libao2/ao_dsound.c libmenu/vf_menu.c libmpcodecs/vd_mtga.c libmpcodecs/vf_fspp.c libmpcodecs/vf_yadif.c libvo/vo_bl.c libvo/vo_dxr3.c libvo/vo_vesa.c libvo/vo_zr2.c mencoder.c

reimar subversion at mplayerhq.hu
Tue Jun 5 17:09:50 CEST 2007


Author: reimar
Date: Tue Jun  5 17:09:49 2007
New Revision: 23476

Log:
Do not use fast_memcpy for small size copy, esp. when the size is constant


Modified:
   trunk/libao2/ao_dsound.c
   trunk/libmenu/vf_menu.c
   trunk/libmpcodecs/vd_mtga.c
   trunk/libmpcodecs/vf_fspp.c
   trunk/libmpcodecs/vf_yadif.c
   trunk/libvo/vo_bl.c
   trunk/libvo/vo_dxr3.c
   trunk/libvo/vo_vesa.c
   trunk/libvo/vo_zr2.c
   trunk/mencoder.c

Modified: trunk/libao2/ao_dsound.c
==============================================================================
--- trunk/libao2/ao_dsound.c	(original)
+++ trunk/libao2/ao_dsound.c	Tue Jun  5 17:09:49 2007
@@ -199,7 +199,7 @@ static BOOL CALLBACK DirectSoundEnum(LPG
     if(device_num==*device_index){
         mp_msg(MSGT_AO, MSGL_V,"<--");
         if(guid){
-            fast_memcpy(&device,guid,sizeof(GUID));
+            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++ ) {
-  	        fast_memcpy(lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+  	        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++ ) {
-  	            fast_memcpy(lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+  	            memcpy(lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
   	        }
   	    }
 

Modified: trunk/libmenu/vf_menu.c
==============================================================================
--- trunk/libmenu/vf_menu.c	(original)
+++ trunk/libmenu/vf_menu.c	Tue Jun  5 17:09:49 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);
-    fast_memcpy(mpi->planes,dmpi->planes,MP_MAX_PLANES*sizeof(unsigned char*));
-    fast_memcpy(mpi->stride,dmpi->stride,MP_MAX_PLANES*sizeof(unsigned int));
+    memcpy(mpi->planes,dmpi->planes,MP_MAX_PLANES*sizeof(unsigned char*));
+    memcpy(mpi->stride,dmpi->stride,MP_MAX_PLANES*sizeof(unsigned int));
     mpi->flags|=MP_IMGFLAG_DIRECT;
     mpi->priv=(void*)dmpi;
     return;

Modified: trunk/libmpcodecs/vd_mtga.c
==============================================================================
--- trunk/libmpcodecs/vd_mtga.c	(original)
+++ trunk/libmpcodecs/vd_mtga.c	Tue Jun  5 17:09:49 2007
@@ -110,7 +110,7 @@ static void decode_rle_tga(TGAInfo *info
 	    
 	    if (packet_header & 0x80) /* runlength encoded packet */
 	    {
-		fast_memcpy(final, data, num_bytes);
+		memcpy(final, data, num_bytes);
 		
 		// Note: this will be slow when DR to vram!
 		i=num_bytes;

Modified: trunk/libmpcodecs/vf_fspp.c
==============================================================================
--- trunk/libmpcodecs/vf_fspp.c	(original)
+++ trunk/libmpcodecs/vf_fspp.c	Tue Jun  5 17:09:49 2007
@@ -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));
-	    fast_memcpy(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling
-	    fast_memcpy(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM));  
+	    memcpy(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling
+	    memcpy(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM));  
 	}
 	//
 	es=width+8-x0; //  8, ...      

Modified: trunk/libmpcodecs/vf_yadif.c
==============================================================================
--- trunk/libmpcodecs/vf_yadif.c	(original)
+++ trunk/libmpcodecs/vf_yadif.c	Tue Jun  5 17:09:49 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;
 
-    fast_memcpy (p->ref[3], p->ref[0], sizeof(uint8_t *)*3);
+    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++){

Modified: trunk/libvo/vo_bl.c
==============================================================================
--- trunk/libvo/vo_bl.c	(original)
+++ trunk/libvo/vo_bl.c	Tue Jun  5 17:09:49 2007
@@ -174,7 +174,7 @@ static int udp_init(bl_host_t *h) {
 	addr.sin_family = AF_INET;
 	addr.sin_port = htons(h->port);
 
-	fast_memcpy(&addr.sin_addr.s_addr, dest->h_addr_list[0], dest->h_length);
+	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) {

Modified: trunk/libvo/vo_dxr3.c
==============================================================================
--- trunk/libvo/vo_dxr3.c	(original)
+++ trunk/libvo/vo_dxr3.c	Tue Jun  5 17:09:49 2007
@@ -1106,7 +1106,7 @@ static struct lut_entry *new_lookuptable
     },*p;
 
     p = malloc(sizeof(m));
-    fast_memcpy(p,m,sizeof(m));
+    memcpy(p,m,sizeof(m));
     return p;
 }
 

Modified: trunk/libvo/vo_vesa.c
==============================================================================
--- trunk/libvo/vo_vesa.c	(original)
+++ trunk/libvo/vo_vesa.c	Tue Jun  5 17:09:49 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);
-	fast_memcpy(VIDEO_PTR(offset), &color, pixel_size);
+	memcpy(VIDEO_PTR(offset), &color, pixel_size);
 }
 
 /*
@@ -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; }
-	fast_memcpy(vib.VESASignature,"VBE2",4);
+	memcpy(vib.VESASignature,"VBE2",4);
 	if(!vib_set && (err=vbeGetControllerInfo(&vib)) != VBE_OK)
 	{
 	  PRINT_VBE_ERR("vbeGetControllerInfo",err);

Modified: trunk/libvo/vo_zr2.c
==============================================================================
--- trunk/libvo/vo_zr2.c	(original)
+++ trunk/libvo/vo_zr2.c	Tue Jun  5 17:09:49 2007
@@ -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. */
-	fast_memcpy(&zptmp, &p->zp, sizeof(zptmp));
+	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 */
-		fast_memcpy(&p->zp, &zptmp, sizeof(zptmp));
+		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 17:09:49 2007
@@ -771,7 +771,7 @@ case VCODEC_COPY:
 	if (!curfile) {
 		if (sh_video->bih) {
 			mux_v->bih=malloc(sh_video->bih->biSize);
-			fast_memcpy(mux_v->bih, sh_video->bih, sh_video->bih->biSize);
+			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);
-	fast_memcpy(mux_a->wf, sh_audio->wf, sizeof(WAVEFORMATEX) + sh_audio->wf->cbSize);
+	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));



More information about the MPlayer-cvslog mailing list