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

Michael Niedermayer michaelni
Sun Sep 5 23:05:29 CEST 2010


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() ?


> 
> If you prefer av_ rather than ff_ no problem, but also I see no much
> point in it,

av_ is public
ff_ is private

you use it from outside libavutil thus its public
(yes i dislike the idea of a secret private API that entangles our libs
 but that we need to take care of due to ABI issues)
 
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100905/fb353103/attachment.pgp>



More information about the ffmpeg-devel mailing list