Mercurial > mplayer.hg
changeset 23458:973e53dc7df5
Do not use fast_memcpy for small size copy, esp. when the size is constant
author | reimar |
---|---|
date | Tue, 05 Jun 2007 15:09:49 +0000 |
parents | a124f3abc1ec |
children | 2c09fe135c93 |
files | 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 |
diffstat | 10 files changed, 17 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_dsound.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libao2/ao_dsound.c Tue Jun 05 15:09:49 2007 +0000 @@ -199,7 +199,7 @@ 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 @@ 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); } }
--- a/libmenu/vf_menu.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libmenu/vf_menu.c Tue Jun 05 15:09:49 2007 +0000 @@ -146,8 +146,8 @@ 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;
--- a/libmpcodecs/vd_mtga.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libmpcodecs/vd_mtga.c Tue Jun 05 15:09:49 2007 +0000 @@ -110,7 +110,7 @@ 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;
--- a/libmpcodecs/vf_fspp.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libmpcodecs/vf_fspp.c Tue Jun 05 15:09:49 2007 +0000 @@ -456,8 +456,8 @@ 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, ...
--- a/libmpcodecs/vf_yadif.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libmpcodecs/vf_yadif.c Tue Jun 05 15:09:49 2007 +0000 @@ -62,7 +62,7 @@ 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++){
--- a/libvo/vo_bl.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libvo/vo_bl.c Tue Jun 05 15:09:49 2007 +0000 @@ -174,7 +174,7 @@ 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) {
--- a/libvo/vo_dxr3.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libvo/vo_dxr3.c Tue Jun 05 15:09:49 2007 +0000 @@ -1106,7 +1106,7 @@ },*p; p = malloc(sizeof(m)); - fast_memcpy(p,m,sizeof(m)); + memcpy(p,m,sizeof(m)); return p; }
--- a/libvo/vo_vesa.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libvo/vo_vesa.c Tue Jun 05 15:09:49 2007 +0000 @@ -217,7 +217,7 @@ 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 @@ 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);
--- a/libvo/vo_zr2.c Tue Jun 05 14:27:54 2007 +0000 +++ b/libvo/vo_zr2.c Tue Jun 05 15:09:49 2007 +0000 @@ -394,7 +394,7 @@ * 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 @@ 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");
--- a/mencoder.c Tue Jun 05 14:27:54 2007 +0000 +++ b/mencoder.c Tue Jun 05 15:09:49 2007 +0000 @@ -771,7 +771,7 @@ 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 @@ } 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));