[Ffmpeg-devel] MPEG-1/2 decoding benchmarks

Diego Biurrun diego
Wed Apr 27 01:41:50 CEST 2005


Hi!

I have repeated my MPEG-1/2 decoding benchmarks with the latest
revisions of mpeg12.c.

I used a current CVS snapshot of MPlayer for benchmarking with "-vc
ffmpeg12 -quiet -vo null -nosound -benchmark" as common options for
all runs.  Benchmarks were run on the (framebuffer) console, I 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.  I benchmarked separately with the
"-lavdopts fast" option turned on.  Every benchmark was run 10 times
and the best result kept.  Since the process is supposed to be
deterministic, this should be a fair measurement.

I tested revision 1.230 - 1.233 of mpeg12.c, 1.234 had no functional
changes.  Log messages:

1.230 avoid UPDATE_CACHE() in GET_RL_VLC() if not needed
1.231 optimizing non_intra ac coeff decode
1.232 mpeg2_fast_decode_block_intra()
1.233 avoid clearing block[] if its not used at all

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
Debian testing (up to date)
gcc 2.95.4 (Debian)

notebook:
1500MHz G4 with AltiVec
512MB PC2700 (333MHz) DDR SDRAM
Debian testing (up to date)
gcc 3.3.5 (Debian)

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:

K6-III: 1.231 gave a slight speedup (2.3%) in some cases, 1.232 a
slight performance degradation (1.7%) in some cases, no changes in
1.233.

G4: 1.231 gave a slight speedup (1.2%) in some cases, 1.232 a slight
improvement (1.2%) in one case, almost no changes in 1.233.

Diego



Here are the raw numbers:


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

1.230:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.767s VO:   0.002s A:   0.000s Sys:   0.117s =    0.886s
BENCHMARK%: VC: 86.5613% VO:  0.2794% A:  0.0000% Sys: 13.1593% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.329s VO:   0.008s A:   0.000s Sys:   0.401s =    4.739s
BENCHMARK%: VC: 91.3633% VO:  0.1651% A:  0.0000% Sys:  8.4716% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  13.096s VO:   0.005s A:   0.000s Sys:   1.250s =   14.351s
BENCHMARK%: VC: 91.2560% VO:  0.0348% A:  0.0000% Sys:  8.7092% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.741s VO:   0.002s A:   0.000s Sys:   0.118s =    0.861s
BENCHMARK%: VC: 86.0589% VO:  0.2593% A:  0.0000% Sys: 13.6818% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.194s VO:   0.007s A:   0.000s Sys:   0.366s =    4.567s
BENCHMARK%: VC: 91.8374% VO:  0.1504% A:  0.0000% Sys:  8.0122% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  12.140s VO:   0.005s A:   0.000s Sys:   1.253s =   13.399s
BENCHMARK%: VC: 90.6091% VO:  0.0376% A:  0.0000% Sys:  9.3533% = 100.0000%


1.231:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.757s VO:   0.002s A:   0.000s Sys:   0.120s =    0.880s
BENCHMARK%: VC: 86.1142% VO:  0.2701% A:  0.0000% Sys: 13.6157% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.256s VO:   0.007s A:   0.000s Sys:   0.372s =    4.636s
BENCHMARK%: VC: 91.8181% VO:  0.1570% A:  0.0000% Sys:  8.0249% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  12.772s VO:   0.005s A:   0.000s Sys:   1.255s =   14.032s
BENCHMARK%: VC: 91.0222% VO:  0.0346% A:  0.0000% Sys:  8.9433% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.740s VO:   0.003s A:   0.000s Sys:   0.121s =    0.864s
BENCHMARK%: VC: 85.7312% VO:  0.3009% A:  0.0000% Sys: 13.9679% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.173s VO:   0.007s A:   0.000s Sys:   0.384s =    4.565s
BENCHMARK%: VC: 91.4272% VO:  0.1592% A:  0.0000% Sys:  8.4136% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  12.074s VO:   0.005s A:   0.000s Sys:   1.248s =   13.327s
BENCHMARK%: VC: 90.5978% VO:  0.0374% A:  0.0000% Sys:  9.3648% = 100.0000%


