[MPlayer-DOCS] XvMC Faq v2

Ivan Kalvachev ivan at cacad.com
Mon Dec 8 19:14:08 CET 2003


Sorry for the delay, i was waiting response from via.
This version looks perfect, only if it could be plain text... not FAQ...
Maybe later.


Diego Biurrun said:
>  > About S3 pro-savage drivers, i took a look of the files
>  > and they appear to be under some kind of BSD licence.
>
> So they are the only open source drivers?  This should be mentioned
somewhere, we always tend to recommend open source drivers.

The result
FORWARD:
 >   BTW, you can get the Savage and CLE driver binary at
 > http://www.viaarena.com/?PageID=184  and
 > http://www.viaarena.com/?PageID=325.
 >  The attachment are Savage and CLE driver source
 > package, but the CLE is a lite version that does not
 > contain the MPEG2 part.
I may upload these if somebody is interesed. Savage src look like
the one from alan cox's web.
 >   You also can get the latest driver source by filling
 > in an OSD request form at
 > http://www.viaarena.com/?PageID=151.
 >   Any question, please contact me.
 >
 > Best Regards,
 >      Joseph Chan
 > VIA Technologies, Inc.
 > http://www.viatech.com.tw

So under www.s3graphics.com
you can add
  www.viaarena.com
Unfortunalty the site is not accessable for me ATM.
So I cannot say what is what in the links, and the ID
could change in future.

Best Regards
   Ivan Kalvachev
  iive


