This is probably the first post of a long series. After working for quite some time on the plan of building ffmpeg with the Intel-C-Compiler with VisualStudio (cf. my previous post), I made some good progress.
- ffmpeg builds ok (with all AT&T-inline assembly ported!)
- so far all my tests work ok
- I also ported x264 (used as external codec in ffmpeg)
In retrospect the changes are not too numerous or intrusive. I tried to reduce the changes to a minimum, that will be important in order to integrate updates of ffmpeg.
Porting x264 was easy, at least at first glance. The challenge here was that it relied on a feature that only gcc has to offer afaik (for x86-builds) - it can keep the stack pointer aligned on 16-byte boundaries. Or, as far as my understanding goes, the Intel compiler claims also to be capable of this - but I could not make it work, thus. Either it works differently than in gcc or I made some stupid mistakes. I ended up coding some assembly wrapper that tweaks the stack for the functions which require stack alignment. Maybe I will get around on elaborating on this in a future post.
My testing so far is by far not exhaustive. I ran some quick tests re-coding some footage to MPEG2, H.263, MPEG4 and H.264. For these preliminary tests I get the same results (byte-exact!) as with a "standard" MinGW-gcc-build. The next steps will probably involve porting the ffmpeg-test-suite FATE. I am not yet sure how to address this.
I am planning to post the project (after some polishing) on CodePlex. Meanwhile I found quite a few attempts at the same goal (e.g. Direct264 or here or of course ffdshow-tryouts see here) - but it seems I got a bit further in some respects as they did. E.g. Direct264 did not solve the stack-alignment issue, and ffdshow-tryouts did not port the ffmpeg-assembly code.
At this point I just have a screenshot to make you interested: