[MPlayer-dev-eng] MPEG-1/2 decoding benchmarks

Diego Biurrun diego at biurrun.de
Mon Apr 18 15:06:44 CEST 2005


Hi everybody!

Some time ago I promised to benchmark libmpeg2 0.3.1 vs 0.4.0 and here
are the numbers finally.  I've included FFmpeg as well while I was at
it.

I repeated every benchmark run 10 times and took the best result.
Since the process is (supposedly) deterministic, this should be a fair
measurement.  I used "-quiet -vo null -nosound -benchmark" as common
options for all runs, they are left out below.  I ran the benchmarks
on the (framebuffer) console and stopped all processes except syslogd,
klogd and getty while running the benchmarks, no console output was
generated, I used

mplayer <options> <file> | grep BENCHMARK >> results

to record the benchmarking results.  For FFmpeg I also benchmarked
with "-lavdopts idct=4 and "-lavdopts fast".

I used 1.0pre7 for the libmpeg2 0.4.0 and FFmpeg benchmarks, for
libmpeg2 0.3.1 I used pre7 as well but replaced the libmpeg2 directory
and vd_libmpeg2.c with the version from the 20040801 CVS snapshot, a
day before the upgrade.

The movies I used can be found in

http://mplayerhq.hu/~diego/benchmarks/

they were:

bomb.mpeg    - MPEG-1 176x144
heist60.mpeg - MPEG-1 352x240
dvd.mpeg     - MPEG-2 720x576

I tested on two different systems, my desktop and notebook

desktop:
500MHz AMD K6-III+
512MB SD-RAM 133

notebook:
1500MHz G4 with AltiVec
512MB PC2700 (333MHz) DDR SDRAM

If you have further suggestions or things I should do differently,
speak up.  I _could_ also test on a Pentium MMX 233, but I doubt the
numbers will be very interesting, it's probably better if somebody
tries a more modern processor.


RESULTS:

The difference between libmpeg2 0.3.1 and 0.4.0 is below 1% so I would
say it is negligible.  0.4.0 is faster on 2 samples on AMD, slower for
all samples on the G4, but far less than 1%, so probably well within
the margin of error.

FFmpeg is slower than libmpeg2 on both architectures, "-lavdopts
idct=4" helps a bit, "-lavdopts fast" helps some more, on the G4
"-lavdopts idct=4" is a very bad idea, it makes performance drop to
about 50%.


Diego



Here are the raw numbers:


###############
# AMD K6-III+ #
###############

_______________
libmpeg2 0.3.1:
~~~~~~~~~~~~~~~

mplayer -vc mpeg12 bomb.mpeg
BENCHMARKs: VC:   0.660s VO:   0.003s A:   0.000s Sys:   0.114s =    0.776s
BENCHMARKs: VC:   0.720s VO:   0.003s A:   0.000s Sys:   0.118s =    0.841s

mplayer -vc mpeg12 heist60.mpeg
BENCHMARKs: VC:   3.923s VO:   0.011s A:   0.000s Sys:   0.386s =    4.320s
BENCHMARK%: VC: 90.8219% VO:  0.2459% A:  0.0000% Sys:  8.9323% = 100.0000%

mplayer -vc mpeg12 dvd.mpeg
BENCHMARKs: VC:  12.402s VO:   0.007s A:   0.000s Sys:   1.295s =   13.704s
BENCHMARK%: VC: 90.4994% VO:  0.0498% A:  0.0000% Sys:  9.4509% = 100.0000%

_______________
libmpeg2 0.4.0:
~~~~~~~~~~~~~~~

mplayer -vc mpeg12 bomb.mpeg
BENCHMARKs: VC:   0.650s VO:   0.003s A:   0.000s Sys:   0.113s =    0.766s
BENCHMARK%: VC: 84.8315% VO:  0.3958% A:  0.0000% Sys: 14.7727% = 100.0000%

