[FFmpeg-devel] [PATCH] pointless #ifdeffery in mpegvideo_ppc.c

Guillaume Poirier gpoirier
Tue Oct 2 16:25:55 CEST 2007


Michael Niedermayer wrote:
> Hi
> 
> On Tue, Oct 02, 2007 at 01:14:18PM +0200, Luca Barbato wrote:
>> Ivan Kalvachev wrote:
>>> I wonder why altivec code is written with intrinsics and not written
>>> in assembler.
>>> Is there some technical reason?
> 
> no, patches replacing intrinsics by asm() are welcome!
> 
> 
>> Simpler to manage and debug.
> 
> really? didnt the ffmpeg altivec devels spend a huge amount of time getting
> their code working on gcc 3.? on mac osx as well as linux

Well, the same can be said about x86's inline asm routines. They had
to be adapted for AMD64 support, GCC4.0, OSX, ... and still aren't
properly supported by ICC. Also, there's the know limitation with gcc
2.95 regarding the number of input or clobbers (don't remember which)
that limit the freedom of the ASM routines writer.

On the other hand, except for some dialect differences, AltiVec
instrinsics are well defined and are supposed to be working out of the
box by compilers supporting AltiVec, such as GCC of XLC.

> and all the debuging and bugeports due to gcc miscompiling some of the code

Well, the same can be said about x86 ASM code (I'm referring to the
bug we had on MacIntel that broke vorbis and wma decoding support).


> and the most important intrinsics optimality are at the mercy of gcc and
> we all know how good gcc is at optimizations sometimes


I have to agree with that.

Guillaume




More information about the ffmpeg-devel mailing list