[FFmpeg-devel] [PATCH] Move CPU detection to libavutil and cleanup

Stefano Sabatini stefano.sabatini-lala
Wed Sep 8 13:14:03 CEST 2010


On date Sunday 2010-09-05 23:46:51 +0200, Michael Niedermayer encoded:
> On Sun, Sep 05, 2010 at 11:25:55PM +0200, Stefano Sabatini wrote:
> > On date Sunday 2010-09-05 23:05:29 +0200, Michael Niedermayer encoded:
> > > On Sun, Sep 05, 2010 at 05:27:50PM +0200, Stefano Sabatini wrote:
> > > > On date Sunday 2010-09-05 16:48:23 +0200, Michael Niedermayer encoded:
> > > > > On Sat, Sep 04, 2010 at 12:09:50PM +0200, Stefano Sabatini wrote:
> > > > > [...]
> > > > > > +#include "config.h"
> > > > > > +
> > > > > > +int av_get_cpu_flags(void)
> > > > > > +{
> > > > > > +    return HAVE_IWMMXT * AV_CPU_IWMMXT;
> > > > > > +}
> > > > > > +
> > > > > > +int ff_has_altivec(void)
> > > > > 
> > > > > why this seperate function and why does it have a ff_ prefix but is used from
> > > > > outside libavutil?
> > > > 
> > > > Is used in libavcodec/ppc/dsputil_init_ppc.c.
> > > 
> > > why this seperate function?
> > > why not av_get_cpu_flags() ?
> > 
> > Because it's a mess, I have no idea why it is like that though.
> 
> i know its a mess even if not a particularely bad and big one
> but this needs to be fixed before making the API public. otherwise there
> will be cruft until the next major bump and maybe worse, people using it
> by mistake ...

Updated and tested on i686 and PPC.

Regards.
-- 
FFmpeg = Fundamentalist Fancy Maxi Practical Elastic Governor



More information about the ffmpeg-devel mailing list