comparison libmenu/vf_menu.c @ 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 8572d2ef5263
comparison
equal deleted inserted replaced
23457:a124f3abc1ec 23458:973e53dc7df5
144 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ 144 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
145 mp_image_t *dmpi; 145 mp_image_t *dmpi;
146 146
147 if(mpi->type == MP_IMGTYPE_TEMP && (!(mpi->flags&MP_IMGFLAG_PRESERVE)) ) { 147 if(mpi->type == MP_IMGTYPE_TEMP && (!(mpi->flags&MP_IMGFLAG_PRESERVE)) ) {
148 dmpi = vf_get_image(vf->next,mpi->imgfmt,mpi->type, mpi->flags, mpi->w, mpi->h); 148 dmpi = vf_get_image(vf->next,mpi->imgfmt,mpi->type, mpi->flags, mpi->w, mpi->h);
149 fast_memcpy(mpi->planes,dmpi->planes,MP_MAX_PLANES*sizeof(unsigned char*)); 149 memcpy(mpi->planes,dmpi->planes,MP_MAX_PLANES*sizeof(unsigned char*));
150 fast_memcpy(mpi->stride,dmpi->stride,MP_MAX_PLANES*sizeof(unsigned int)); 150 memcpy(mpi->stride,dmpi->stride,MP_MAX_PLANES*sizeof(unsigned int));
151 mpi->flags|=MP_IMGFLAG_DIRECT; 151 mpi->flags|=MP_IMGFLAG_DIRECT;
152 mpi->priv=(void*)dmpi; 152 mpi->priv=(void*)dmpi;
153 return; 153 return;
154 } 154 }
155 } 155 }