[MPlayer-users] Optimizing mplayer on MIPS

Josh Green jgreen at users.sourceforge.net
Thu Dec 11 02:29:51 CET 2003


I emailed this list a while back concerning running MPlayer on a MIPS
development board that lacks an FPU. The information I received at the
time about most video decoders being implemented with integer math
proved very helpful, and after switching to libmad for integer only MP3
audio decoding things are much better.
I'm still running into some performance issues though and I haven't yet
been able to track down what exactly is causing it. I just recently
discovered that outputting video to the fbdev takes a huge amount of CPU
time compared to -vo null. This is probably due to the software scaler
which is used to do color space conversion (and sometimes aspect ratio
correction). I've looked briefly over the swscale.c source file and it
seems there is some usage of doubles in there. I have yet to get a
profiler working on this system so I'm discovering things somewhat
blindly at the moment. Does anyone on this list know if there is a
scaler implemented in integer only math? If anyone has any other tips on
areas that might be using lots of floating point I would appreciate the
info. I would also be interested in knowing what kind of performance
others have been getting with FPU/MMX-less systems.

Here are some benchmarks I performed if anyone is interested. The
benchmark.avi is a 640x480 MPEG PES 23.976 fps 1800 kbps file I encoded
from DIVX to MPEG 1 using mencoder. The test was done on 1200 frames of
video without sound (which should come out to 50 seconds of wall clock
video).

NULL video
----------

mplayer -nosound -benchmark -vo null -frames 1200 benchmark.avi

BENCHMARKs: VC:   0.063s VO:   0.072s A:   0.000s Sys:   3.515s =   
3.650s
BENCHMARK%: VC:  1.7293% VO:  1.9688% A:  0.0000% Sys: 96.3019% =
100.0000%


FBdev video
-----------
mplayer -nosound -benchmark -frames 1200 benchmark.avi

BENCHMARKs: VC:  35.265s VO:  24.540s A:   0.000s Sys:   1.524s =  
61.329s
BENCHMARK%: VC: 57.5019% VO: 40.0132% A:  0.0000% Sys:  2.4849% =
100.0000%


So with NULL video it takes 3.65 seconds to decode 50 seconds worth of
video. With FBdev video output it takes 61.329 seconds! (16.8 times as
long). Using other codecs like MPEG 4 yield rather poor results with
this platform, anyone know of some rough minimum specs to decode
different types of video? Thanks in advance for any advice or
information. Cheers.
	Josh Green



More information about the MPlayer-users mailing list