[MPlayer-dev-eng] improving dvd performance

D Richard Felker III dalias at aerifal.cx
Sun Apr 7 19:57:22 CEST 2002


i'm trying to figure out how to improve dvd performance with mplayer.
right now, the areas i'm looking at are...

1. ac3 audio playback. mplayer consistently shows nearly 40% cpu time
being used for audio on my k6/2-450. if this were a more reasonable
number (e.g. with -nosound :), i would have no problem playing dvds
full speed with no framedrop. does liba52 spend time decoding surround
stuff, etc. even when only 2 output channels are available? is there
something else super inefficient it does that could use some
optimization, or is decoding ac3 just that slow?

2. letterbox black borders. between decoding and copying (especially
copying, since memory bandwidth is a major bottleneck on a computer
like mine), i figure this wastes a good bit of time. interestingly,
using the new crop filter seems to help slightly:

crop (720:368:0:56)
BENCHMARKs: VC:  27.138s VO:   9.324s A:   0.000s Sys:  15.958s = 52.421s
BENCHMARK%: VC: 51.7695% VO: 17.7876% A:  0.0000% Sys: 30.4429% = 100.0000%

no crop
BENCHMARKs: VC:  33.126s VO:   4.126s A:   0.000s Sys:  15.993s = 53.245s
BENCHMARK%: VC: 62.2145% VO:  7.7490% A:  0.0000% Sys: 30.0365% = 100.0000%

i haven't read the crop code yet but i guess it manages to do its
stuff without extra copying. however, i would expect a good deal more
benefit could be gained by hacking libmpeg2 to support entirely
ignoring the top and bottom few lines of mb's. i tried a few quick and
dirty naive hacks in libmpeg2 to do this, but i'm not really sure
where such code belongs. any suggestions?


rich






More information about the MPlayer-dev-eng mailing list