1.232:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.755s VO:   0.003s A:   0.000s Sys:   0.115s =    0.872s
BENCHMARK%: VC: 86.5532% VO:  0.2869% A:  0.0000% Sys: 13.1600% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.303s VO:   0.007s A:   0.000s Sys:   0.366s =    4.676s
BENCHMARK%: VC: 92.0314% VO:  0.1393% A:  0.0000% Sys:  7.8293% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  13.017s VO:   0.005s A:   0.000s Sys:   1.248s =   14.270s
BENCHMARK%: VC: 91.2190% VO:  0.0318% A:  0.0000% Sys:  8.7492% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.750s VO:   0.003s A:   0.000s Sys:   0.115s =    0.867s
BENCHMARK%: VC: 86.4108% VO:  0.3270% A:  0.0000% Sys: 13.2623% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.235s VO:   0.008s A:   0.000s Sys:   0.367s =    4.610s
BENCHMARK%: VC: 91.8804% VO:  0.1675% A:  0.0000% Sys:  7.9521% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  12.319s VO:   0.005s A:   0.000s Sys:   1.245s =   13.569s
BENCHMARK%: VC: 90.7899% VO:  0.0354% A:  0.0000% Sys:  9.1747% = 100.0000%


1.233:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.763s VO:   0.002s A:   0.000s Sys:   0.119s =    0.884s

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.290s VO:   0.007s A:   0.000s Sys:   0.373s =    4.671s
BENCHMARK%: VC: 91.8507% VO:  0.1605% A:  0.0000% Sys:  7.9888% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  12.981s VO:   0.005s A:   0.000s Sys:   1.247s =   14.233s
BENCHMARK%: VC: 91.2054% VO:  0.0327% A:  0.0000% Sys:  8.7619% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.751s VO:   0.003s A:   0.000s Sys:   0.119s =    0.873s
BENCHMARK%: VC: 85.9708% VO:  0.3464% A:  0.0000% Sys: 13.6828% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   4.276s VO:   0.008s A:   0.000s Sys:   0.362s =    4.646s
BENCHMARK%: VC: 92.0346% VO:  0.1673% A:  0.0000% Sys:  7.7981% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:  12.291s VO:   0.005s A:   0.000s Sys:   1.246s =   13.542s
BENCHMARK%: VC: 90.7621% VO:  0.0362% A:  0.0000% Sys:  9.2017% = 100.0000%


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

1.230:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.322s VO:   0.001s A:   0.000s Sys:   0.065s =    0.388s
BENCHMARK%: VC: 82.9979% VO:  0.3616% A:  0.0000% Sys: 16.6404% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.755s VO:   0.003s A:   0.000s Sys:   0.158s =    1.916s
BENCHMARK%: VC: 91.5799% VO:  0.1693% A:  0.0000% Sys:  8.2507% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.851s VO:   0.003s A:   0.000s Sys:   0.766s =    6.620s
BENCHMARK%: VC: 88.3842% VO:  0.0422% A:  0.0000% Sys: 11.5737% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.306s VO:   0.001s A:   0.000s Sys:   0.065s =    0.372s
BENCHMARK%: VC: 82.2443% VO:  0.4000% A:  0.0000% Sys: 17.3558% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.710s VO:   0.003s A:   0.000s Sys:   0.157s =    1.870s
BENCHMARK%: VC: 91.4493% VO:  0.1560% A:  0.0000% Sys:  8.3947% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.555s VO:   0.003s A:   0.000s Sys:   0.765s =    6.322s
BENCHMARK%: VC: 87.8600% VO:  0.0467% A:  0.0000% Sys: 12.0933% = 100.0000%

