Active forum topics
- WMP can't play files at all
- upgrade vista 64 ==> win 7 64 divx disappears but debris in registry
- DivX Connected News
- Subtitles on Xbox 360 MC
- DivX player on OSX creates junk file in Applications directory
- Will installing DivX Player 7 on top of my licensed DivX 6.8 Pro, cause problem with DivX create codec?
- xbox 360 extender not working
DivX, FFDShow, and decoder speed testing

This is the first part of a two-part series of articles about performance of DivX decoder and MPEG-4 decoding in general.
In this article, I will discuss measuring decoder performance and give some general results. Part two (coming soon) will look at variations of decoder performance on different systems (CPU types and clocks, memory, video cards).
Testing Method
First let me describe our approach to decoder speed testing. Those of you less technically minded can skip it and go straight to the next section.
How do you measure speed of a decoder?
The easiest way is simply to play some video clip in a media player and look at CPU usage. This method is quite imprecise, so, at best, we can use it to double-check our results. We need a more scientific approach.
A much better way is to play your video as fast as possible and then record how fast the decoder can play it on this PC (in frames per second). This can be done manually, using a standard DirectShow tool called “graphedit”
There are a few problems with this method. First of all, this method is manual, and it’s time-consuming to do this for multiple clips or combinations of settings. If we want good precision, we have to repeat the process many times and average results by hand.
The biggest disadvantage of graphedit approach lies in the Video Renderer filter. If you have ever benchmarked a 3D video game, you might be familiar with it. Video Renderer may choose to synchronize the decoding process to the refresh rate of the monitor – so-called “vsync”. If it does that, even the best decoder in the world will be unable to surpass monitor refresh rate (typically 60 fps). What’s worse, it seems to be impossible to tell the Video Renderer not to wait for vsync.
The best solution is to implement a tool that does everything for us automatically. The tool and its source can be downloaded here:
It is a command-line tool that accepts the name of a DirectShow filter and any number of AVI files. Using this tool, we can write a batch file that tests several clips and filters at once.
Test Setup
My test system represents a “mid-line” PC, something that’s not too archaic but also does not cost an arm and a leg.
- Pentium D 805 Smithfield, 2.667 GHz
- 1 GB of DDR2 PC3200 memory
- Windows Vista 64-bit
Although this system is based on a dual-core processor, none of the decoders being tested employ multiprocessor optimizations for MPEG-4 decoding, so only one thread is used in all tests.
Four DirectShow decoders are tested:
My test clips are derived from a video sequence “Elephant’s Dream”. I have encoded two fragments of this sequence, one resized to DVD resolution (720x480), the other in full HD (1920x1080). Test clips were encoded using DivX 6.6 encoder in constant-quantizer mode, with adaptive B-frames, without Q-pel or GMC. (Unfortunately, bandwidth constraints don't allow us to publish encoded fragments.)Decoding Performance - Introduction
My first test is to evaluate “typical” decoding speed at commonly used bit rates.
Test sequence 1: 720x480 @ 30 fps, Q=4 (bitrate 1.1 Mbps)

This system is, of course, far more than sufficient to decode MPEG-4 at home theater resolution. Plenty of CPU time is available for other tasks (e.g. postprocessing).
DivX 5.2 is slowest. There’s almost no difference between two versions of FFDShow even though they are separated by 3 years.
Test sequence 2: 1920x1080 @ 30 fps, Q=4 (bitrate approx. 4 Mbps)

At 1080p resolution we’re much closer to loading the system. Note that much more than 30 fps is needed for smooth playback. Your system must be able to read from the disk, decode audio, send data through to the video card, and maintain minimum decoding speed of 30 fps, or it will drop frames.
For comparison purposes, we’ve included the same clip encoded in H.264 at a similar bit rate (CABAC, B-frames, in-loop filter). Advanced features of H.264 clearly come at a price. Assuming that ffdshow’s H.264 is as well optimized as MPEG-4, full featured H.264 is roughly 3 times slower to decode than MPEG-4 at this bit rate.
Bitrate
Does bit rate affect decoding performance?
Bit rate and decoding speed are definitely correlated, but correlation is not very strong. On this PC, 1080p@60 MPEG-4 should be decodable at any reasonable bit rate.
SIMD Instructions
Finally, let’s take a look at the relative impact of different SIMD instruction sets (MMX, SSE …) on decoder performance.
In ffdshow, it is theoretically possible to turn off instruction sets from the configuration dialog. This feature appears to be broken at the present time (turning off all optimizations has negligible effect on decoding framerate). I had to make a custom version of DivX decoder to perform this test.
Most of the speed increase comes from MMX. Overall, MMX-SSE2 optimizations speed up decoding by more than 3x.
Coming Soon
MPEG-4 decoding performance, part 2:
- different CPU types
- different CPU clock frequencies
- impact of system memory speed
- video cards and video memory
- ekuznetsov's blog
- 26700 reads
License Agreement
NO COMMERCIAL USE: This License Agreement grants our community members the right to use the Software downloaded from DivX Labs for personal use only in order to evaluate and provide feedback about it to DivX, Inc. Commercial use of the Software or of the work products resulting from its use is not permitted under the Terms of Use of DivX Labs.- To read the full Terms of Use please visit the Terms of Use page.
- To inquire about commercial licensing please email us


good
good
Good article!
Thanks for the comparison, and the absolute numbers! Do not listen to the nay-sayers, they do not understand anything ...
FFDShow is hand optimized, and actually claims no performance gains beyond MMX :
http://ffdshow-tryout.sourceforge.net/html/en/faq.htm
So the speedup you see for SSE2 in the case of Pentium4 is perhaps due to better memory operations, more than anything else.
Please do post the 2nd part! I am curious if the video card matters at all. Also, do the video cards buffer the frames? Because then if one can do ~30 frames on average, and buffer a few of them, playback should be relatively smooth since local fluctuations will disappear due to the buffered frames. If you could dig up some really old AGP or even PCI video card with 1-8 Mb of RAM, and check what it does, that would be neat!
ffdshow
Please stop bashing ffdshow releases when you know nothing about its history.
From Wikipedia: The main developer was Milan Cutka. When he stopped updating the project in 2006, new maintainers opened the ffdshow-tryouts as a fork, where bugfixes, stability fixes, new features, and codec updates continue. The original ffdshow project can be considered abandoned and dead. The new fork produces weekly builds, compared to the original's annual ones.
The "beta" releases of ffdshow are 99% of the time are completely stable.
I must admit I was skeptical that DivX could provide faster decoding. My own tests agree with yours though :)
I will stick with ffdshow though, given that it decodes every format I need in one very small package, is free for all features, and is open-source :)
Dear comrade, E. Kuznetsov
Hi.
I used a haali's speed benchmark application TIMECODEC with real playback VMR7.
I turned off all apps even firewall and antivirus.
So my results are correct.
Dear Kuzntesov, OPSNR and SSIM aren't going to be higher if sharp is enabled.
This trick doesn't work always the way it supposed to.
Personaly I don't like sharp filter.
And.... ffdshow nick's posprocessing mode has better results. Both. For metrics and visually.
Why I took such low framerate benchmark? Simple, man. It's an old P4 Northwood 2 ghz with DDRI 266 mhz memory.
I don't understand how could you talk about 200-300 fps on my machine and to put in doubt my results?
What is your benchmark for? Single machine, just two video and one man?
To get valid results there should be at least 6-8 different machines AMD and Intel and all kind of MPEG-4 ASP videos?
What kind of estadistics you can recolect just with one CPU and two video?
I would say you : 0.00% estadistic validation of your test.
silyasa
Go back to the top of the tree, and eat the bananas!
frog: I can't replicate your
frog:
I can't replicate your results. In my tests, divx decoder is considerably faster than latest ffdshow on that clip. Besides, your numbers are suspiciously low. It is a 640x480 clip. You should be able to get much more than 75 fps without postprocessing. (I'd expect something in 200-300 fps range) What testing method are you using?
With postprocessing, you're no longer comparing apples & apples. I'm inclined to think that Divx with custom full deblock would give you higher PSNR than ffdshow. If you're enabling sharpening in divx, enable it in ffdshow too.
Decoder's perfomance on P4 2 ghz
P4 2 ghz
These are my results:
Without postprocessing:
TCPMP 0.72 player (CoreASP decoder) - 82.33 fps
FFdshow build from 5 of oct 2007 - 74.1 fps
Divx 6.7 - 65.8 fps
With postprocessing:
FFdshow with Postprocessing ( Mplayer Accurate Deblock H & Deblock V, no dering) - 53.1 fps
Divx 6.7 with custom full deblock - 45.3 fps.
High Quality Postporcessing:
FFdshow with Nick Postprocessing, Deblock H/ V, no dering, no Mplayer - 43.4 fps
Divx 6.7 Full&Sharp - 32.6 fps.
Conclusion
Both visually and for metrics ffdshow has better results.
Divx 6.7 decoder is slower than ffdshow and CoreASP decoders on my system.
Video was from here http://video.stage6.com/1751955/.divx
Lada vs. Mercedes
Yes, you are right!
FFDshow hasn't got official release since 2004.
That is the problem with your test.
beta FFDshow vs. official Divx
Your test is like the race Lada vs. Mercedes.
Would you like a racing in a Lada, when I'm driving a Mercedes?
I don't think ffdshow had
I don't think ffdshow had any official releases since 2004. I'd test against an official release if it existed.
Khmmm...
I draw your attention to it, that the official version not equal with the "tryout beta 3" version. It contains many bugs.
You used for the test the official versions of Divx codec to compare the performance. It's not ethical.
Please use the beta version opposit a beta.