Intel C Compiler: Difference between revisions
(Add sse2 stack alignment issues) |
(→FFmpeg: Fix wrong facts) |
||
Line 11: | Line 11: | ||
A possible fix would be to define a prologue and epilogue for these functions in libavcodec/x86/x86inc.asm that saves, aligns and restores the stack pointer. | A possible fix would be to define a prologue and epilogue for these functions in libavcodec/x86/x86inc.asm that saves, aligns and restores the stack pointer. | ||
= FFmpeg = | = FFmpeg = | ||
Compilation with icc | Compilation with icc was tested for the following versions: | ||
== 10.1 == | == 10.1 == | ||
=== 10.1 32 bit === | === 10.1 32 bit === | ||
Line 19: | Line 19: | ||
=== 10.1 64 bit === | === 10.1 64 bit === | ||
All versions should be supported and pass regression tests. | All versions should be supported and are expected to pass regression tests. | ||
Note that the iccbin binary itself is a 32 bit executable, seemingly causing trouble on some installations (such as the server running FATE tests for x86_64 / Linux). | Note that the iccbin binary itself is a 32 bit executable, seemingly causing trouble on some installations (such as the server running FATE tests for x86_64 / Linux). | ||
== 11.0 == | == 11.0 == | ||
=== 11.0 32 bit === | === 11.0 32 bit === | ||
All versions should be supported and pass regression tests. | All versions should be supported and are expected to pass regression tests. | ||
=== 11.0 64 bit === | === 11.0 64 bit === | ||
At least 11.0.081 is known to badly compile the following files if optimization is used: | At least 11.0.081 and prior versions are known to fail compiling dsputil_mmx.c and cavsdsp_mmx.c with an internal error. | ||
Additionally, the same issues as with 11.1.023 exist. | |||
== 11.1 Beta == | |||
=== 11.1 32 bit === | |||
If compilation of said sse2 functions is disabled (which will be done if 11.1 is released), 11.1.023 will be supported and is expected to pass regression tests. | |||
=== 11.1 64 bit === | |||
At least 11.1.023 is known to badly compile the following files if optimization is used: | |||
* libavcodec/h263.c | * libavcodec/h263.c | ||
* libavcodec/wmv2dec.c | * libavcodec/wmv2dec.c | ||
Line 32: | Line 38: | ||
:Artefacts are clearly visible. | :Artefacts are clearly visible. | ||
* libavcodec/snow.c | * libavcodec/snow.c | ||
Possible workarounds are to compile these files with -O0, with icc 10.1 or gcc. With one of these workarounds, regression tests pass. | Possible workarounds are to compile these files with -O0, with icc 10.1 or gcc. With one of these workarounds, regression tests are expected to pass. | ||
Earlier beta versions were not able to compile FFmpeg with optimizations enabled: Compilation of dsputil_mmx.c and cavsdsp_mmx.c failed. | |||
= MPlayer = | = MPlayer = | ||
The only additional issue MPlayer has is that it is difficult to compile a 32 bit binary with icc on a 64 bit system because MPlayer's configure script does not test what kind of object file the compiler outputs (and icc does not know the option -m32, but has different binaries for 32 and 64 bit). | The only additional issue MPlayer has is that it is difficult to compile a 32 bit binary with icc on a 64 bit system because MPlayer's configure script does not test what kind of object file the compiler outputs (and icc does not know the option -m32, but has different binaries for 32 and 64 bit). |
Revision as of 04:24, 22 March 2009
Intel sells a C++ compiler for Windows, Linux and OS X that is freely available for non-commercial usage. The Linux version of the compiler can be used to compile binaries of MPlayer and FFmpeg that are known to be slightly more optimized speed-wise than binaries compiled with gcc.
Note that the Windows version of the compiler probably cannot be used to compile useful binaries of FFmpeg, because the Intel compiler uses Microsoft's assembler that does not understand FFmpeg's asm syntax.
Caveats
For 32 bit compilation with icc, the following highly optimized functions for H264 decoding cannot be used due to stack pointer alignment issues. The functions are deactivated for non-beta versions of icc.
- ff_x264_deblock_v_luma_sse2
- ff_x264_deblock_h_luma_sse2
- ff_x264_deblock_v_luma_intra_sse2
- ff_x264_deblock_h_luma_intra_sse2
A possible fix would be to define a prologue and epilogue for these functions in libavcodec/x86/x86inc.asm that saves, aligns and restores the stack pointer.
FFmpeg
Compilation with icc was tested for the following versions:
10.1
10.1 32 bit
Versions prior to 10.1.021 cannot compile the program audiogen, needed for regression tests. A possible workaround is using gcc to compile audiogen:
./configure --cc=icc --host-cc=gcc
10.1.017 is covered by FATE.
10.1 64 bit
All versions should be supported and are expected to pass regression tests. Note that the iccbin binary itself is a 32 bit executable, seemingly causing trouble on some installations (such as the server running FATE tests for x86_64 / Linux).
11.0
11.0 32 bit
All versions should be supported and are expected to pass regression tests.
11.0 64 bit
At least 11.0.081 and prior versions are known to fail compiling dsputil_mmx.c and cavsdsp_mmx.c with an internal error. Additionally, the same issues as with 11.1.023 exist.
11.1 Beta
11.1 32 bit
If compilation of said sse2 functions is disabled (which will be done if 11.1 is released), 11.1.023 will be supported and is expected to pass regression tests.
11.1 64 bit
At least 11.1.023 is known to badly compile the following files if optimization is used:
- libavcodec/h263.c
- libavcodec/wmv2dec.c
- The functon wmv2_pred_motion() gets miscompiled: A printf() after the initialization of *C shows that mot_val, A[], B[] and C[] often differ from compilation with -O0 while xy and wrap are unchanged.
- Artefacts are clearly visible.
- libavcodec/snow.c
Possible workarounds are to compile these files with -O0, with icc 10.1 or gcc. With one of these workarounds, regression tests are expected to pass. Earlier beta versions were not able to compile FFmpeg with optimizations enabled: Compilation of dsputil_mmx.c and cavsdsp_mmx.c failed.
MPlayer
The only additional issue MPlayer has is that it is difficult to compile a 32 bit binary with icc on a 64 bit system because MPlayer's configure script does not test what kind of object file the compiler outputs (and icc does not know the option -m32, but has different binaries for 32 and 64 bit).