[FFmpeg-devel] libavutil simd

Michael Niedermayer michaelni
Mon Oct 1 18:15:04 CEST 2007


On Mon, Oct 01, 2007 at 02:31:13PM +0200, Luca Barbato wrote:
> Michael Niedermayer wrote:
> > and all who disagree with that please think a little, would you want libc
> > to fork or install a sigill handlder when you call sqrt() printf() or any
> > other simple function?
> > and besides wanting or not do you think that if libc did that, it would work
> > with no sideeffects?
> What about having an av_check_cpu_features in which you check by ANY
> means the features and sets accordingly the library functions/a flag
> (pretty much as we generate tables and so on)?

well, first an application (another lib which uses libavutil being a good
example) which cannot use fork() / ... must be able to use lavutil with full
after that we can discuss the advantages and disadvantages of your suggestion
in addition to the then existing system though it mostly looks redundant

> > 
> > its dead simple a library cannot detect some things at runtime, detect it at
> > compile time or leave it to the application
> > you can provide some example code in the docs for applications if you like to
> > or write libavtrash to contain such hacks with a big warning that
> > detect_altivec() will install a sigill handler and or fork()
> Fine, now, should we expose the function variants _{altivec,sse,foo} in
> the api or just have the implementation switched somehow?

i dont think exposing them as part of the public API directly is a very good
its one of these things we can always export later if we want but cant
easily remove once its exported

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071001/adf2eae7/attachment.pgp>

More information about the ffmpeg-devel mailing list