[FFmpeg-devel] libavutil simd

Michael Niedermayer michaelni
Mon Oct 1 23:31:33 CEST 2007


Hi

On Mon, Oct 01, 2007 at 09:35:41PM +0200, Luca Barbato wrote:
> Michael Niedermayer wrote:
> > Hi
> > 
> > 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
> > simd
> 
> That implies switching implementation at buildtime and live with it for
> now, I assume.

i just googled for altivec detection and the first hit was a bugreport about
the detection in ffmpeg not working! so wth are we discussing here

* ppc does not seem to support clean user mode altivec detection
* gcc requires -maltivec for altivec intrinsics
* gcc does NOT generate code which will run on pre altivec CPUs if
  -maltivec is used independant of use of altivec intrinsics
* if you dont use -maltivec your code will not be optimal for a altivec
  cpu

so please correct me if iam wrong but i dont see how the altivec "detection"
code in libavcodec could have ever worked short of by pure luck that gcc
didnt use altivec anywhere when compiling normal c code

so it really does not seem like runtime altivec detection is possible not
even with fork and sigill catching or /proc/ with current gcc

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/8f4b4da7/attachment.pgp>



More information about the ffmpeg-devel mailing list