[FFmpeg-devel] libavutil simd

Michael Niedermayer michaelni
Mon Oct 1 13:29:36 CEST 2007


Hi

On Mon, Oct 01, 2007 at 01:11:29PM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Mon, Oct 01, 2007 at 12:19:43PM +0200, Luca Barbato wrote:
> > Michael Niedermayer wrote:
> > > Hi
> > > 
> > > On Mon, Oct 01, 2007 at 12:27:12AM -0600, Loren Merritt wrote:
> > >> Any objections to moving cputest.c and related code to libavutil? I'd like 
> > >> to simd some of the lavu functions, but cpu detection depends on lavc.
> > > 
> > > cputest.c + the parts needed from the headers are ok
> > > 
> > 
> > How that relates to my old email about the same subject?
> 
> cputest.c contains clean code to detect various x86 extensions
> 
> vs.
> 
> you did not suggest any clean way to detect altivec (likely because there
> is no clean way) sigill catching, fork, /proc/* parsing none of them is
> something i will accept in libavutil and actually i wouldnt accept it in
> libavcodec either if it where submitted by someone now

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?

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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- 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/396129be/attachment.pgp>



More information about the ffmpeg-devel mailing list