[MPlayer-cygwin] Benchmark supported overlay formats and use fastest one

Joey Parrish joey at nicewarrior.org
Thu Apr 22 19:34:34 CEST 2004


On Thu, Apr 22, 2004 at 07:06:12PM +0600, Andrey Sapozhnikov wrote:
> I have found by chance, that mplayer requires nearly twice
> less CPU power with -dr -vf yuy2 parameters on my
> Celeron 800 + ATI Rage IIC AGP card (vo directx).  Investigating
> log I find out that mplayer choose BGR32 by default, although
> it is not optimal from best perfomance point of view.

I have found that many windows boxen do not really support the formats
they report.  For example, my laptop "supports" YV12 overlay, but I get
very poor results with it despite direct rendering and no conversion
filters.  Converting to BGR32, though, I get better performance.  I
suspect that many cards do not actually support YV12 and the drivers do
the conversion themselves.  (badly.)  And just yesterday I discovered
that my best overlay is YVU9.  (YUY2 is just as bad as YV12 here.)

> The similar result I got on another machine (P4 1.7GHz Nvidia
> GeForce2 MX400). it choose YV12 format by default, but yuy2
> is nearly twice faster.

These situations are why I committed the noformat filter.
Add -vf noformat=yv12 and yv12 will never be used.

> Is it possible to benchmark most suitable overlay formats
> automatically and choose fastest one during player startup?

Possible, but very problematic.  I would not be the one to try to
code it.  It makes more sense to briefly test on-site and add one
line to the config file.

> I wanna use mplayer as standalone player on CD with
> presentation video (autorunning after CD is inserted) and
> can not tune player manually because of know nothing about
> hardware it will be run.

I suggest showing up early to the presentation and spend 2 minutes
testing the hardware.  Just check the list of supported formats, then
try BGR32, BGR16, YV12, YUY2, and YVU9.  One of these will be the clear
winner.  If this is not an option, just use noformat=yv12.  I have yet
to find a "supported" YV12 overlay in windows that wasn't slower than
BGR spaces.

YMMV,
--Joey

-- 
"I know Kung Fu." --Darth Vader




More information about the MPlayer-cygwin mailing list