In this post we will build FFmpeg with the Intel-compiler ICL - with the usual configure-/make-scripts. First of all we need a Cygwin-shell with the Intel-compiler on the path. It is easiest to call the batch-file "ipsxe-comp-vars.bat" which is installed with the Intel-compiler. So we put together a simple batch-file something like this:
call C:\Progra~2\Intel\Compos~1\bin\ipsxe-comp-vars.bat ia32 vs2012
chdir /D d:\cygwin\bin
start .\mintty.exe -
Of course you have to substitute your respective paths. Now, when you launch the Cygwin-shell it should look like this:
Let me say beforehand: I tested the following steps with the FFmpeg-sources as of 06/02/2013. The corresponding git-commit-ID is 582f36ca3fb1c69dbe3478f174d36278f5dd3f63. So, if something goes wrong it might because of changes in the FFmpeg-repository. In order to be sure that you get this specific version you need to run this command after downloading the most recent FFmpeg-repository:
git checkout 582f36ca3fb1c69dbe3478f174d36278f5dd3f63
Now, first of all, we need to get the FFmpeg-sources:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
Now download the two patches below:
cygicl.diff (31.31 kb)
inlineassembly.diff (60.75 kb)
The first patch modifies the configure - script, adds some files and applies minimal modifications so that FFmpeg compiles without inline-assembly. The second patch contains more extensive changes to the FFmpeg-code in order to make the inline-assembly work with icl.
I will elaborate on the changes in a latter post, in this post I will just list the steps how to make it compile. Change into the ffmpeg-folder and apply both patches:
patch -p1 < ../cygicl.diff
patch -p1 < ../inlineassembly.diff
Now we still need two more scripts - the first one is a little wrapper for the icl-compiler, and the second is required for executing the FATE-test-suite successfully.
iclwrap.sh (1.53 kb)
tweakpaths.sh (1.30 kb)
Place them to somewhere on the (Cygwin-) path - e.g. /usr/local/bin.
We can now run the configure-script:
./configure --enable-inline-asm --disable-doc --toolchain=cygicl --host-cc=gcc
If you chose to not apply the inlineassembly.diff-patch, then you need to specify --disable-inline-asm. This will take a while and should finish without any errors.
Then we are ready to fire up make - which can be speeded up by allowing it to run multiple compiler-processes concurrently. Something like this might be a good choice:
make -j "$(grep -c processor /proc/cpuinfo)"
Again, this should finish without errors.
Finally, we can run FATE with this command:
make TARGET_EXEC=tweakpaths.sh fate SAMPLES=PATH_TO_FATE_SUITE_SAMPLES -j "$(grep -c processor /proc/cpuinfo)"
Don't forget to give the correct path (where you have place the fate-samples) instead of PATH_TO_FATE_SUITE_SAMPLES.
At least for me (with the latest icl, version 220.127.116.11 build 20130514) all fate-tests pass.