Today, DivX Inc. released the new version of its famous video codec. Usually, this is utterly uninteresting news, but not this time: Version 7 is actually not an MPEG-4 ASP codec like its predecessors, but a H.264 one, based on the implementation of MainConcept. This makes the codec a lot more interesting, especially since the decoder part is free (as in beer).
The H.264 software decoder situation on Windows was a bit complicated: There just was no perfect decoder. The InterVideo and CyberLink come only with their respective Blu-ray player applications, the one in QuickTime is complete crap, the Nero one doesn’t want to work in applications other than Nero’s own. So we only had ffdshow, which is open source, cool, but a little bit slow, and CoreAVC, which is blazing fast, but you need to pay for it.
As of today, this problem has been resolved once and for all: DivX 7 is the ultimate H.264 software decoder on Windows, period. I ran a little benchmark today and the results are very impressive: DivX 7 is always faster than CoreAVC, usually about 10% for CABAC sequences. ffdshow, on the other hand, is always slowest and makes the least use of multi-core CPUs.
Explanation of the benchmark methodology
All these benchmarks have been run using GraphEdit, a DirectShow filter graph editor. I let DirectShow create a basic playback graph for the input files, removed all audio stuff, replaced the H.264 decoder filter, turned off timing and minimized the video window. This setup makes DirectShow decode the video track as fast as it can. The resulting frame rate can then be easily read from the properties window of the video renderer.
The tests have been done for single- and multi-threaded mode. Multi-threaded mode is, of course, the default on the Core 2 Duo I used for the benchmark. To simulate a single-core CPU, I changed the CPU affinity mask for the graphedt.exe process so that it uses a single core only and turned of multithreaded decoding off in the decoder’s options window, if possible.
The three sequences I used were just some sequences that lay around on my hard drive.
stargazer is a 720p capture of a demo, encoded with the best x264 options available, including CABAC. The video is practically artifact-free and has a quite high bitrate.
nine is a 1080p trailer downloaded from Apple’s movie trailers site. Although the image size it twice as high, this clip only uses the much less demanding CAVLC encoding scheme and also has a quite low bitrate.
masagin is a 1080p encoding of another demo, again with all conceivable x264 options turned on. This clip has a very high quality and some parts have an extremely high bitrate – the peak value is above 60 Mbps. I don’t have a real Blu-ray clip at hand, but this clip comes closest to what one can expect from a real movie.