[FFmpeg-devel] Patch: Inline asm fixes for Intel compiler on Windows

Matt Oliver protogonoi at gmail.com
Sat Dec 28 01:35:31 CET 2013

I made a patch that changes some of the inline asm found in FFmpeg so that
it will compile under windows natively using the Intel compiler. The Intel
compiler supports AT&T inline assembly syntax but doesnt have all the
functionality that GAS has. A result is that a few things need to be
slightly tweaked. Mostly this just involves changing direct symbol
references to asm-interfaces.

The attached patch should not change the functionality of FFmpeg in any way
as it just changes the syntax of some instructions so that it will compile.

That said there are a few sections where the code required slightly more
complicated changes in order to work. These are x86/cabac.h in the
BRANCHLESS_GET_CABAC macro and mlpdsp.c. The macro in cabac.h just requires
some slightly more complicated asm-interface conversions that someone more
familiar with the code may want to have a look at. mlpdsp.c uses some
runtime jump lists that would require an almost complete rewrite to work on
Intel which is probably not worth it. So at the moment both of these are
simply skipped if the Intel compile is detected. All other asm works fine

Code was compiled on Windows in Intel and using gcc 4.8 to ensure
compatibility. All code was tested and past FATE.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-inline-asm-intel-windows.patch
Type: application/octet-stream
Size: 117197 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131228/01e36c75/attachment.obj>

More information about the ffmpeg-devel mailing list