[MPlayer-dev-eng] Optimizing mplayer on MIPS
D Richard Felker III
dalias at aerifal.cx
Fri Dec 12 23:19:05 CET 2003
On Fri, Dec 12, 2003 at 01:20:45PM -0800, Josh Green wrote:
> I sent this first to the MPlayer users list, but realized afterward that
> the development list was probably more appropriate. My apologies if this
> is not the proper list for this topic.
> 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
Of course it's integer-only. The doubles are just for initializing
tables when it's first configured.
> 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.
There is nowhere MPlayer uses floating point in anything
performance-intensive, except a few codecs and perhaps a couple
obscure video filters. The only place it normally uses floats is for
A/V sync (just a few computations per frame).
If you're having performance problems, it's just that your MIPS cpu is
too slow, and you're going to have to get a faster cpu or optimize
parts of MPlayer in MIPS asm. Or...you could get a video device with
hardware colorspace conversion and scaling rather than using fbdev --
this will make a huge performance improvement.
More information about the MPlayer-dev-eng