[FFmpeg-devel] libavutil simd

John Kelley johnek
Mon Oct 1 21:51:30 CEST 2007

On 10/1/07, Luca Barbato <lu_zero at gentoo.org> 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)?
> >
> > 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?

Why not implement a ff_use_altivec() function that switches the
internal pointers to use altivec functions and leaves the detection up
to the parent program with a note on why in the doxy comments?


More information about the ffmpeg-devel mailing list