[Mplayer-cvslog] CVS: main/DOCS/tech TODO,1.9,1.10

Nick Kurshev nickols_k at mail.ru
Sun Dec 9 19:17:06 CET 2001


Hello, Arpi!

On Sun, 9 Dec 2001 16:54:42 +0200 (CEST) you wrote:

> Hi,
> 
> > Hi
> > 
> > On Sunday 09 December 2001 13:54, Michael Niedermayer wrote:
> > [...]
> > > On Sunday 09 December 2001 12:52, Arpi of Ize wrote:
> > [...]
> > > > +     aclib.c
> > ok, done, need renaming aclib.c -> aclib_template.c and yes it can be 
> done
> 
> > disabled :)
> :)
> 
I've found there enough "bad" code:
inline void * fast_memcpy(void * to, const void * from, size_t len)
{
#ifdef RUNTIME_CPUDETECT
#ifdef CAN_COMPILE_X86_ASM
	// ordered per speed fasterst first
	if(gCpuCaps.hasMMX2)
		fast_memcpy_MMX2(to, from, len);
	else if(gCpuCaps.has3DNow)
		fast_memcpy_3DNow(to, from, len);
	else if(gCpuCaps.hasMMX)
		fast_memcpy_MMX(to, from, len);
	else
#endif //CAN_COMPILE_X86_ASM
		memcpy(to, from, len); // prior to mmx we use the standart memcpy
#else
#ifdef HAVE_MMX2
		fast_memcpy_MMX2(to, from, len);
#elif defined (HAVE_3DNOW)
		fast_memcpy_3DNow(to, from, len);
#elif defined (HAVE_MMX)
		fast_memcpy_MMX(to, from, len);
#else
		memcpy(to, from, len); // prior to mmx we use the standart memcpy
#endif

#endif //!RUNTIME_CPUDETECT
}
IMHO such code would be better to move into memcpy_init but memcpy should be replaced
with pointer into it ;)
Calling through pointer should be faster of such if-else blocks
> 
> A'rpi / Astral & ESP-team
> 
> --
> mailto:arpi at thot.banki.hu
> http://esp-team.scene.hu
> _______________________________________________
> Mplayer-cvslog mailing list
> Mplayer-cvslog at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog
> 


Best regards! Nick



More information about the MPlayer-cvslog mailing list