[Intel-gfx] CPU utilization higher with XvMC than with Xv?

Colin Alie calie at uwaterloo.ca
Fri Oct 7 20:44:58 CEST 2011


Hello,

I have a Dell XPS laptop with a GMA X3100 graphics core (GM965 chipset).
My understanding is that this core supports MPEG-2 offloading and I'm
trying to make use of this feature.

Enabling XvMC:
--------------
I added the following ilne to the "Device" section of xorg.conf:
	Option	"XvMC"	"True"

and, as per instructions in the intel(4) manpage, I
modified /etc/X11/XvMCConfig so that it contains the following text:

/usr/lib/libIntelXvMC.so

Running grep -i xvmc /var/log/Xorg.0.log returns the following:
(**) intel(0): Option "XvMC" "True"
(**) intel(0): Intel XvMC decoder enabled
(II) intel(0): [XvMC] i965_xvmc driver initialized.

So, to me, it looks like XvMC is enabled.

Comparing performance with and without XvMC:
--------------------------------------------
For testing, I used a 23 minute video ripped from a DVD and mplayer
using either the Xv or XvMC video output drivers:
1. With Xv:  mplayer mpeg2_video.vob -vo xv -vc ffmpeg12

2. With XvMC:  mplayer mpeg2_video.vob -vo xvmc -vc ffmpeg12mc

Surprisingly, I found CPU utilization to be 50% higher using XvMC as
compared to Xv.  I ran mplayer in 'benchmark' mode and the results were
as follows:

Xv:  mplayer mpeg2_video.vob -vo xv -vc ffmpeg12 -benchmark -nosound
BENCHMARKs: VC:  65.663s VO:  12.854s A:   0.000s Sys:   5.593s =
84.110s
BENCHMARK%: VC: 78.0679% VO: 15.2819% A:  0.0000% Sys:  6.6502% =
100.0000%

XvMC:  mplayer mpeg2_video.vob -vo xvmc -vc ffmpeg12mc -benchmark
-nosound
BENCHMARKs: VC: 496.898s VO:   0.991s A:   0.000s Sys:   6.890s =
504.779s
BENCHMARK%: VC: 98.4389% VO:  0.1963% A:  0.0000% Sys:  1.3649% =
100.0000%

I note that with XvMC, it takes 6x the CPU time to decode the video but
1/12th the CPU time to display the video.  What, if anything, can be
deduced from these results regarding XvMC?  Is it working?

I'm running Ubuntu 10.04 LTS.  Versions for key software on the system
is as follows.
- kernel 2.6.32
- 3D driver:  mesa 7.7.1
- 2D driver:  xserver-xorg-video-intel 2.13.0
- Libdrm:  libdrm-intel1 2.4.18
- xserver:  X.Org 1.7.6
- mplayer: SVN-r1.0~rc3+svn20090426-4.4.3
- xine:  v0.99.6cvs

Thanks in advance for your help!

Until next time, Colin.

Note that I tried to assess XvMC using xine however xine segfaulted when
I attempted to playback video using the xvmc video driver.





More information about the Intel-gfx mailing list