>
>  > Anyway i removed the link to alan (cox?) web, coz they
>  > do look like offical VIA/S3 drivers. (haven't downloaded
>  > any from s3graphics, probably will do it tommorow)
>
> OK, it would be cool if you could check this.
>
> Diego
>
>
> Hello,
> I'm happy to announce that MPlayer now fully supports XvMC
> acceleration that is provided by XFree86 4.x.x for some video cards.
First question you may have is
>
>
> Q: What is XvMC?
>
> A: X Video Motion Compensation. It is an API that allows some of the
>    decoding functions to be executed by the hardware of the video card
itself. In short, hardware MPEG-2 decoding.
>
>
> Q: But DVB already fully supports hardware decoding of MPEG-1/2, why do
>    I need XvMC?
>
> A: Yes, but a DVB is an add-on card. It can do many more
>    things. It is not cheap. If you are lucky you can use XvMC with your
current video card.
>
>
> Q: Can it decode something else than MPEG-1/2? I want to accelerate
DivX.
>
> A: There is a problem. There are some small modifications in H263+, that
are
>    not supported by the hardware, or by the drivers. It may be possible
to
>    emulate them (by processing one block few times) and this will make
MS-MPEG-4 (DivX3) and MPEG-4 Simple Profile (DivX4) accelerated, too.
Anyway I think that there is no way to emulate qpel, so DivX5 will
definitely need hardware and driver support.
>
>
> Q: Does my video card support it?
>
> A: At the moment I know that: Intel810/815 are supported by the open
>    source driver included in XFree86. Also it is known that
>    i830/845/855 chips do not support XvMC even if they use the same i810
video driver. I can only hope that it will be supported in the future
as Intel usually releases all specifications.
>    http://www.xfree86.org
>    http://www.intel.com
>
>    nVidia provides binary drivers that support XvMC for GeForce4 Ti,
GeForce4 MX and GeForce FX. Only GeForc4 Ti doesn't support IDCT
level acceleration.
>    http://www.nvidia.com
>
>    There is an open source video driver for some S3 Savage chipsets that
also provides XvMC. Maybe some of the official Linux drivers support
it, too.
>    http://www.s3graphics.com/
>
>    ATI video cards from the last 5 years (maybe more) have hardware
acceleration, but I don't know if there is a driver that supports it.
I haven't found the VHA (Video Hardware Acceleration) that the 2 year
old Slashdot article refers to. If you have an ATI card you may
request support for it directly from ATI.
>    http://www.ati.com
>
>
> Q: I want to buy a new video card and I do want to have XvMC support,
>    which one would you recommend me?
>
> A: I can recommend GeForce4 MX video card, as I developed the support
>    on it. It is quite cheap already, and if you don't care about 3D
performance it is the best choice. If you need 3D gaming, then choose
some of the GeForce FX series.
>
>
> Q: I don't want binary drivers, I will use only OSS drivers!
>
> A: So far closed source drivers are the only ones that support IDCT
level
>    acceleration. They avoid the computation of Inverse Discrete Cosine
Transformations by the CPU, thus giving better acceleration.
>    Probably OSS drivers have legal problems.
>
>
> Q: Should I use the CVS version of MPlayer and FFmpeg?
>
> A: Any version after MPlayer-1.0pre1 and FFmpeg-0.4.7 should support
XvMC,
>    but it is always better to use the latest (CVS) version, to be sure
that you have maximum speed and functionality.
>
>
> Q: OK, I run MPlayer configure and it says :
> 	Checking for XvMC ... no
>    What's wrong?
>
> A: At the moment XvMC is disabled by default, you should use the
>    '--enable-xvmc' option.
>
>
> Q: I run ./configure with --enable-xvmc, but it still doesn't detect
>    XvMC. I don't have the nVidia binary driver.
>
> A: At the moment XvMC is separated into a common and a video card
>    specific library. For nVidia it is named libXvMCNVIDIA, for i810 it
is named libI810XvMC, for S3 Savage it should be named
>    savageXvMC. Give the library name, but without the lib prefix, e.g.:
>      ./configure --enable-xvmc --with-xvmclib=I810XvMC
>      ./configure --enable-xvmc --with-xvmclib=savageXvMC
>
>
> Q:Why isn't the library autodetected?
>
> A: How? As I said I810XvMC is included in XFree86 4.x.x, so it will
always
>    be included by default even if you have never seen an i810 video
card. A workaround for this is to query XvMC itself, but this
requires configure to be executed in a running X. Not a good idea.
The right solution is for XFree86 people to make the common library a
wrapper for the specific one.
>
>
> Q: I compiled it, but when I run MPlayer with an MPEG-1/2 file I don't
>    see any speedup. If I give -vo xvmc I get only errors. What should I do?
>
> A: It is tricky for now. You should explicitly specify the video
>    decoder in this way:
>      mplayer -vo xvmc -vc ffmpeg12mc
>
>
> Q: How can I get maximum performance?
>
> A: There are few tips I have numbered them:
>
>   1. Make sure that you have enabled all possible AGP
>      accelerations. XvMC transfers more data and is therefore more
sensitive about AGP speeds.
>
>   2. Data is transferred by DMA (at best), but it takes time. The
>      video card itself is not lighting fast - it needs time to decode
the data, too. So the best is for both CPU and video card to work
in parallel. This could be achieved by a method named buffering
ahead, that unfortunately is not supported by MPlayer. Don't worry
I have created a workaround - you can use it this way:
>
> 	mplayer -vo xvmc:queue -vc ffmpeg12mc
>
>      It will delay first the few frames (you will notice the blue
screen),
>      by storing them in a queue. When the queue is full the displaying
will begin with the first stored frame. Usually this is not an
issue
> (you
>      will miss a few frames from the end). If you wonder why MPlayer
doesn't show the pause symbol when it is obviously paused, don't
forget that the frame with the pause symbol is in the queue, you
will see it very shortly after you unpause.
>
>   3. There are 2 ways XvMC draws OSD, one of them is lightning fast,
>      while the other requires the whole frame to be copied and
>      blended. Of course I got only the second method. You can see which
one you are using by watching MPlayer output. If you have the slow
one, disable the OSD-Timer, this way you won't draw OSD all the
time and the XvMC driver won't make additional
>      copies. Also don't forget to use '-vo xvmc:queue', it makes a big
difference because OSD is drawn in display order, while decoding is
of course in decoding order (MPEG B-Frame reordering).
>
>   4. If you don't have IDCT level acceleration, hardware decoding may
>      be even slower than software decoding. This is because I haven't
yet implemented a proper interface to understand if IDCT is in use.
I had disabled all MMX accelerated software IDCT to prevent IDCT
data to be wrongly permutated (as some algorithms do it to get
better speed).
>      If you believe this is the case, try forcing manually the MMX
> accelerated
>      IDCT by this option: -lavdopts idct=3 (3 - simpleMMX, 4 -
> libmpeg2mmx)
>
>   5. If you don't have IDCT level acceleration and you have a fast CPU
>      you may see decoding becomes slower. This is because XvMC
>      transfers two times more data than the common YV12 overlay. This is
> very video
>      card specific, and there is a little that can be done about it.
>
> Q: I run 'mplayer -benchmark -nosound' but I see that the CPU is not
>    100% used, so I don't get real benchmarks. How can I benchmark it?
>
> A: NVidia driver changes displayed surface/frame only at vertical
>    retrace. This means that the maximum framerate you can achieve is the
same as your monitor vertical refresh rate. The only way this
could
>    be avoided is not to show the surface/frame at all. You can do that
with:
> 	mplayer -vo xvmc:benchmark:queue -vc ffmpeg12mc -nosound -benchmark
>
>
> Q: How can I help development of XvMC?
>
> A: I would like you to send me a letter if you had improved my code in
>    any way. I would like to know if there is some XvMC driver that is
not listed here. Help developing new drivers that support XvMC, if
you have documentation - share it or implement driver by yourself.
Donations are always
> welcome._______________________________________________
> MPlayer-DOCS mailing list
> MPlayer-DOCS at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-docs
>





More information about the MPlayer-DOCS mailing list