mplayer -vc mpeg12 heist60.mpeg
BENCHMARKs: VC:   3.960s VO:   0.011s A:   0.000s Sys:   0.374s =    4.346s
BENCHMARK%: VC: 91.1233% VO:  0.2630% A:  0.0000% Sys:  8.6136% = 100.0000%

mplayer -vc mpeg12 dvd.mpeg
BENCHMARKs: VC:  12.444s VO:   0.007s A:   0.000s Sys:   1.248s =   13.700s
BENCHMARK%: VC: 90.8354% VO:  0.0529% A:  0.0000% Sys:  9.1117% = 100.0000%


_______
FFmpeg:
~~~~~~~

mplayer -vc ffmpeg12 bomb.mpeg
BENCHMARKs: VC:   0.753s VO:   0.002s A:   0.000s Sys:   0.123s =    0.878s
BENCHMARK%: VC: 85.6920% VO:  0.2578% A:  0.0000% Sys: 14.0502% = 100.0000%

mplayer -vc ffmpeg12 heist60.mpeg
BENCHMARKs: VC:   4.162s VO:   0.006s A:   0.000s Sys:   0.364s =    4.532s
BENCHMARK%: VC: 91.8409% VO:  0.1228% A:  0.0000% Sys:  8.0363% = 100.0000%

mplayer -vc ffmpeg12 dvd.mpeg
BENCHMARKs: VC:  12.746s VO:   0.005s A:   0.000s Sys:   1.262s =   14.013s
BENCHMARK%: VC: 90.9583% VO:  0.0344% A:  0.0000% Sys:  9.0073% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts idct=4 bomb.mpeg
BENCHMARKs: VC:   0.751s VO:   0.002s A:   0.000s Sys:   0.114s =    0.868s
BENCHMARK%: VC: 86.5867% VO:  0.2487% A:  0.0000% Sys: 13.1646% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts idct=4 heist60.mpeg
BENCHMARKs: VC:   4.360s VO:   0.006s A:   0.000s Sys:   0.351s =    4.717s
BENCHMARK%: VC: 92.4306% VO:  0.1288% A:  0.0000% Sys:  7.4406% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts idct=4 dvd.mpeg
BENCHMARKs: VC:  12.698s VO:   0.004s A:   0.000s Sys:   1.230s =   13.933s
BENCHMARK%: VC: 91.1389% VO:  0.0320% A:  0.0000% Sys:  8.8291% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast bomb.mpeg
BENCHMARKs: VC:   0.720s VO:   0.003s A:   0.000s Sys:   0.113s =    0.836s
BENCHMARK%: VC: 86.1145% VO:  0.3063% A:  0.0000% Sys: 13.5793% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast heist60.mpeg
BENCHMARKs: VC:   4.125s VO:   0.007s A:   0.000s Sys:   0.361s =    4.493s
BENCHMARK%: VC: 91.8070% VO:  0.1573% A:  0.0000% Sys:  8.0357% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast dvd.mpeg
BENCHMARKs: VC:  12.230s VO:   0.005s A:   0.000s Sys:   1.233s =   13.468s
BENCHMARK%: VC: 90.8048% VO:  0.0367% A:  0.0000% Sys:  9.1585% = 100.0000%



###############
# Motorola G4 #
###############

_______________
libmpeg2 0.3.1:
~~~~~~~~~~~~~~~

mplayer -vc mpeg12 bomb.mpeg
BENCHMARKs: VC:   0.275s VO:   0.001s A:   0.000s Sys:   0.063s =    0.340s
BENCHMARK%: VC: 80.9037% VO:  0.4282% A:  0.0000% Sys: 18.6681% = 100.0000%

mplayer -vc mpeg12 heist60.mpeg
BENCHMARKs: VC:   1.280s VO:   0.003s A:   0.000s Sys:   0.167s =    1.450s
BENCHMARK%: VC: 88.2528% VO:  0.2275% A:  0.0000% Sys: 11.5197% = 100.0000%