1.231:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.318s VO:   0.002s A:   0.000s Sys:   0.065s =    0.384s
BENCHMARK%: VC: 82.8190% VO:  0.3904% A:  0.0000% Sys: 16.7905% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
ENCHMARKs: VC:   1.752s VO:   0.003s A:   0.000s Sys:   0.162s =    1.917s
BENCHMARK%: VC: 91.3908% VO:  0.1795% A:  0.0000% Sys:  8.4297% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.813s VO:   0.003s A:   0.000s Sys:   0.764s =    6.580s
BENCHMARK%: VC: 88.3431% VO:  0.0473% A:  0.0000% Sys: 11.6096% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.301s VO:   0.001s A:   0.000s Sys:   0.064s =    0.366s
BENCHMARK%: VC: 82.0236% VO:  0.3869% A:  0.0000% Sys: 17.5894% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.708s VO:   0.003s A:   0.000s Sys:   0.160s =    1.871s
BENCHMARK%: VC: 91.2674% VO:  0.1611% A:  0.0000% Sys:  8.5715% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.472s VO:   0.003s A:   0.000s Sys:   0.765s =    6.240s
BENCHMARK%: VC: 87.6865% VO:  0.0475% A:  0.0000% Sys: 12.2660% = 100.0000%

1.232:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.318s VO:   0.001s A:   0.000s Sys:   0.064s =    0.384s
BENCHMARK%: VC: 82.8557% VO:  0.3629% A:  0.0000% Sys: 16.7814% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.736s VO:   0.003s A:   0.000s Sys:   0.162s =    1.901s
BENCHMARK%: VC: 91.3084% VO:  0.1663% A:  0.0000% Sys:  8.5252% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.794s VO:   0.003s A:   0.000s Sys:   0.765s =    6.562s
BENCHMARK%: VC: 88.2966% VO:  0.0430% A:  0.0000% Sys: 11.6603% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.300s VO:   0.001s A:   0.000s Sys:   0.065s =    0.366s
BENCHMARK%: VC: 81.9985% VO:  0.3761% A:  0.0000% Sys: 17.6254% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.689s VO:   0.003s A:   0.000s Sys:   0.157s =    1.849s
BENCHMARK%: VC: 91.3421% VO:  0.1492% A:  0.0000% Sys:  8.5087% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.455s VO:   0.003s A:   0.000s Sys:   0.765s =    6.223s
BENCHMARK%: VC: 87.6639% VO:  0.0464% A:  0.0000% Sys: 12.2897% = 100.0000%

1.233:
~~~~~~

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.317s VO:   0.001s A:   0.000s Sys:   0.064s =    0.383s
BENCHMARK%: VC: 82.7905% VO:  0.3877% A:  0.0000% Sys: 16.8218% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.724s VO:   0.003s A:   0.000s Sys:   0.164s =    1.891s
BENCHMARK%: VC: 91.1518% VO:  0.1577% A:  0.0000% Sys:  8.6905% = 100.0000%

mplayer -vc ffmpeg12 -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.769s VO:   0.003s A:   0.000s Sys:   0.770s =    6.542s
BENCHMARK%: VC: 88.1854% VO:  0.0475% A:  0.0000% Sys: 11.7671% = 100.0000%


mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark bomb.mpeg
BENCHMARKs: VC:   0.299s VO:   0.001s A:   0.000s Sys:   0.064s =    0.365s
BENCHMARK%: VC: 81.9638% VO:  0.3892% A:  0.0000% Sys: 17.6469% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark heist60.mpeg
BENCHMARKs: VC:   1.686s VO:   0.003s A:   0.000s Sys:   0.160s =    1.849s
BENCHMARK%: VC: 91.1841% VO:  0.1595% A:  0.0000% Sys:  8.6565% = 100.0000%

mplayer -vc ffmpeg12 -lavdopts fast -quiet -vo null -nosound -benchmark dvd.mpeg
BENCHMARKs: VC:   5.421s VO:   0.003s A:   0.000s Sys:   0.767s =    6.191s
BENCHMARK%: VC: 87.5587% VO:  0.0478% A:  0.0000% Sys: 12.3935% = 100.0000%





More information about the ffmpeg-devel mailing list