[FFmpeg-devel] the future of fastmemcpy.h
Arpi
arpi
Sun May 27 17:31:20 CEST 2007
Hi,
> On Tue, May 22, 2007 at 10:17:34PM +0200, Reimar Doeffinger wrote:
> > Hello,
> > On Tue, May 22, 2007 at 09:53:59PM +0200, Alex Beregszaszi wrote:
> > > > Ronald brought up the subject of the fastmemcpy.h #includes that we
> > > > continue to have in a few source files. fastmemcpy.h is part of MPlayer
> > > > and not FFmpeg. Is the #include just old cruft or worth keeping?
> > > >
> > >
> > > I thought today about moving fastmemcpy into libavutil.
> >
> > Please don't without proper performance testing, it stops gcc from
> > replacing constant-size memcpys by an inlined builtin, causing both
> > valgrind problems and at least for lzo massive slowdown.
>
> introduce a big_memcpy() and leave memcpy() as is ...
>
or define such function in fastmemcpy.h:
inline void* memcpy(void* dst,void* src,size_t len){
if(len<128)
return __memcpy(dst,src,len);
return fast_memcpy(dst,src,len);
}
but anyway simple memcpy() shouldnt be re-defined, instead
the functions using big copies should call fast_memcpy().
A'rpi
More information about the ffmpeg-devel
mailing list