[Mplayer-advusers] Bug? Anomalous CPU usage when playing HDTV clips.

John Stebbins stebbins at jetheaddev.com
Fri Apr 2 22:46:59 CEST 2004


Thanks for the tip about -benchmark.  I hadn't seen that
option.  Very useful.

I've been using various fedora releases.  The laptop started out
on fedora core 1.  Its now got fedora 2 test 2 with kernel 2.6.3
and xorg X11.

glxinfo:
glx version 1.2
OpenGL version 1.3 Mesa 5.0.2
glu verion 1.3

About the YV12->RGB conversion, perhaps we were measuring the % 
differently.  When using -benchmark, the time difference (VC) is
14s for x11 vs. 10s for xv, which would be more like 40%.  But
if looked at as %cpu usaged when playback is at normal speed, the
difference in %cpu usaged is only a few % (like around 5).

What's disturbing me is the time difference for VO.  I get 7s
for x11 vs. 21s for xv.  Total play times are 22s for x11 vs. 32s
for xv.  Total time using XV is always longer than with x11 
in these tests.

This has been a good thought exerciser for me.  I just remembered
that I have been purposely excluding scaling from my tests so
as to narrow the variables.  I just re-ran several of the same
tests, scaling to fullscreen.  When I do this, x11 gets dramatically
slower, while XV stays about the same.

So, I think what I'm seeing could be one of 2 subtly different things.

1. XV has an overhead per frame (which is dependent on image size)
that exceeds (by 4x) the amount of time mplayer can do color space 
conversion in.

or

2. Mplayer does color conversion about 4 times faster than XV.

In either case, XV scales images essentially infinitely fast.

I don't see any options that would allow me to force color
conversion in software by mplayer and still use XV for scaling output.
Aside from hacking on the code, I don't see a way to distinguish
these possibilities.

Any ideas?
John

On Fri, 2004-04-02 at 07:56, Reimar Döffinger wrote:
> Hi,
> 
> > Do you know of a way to find out what size textures the
> > graphics card supports?  It appears that the max is 1024x1024
> > since mplayer reports using 2x1 1024x1024 textures for
> > the 1280x720 size clip. So you're correct about the white
> > screen behavior with the gl driver.
> If you have Windows on the notebook as well, the GLinfo tool from 
> http://www.delphi3d.net/hardware/ might help (didn't try it myself).
> 
> In addition for your original problem the output of xvinfo might be 
> interesting as well.
> 
> > To test the memory bandwidth theory, I ran some lower resolution
> > clips.  One is 1024x576, which requires a 1024x1024 texture.
> > The other is 720x404 and requires a 1024x512 texture.
> > Both clips are 30fps.
> > 
> > With gl2 driver:
> > 1024x576 clip runs slow, and does not consume all available CPU.
> 
> What system configuration do you use (kernel version and GL driver 
> type/version, glinfo or glxinfo might help). I tend to think that your 
> CPU usage infomation isn't correct -  I heard that especially notebooks 
> can give you trouble here.
> Especially that xv and x11 vos give the same CPU usage seems very wrong 
> to me, as the YV12->RGB conversion that is needed for x11 even a 2.4 GHz 
> CPU can't do that easily (on my Athlon with 800Mhz it makes a difference 
> of at least 8% CPU usage for a 352x288 clip!)
> 
> > 720x404 clip playback speed is correct.
> > 
> > With gl driver:
> > Both clips play back at proper speed.
> 
> You might find -nosound -benchmark useful for testing.
> 
> > Hope this is useful information for you.  If you would like a
> > a copy of the 1024x576 clip to run any tests yourself, there's
> > probably some way we can figure out to make it available.  Its 14M.
> > (Smaller than some M$ turd documents I've sent via e-mail :-P)
> 
> I used -vf expand for testing - this should be even better as it puts 
> additional load mostly onto the vo modules
> 
> Greetings,
> Reimar Döffinger
> 
> _______________________________________________
> Mplayer-advusers mailing list
> Mplayer-advusers at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-advusers




More information about the MPlayer-advusers mailing list