[FFmpeg-devel] [PATCH] ff_scalarproduct_float_sse

David Conrad lessen42
Wed Jan 20 21:43:23 CET 2010

On Jan 20, 2010, at 9:19 AM, Michael Niedermayer wrote:

> On Tue, Jan 19, 2010 at 11:42:40PM -0500, Alex Converse wrote:
>> This cause a >50% decrease in SBR decode time.
>> For the time being it can help in the other places where
>> scalarproduct_float() is used.
>> Regards,
>> Alex Converse
>> dsputil_mmx.c    |    5 +++++
>> dsputil_yasm.asm |   25 +++++++++++++++++++++++++
> Would you mind to avoid yasm and use gcc asm instead ?
> I have no problem with yasm as such but gcc asm is more portable and
> can be integrated with C code if we ever want that.

I'd argue that it's less portable given that the majority of the compiler bugs I've encountered stem from inline asm. In fact, right now llvm svn trips on two separate inline asm bugs on x86-32, and llvm-gcc on another on x86-64. And gcc-4.2 and later have several silent miscompilations and register allocation failure with inline asm on x86-32 OS X when using PIC.

Inline asm also gives the compiler more room to add unneeded code, for instance setting up the PIC base register, moving arguments around in registers, suboptimal addressing for memory arguments, needless stack allocation, etc.

More information about the ffmpeg-devel mailing list