mplayer -vc mpeg12 dvd.mpeg
BENCHMARKs: VC:   5.588s VO:   0.004s A:   0.000s Sys:   0.770s =    6.362s
BENCHMARK%: VC: 87.8402% VO:  0.0587% A:  0.0000% Sys: 12.1011% = 100.0000%

_______________
libmpeg2 0.4.0:
~~~~~~~~~~~~~~~

mplayer -vc mpeg12 bomb.mpeg
BENCHMARKs: VC:   0.279s VO:   0.001s A:   0.000s Sys:   0.063s =    0.344s
BENCHMARK%: VC: 81.2235% VO:  0.4216% A:  0.0000% Sys: 18.3548% = 100.0000%

mplayer -vc mpeg12 heist60.mpeg
BENCHMARKs: VC:   1.289s VO:   0.004s A:   0.000s Sys:   0.167s =    1.459s
BENCHMARK%: VC: 88.3268% VO:  0.2404% A:  0.0000% Sys: 11.4327% = 100.0000%

mplayer -vc mpeg12 dvd.mpeg
BENCHMARKs: VC:   5.655s VO:   0.004s A:   0.000s Sys:   0.755s =    6.414s
BENCHMARK%: VC: 88.1705% VO:  0.0639% A:  0.0000% Sys: 11.7656% = 100.0000%


_______
FFmpeg:
~~~~~~~

mplayer -vc ffmpeg12 bomb.mpeg
BENCHMARKs: VC:   0.322s VO:   0.001s A:   0.000s Sys:   0.064s =    0.387s
BENCHMARK%: VC: 83.2010% VO:  0.3697% A:  0.0000% Sys: 16.4294% = 100.0000%

mplayer -vc ffmpeg12 heist60.mpeg
BENCHMARKs: VC:   1.769s VO:   0.003s A:   0.000s Sys:   0.163s =    1.935s
BENCHMARK%: VC: 91.4486% VO:  0.1436% A:  0.0000% Sys:  8.4078% = 100.0000%

mplayer -vc ffmpeg12 dvd.mpeg
BENCHMARKs: VC:   5.903s VO:   0.003s A:   0.000s Sys:   0.761s =    6.667s
BENCHMARK%: VC: 88.5474% VO:  0.0406% A:  0.0000% Sys: 11.4119% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts idct=4 bomb.mpeg
BENCHMARKs: VC:   0.647s VO:   0.001s A:   0.000s Sys:   0.064s =    0.712s
BENCHMARK%: VC: 90.8539% VO:  0.2087% A:  0.0000% Sys:  8.9374% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts idct=4 heist60.mpeg
BENCHMARKs: VC:   3.240s VO:   0.003s A:   0.000s Sys:   0.161s =    3.404s
BENCHMARK%: VC: 95.1799% VO:  0.0925% A:  0.0000% Sys:  4.7275% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts idct=4 dvd.mpeg
BENCHMARKs: VC:  11.442s VO:   0.003s A:   0.000s Sys:   0.761s =   12.206s
BENCHMARK%: VC: 93.7408% VO:  0.0245% A:  0.0000% Sys:  6.2347% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast bomb.mpeg
BENCHMARKs: VC:   0.304s VO:   0.002s A:   0.000s Sys:   0.064s =    0.369s
BENCHMARK%: VC: 82.3585% VO:  0.4081% A:  0.0000% Sys: 17.2334% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast heist60.mpeg
BENCHMARKs: VC:   1.724s VO:   0.003s A:   0.000s Sys:   0.160s =    1.887s
BENCHMARK%: VC: 91.3591% VO:  0.1516% A:  0.0000% Sys:  8.4893% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast dvd.mpeg
BENCHMARKs: VC:   5.635s VO:   0.003s A:   0.000s Sys:   0.761s =    6.399s
BENCHMARK%: VC: 88.0655% VO:  0.0448% A:  0.0000% Sys: 11.8897% = 100.0000%




More information about the MPlayer-dev-eng mailing list