2001-03-18 17:57:49 +00:00
|
|
|
|
|
|
|
Videocards with hardware acceleration:
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* read DOCS/MTRR too!
|
|
|
|
|
|
|
|
"Hardware acceleration" usually means hardware YUV conversion, scaling,
|
2001-03-18 19:27:28 +00:00
|
|
|
bilinear filtering. Under Linux, there are several ways to access it:
|
|
|
|
|
2001-03-18 22:12:33 +00:00
|
|
|
I. The Xv (XVideo) extension of XFree86 4.0.2
|
2001-03-18 20:41:46 +00:00
|
|
|
II. OpenGL drivers with glTexSubImage() support (currently the Utah-GLX
|
|
|
|
drivers)
|
|
|
|
III. Native card-specific drivers, using special abilities of some cards
|
|
|
|
IV. DGA - direct graphic access. no YUV & scaling, but faster than raw X11
|
2001-04-15 11:48:21 +00:00
|
|
|
V. Not really acceleration, but...
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
Now, let's see them in details:
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
I. Under XFree86 4.0.2 or newer, using the XVideo extension:
|
2001-03-18 19:27:28 +00:00
|
|
|
this is what the option '-vo xv' uses.
|
|
|
|
|
|
|
|
In order to make this work, be sure to check the following:
|
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
1. You use XFree86 4.0.2 or newer (former versions don't have XVideo)
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
2. Your card actually supports harware acceleration (modern cards do)
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 17:57:49 +00:00
|
|
|
3. X loads the XVideo extension, it's something like this:
|
|
|
|
(II) Loading extension XVideo
|
|
|
|
in /var/log/XFree86.0.log
|
2001-03-18 20:41:46 +00:00
|
|
|
NOTE : this loads only the XFree86's extension. In a good install, this is
|
2001-03-18 17:57:49 +00:00
|
|
|
always loaded, and doesn't mean that the _card's_ XVideo support is
|
|
|
|
loaded!
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
4. Your card has Xv support under Linux. To check, try 'xvinfo', it is the
|
2001-03-18 19:27:28 +00:00
|
|
|
part of the XFree86 distribution. It should display a long text, similar
|
|
|
|
to this:
|
2001-03-18 17:57:49 +00:00
|
|
|
|
|
|
|
X-Video Extension version 2.2
|
|
|
|
screen #0
|
|
|
|
Adaptor #0: "Savage Streams Engine"
|
|
|
|
number of ports: 1
|
|
|
|
port base: 43
|
|
|
|
operations supported: PutImage
|
|
|
|
supported visuals:
|
|
|
|
depth 16, visualID 0x22
|
|
|
|
depth 16, visualID 0x23
|
|
|
|
number of attributes: 5
|
2001-03-18 20:41:46 +00:00
|
|
|
(...)
|
|
|
|
Number of image formats: 7
|
|
|
|
id: 0x32595559 (YUY2)
|
|
|
|
guid: 59555932-0000-0010-8000-00aa00389b71
|
|
|
|
bits per pixel: 16
|
|
|
|
number of planes: 1
|
|
|
|
type: YUV (packed)
|
|
|
|
id: 0x32315659 (YV12)
|
|
|
|
guid: 59563132-0000-0010-8000-00aa00389b71
|
|
|
|
bits per pixel: 12
|
|
|
|
number of planes: 3
|
|
|
|
type: YUV (planar)
|
2001-03-18 17:57:49 +00:00
|
|
|
(...etc...)
|
2001-03-18 19:27:28 +00:00
|
|
|
|
|
|
|
It must support YUY2 packed, and YV12 planar pixel formats to be
|
|
|
|
usable with MPlayer.
|
|
|
|
|
2001-03-18 17:57:49 +00:00
|
|
|
5. Be sure MPlayer is compiled with the "xv" target. "./configure" should say:
|
|
|
|
Checking for Xv ... yes
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 17:57:49 +00:00
|
|
|
6. If all is fine, try the option '-vo xv' . It should work.
|
|
|
|
(if it doesn't, send us a bugreport. See the README on how to do this.)
|
|
|
|
|
|
|
|
|
2001-03-18 19:27:28 +00:00
|
|
|
II. OpenGL drivers with *working* *fast* glTexSubImage() support.
|
|
|
|
|
|
|
|
Currently only the old Utah-GLX drivers (for X 3.3.6) have it.
|
|
|
|
See http://utah-glx.sourceforge.net for details about how to install it.
|
|
|
|
|
|
|
|
The new X4/DRI and nVidia's binary drivers has no usable glTexSubImage :(
|
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
III. Native card-specific drivers
|
2001-03-18 19:27:28 +00:00
|
|
|
|
2001-03-18 20:41:46 +00:00
|
|
|
There is 3 native drivers for Linux:
|
2001-03-18 19:27:28 +00:00
|
|
|
1. Matrox G200/G400/G450 BES (Back-End Scaler) support -> mga_vid kernel drv.
|
|
|
|
It's active developed by me (A'rpi), and it has hardware VSYNC support
|
|
|
|
with triple buffering. It works on both framebuffer console and under X.
|
|
|
|
|
|
|
|
To use, simply compile the mga_vid.o in the drivers/ subdir (type: make)
|
|
|
|
and load it with insmod mga_vid.o. You should verify the memory size
|
|
|
|
detection using the 'dmesg' command. If it's bad, use the mga_ram_size
|
|
|
|
option (rmmod mga_vid first), specify card's memory size in MB:
|
2001-04-01 23:03:21 +00:00
|
|
|
insmod mga_vid.o mga_ram_size=16
|
2001-03-18 19:27:28 +00:00
|
|
|
|
|
|
|
Using it from MPlayer: (you should re-compile it with mga_vid support...)
|
|
|
|
|
|
|
|
Use the 'mga' vo driver on framebuffer console (matroxfb): -vo mga
|
|
|
|
and use the xmga driver for X 3.3.x: -vo xmga
|
|
|
|
|
2001-03-18 22:12:33 +00:00
|
|
|
Note: it works under X 4.0.2 too, but it conflicts with the Xv driver,
|
2001-03-18 19:27:28 +00:00
|
|
|
so avoid using both. Usually X restart or reboot needs to get Xv usable
|
|
|
|
again :(
|
|
|
|
|
|
|
|
2. SiS 6326 YUV Framebuffer driver -> sis_vid kernel driver
|
|
|
|
Its interface should be compatible with the mga_vid, but the driver
|
|
|
|
was not updated after the mga_vid changes, so it's outdated now.
|
|
|
|
Volunteers needed to test it and bring the code up-to-date.
|
2001-03-18 17:57:49 +00:00
|
|
|
|
2001-03-18 19:27:28 +00:00
|
|
|
3. 3dfx (which ones?) YUV+scaler support, using /dev/3dfx (tdfx.o driver?)
|
|
|
|
The /dev/3dfx kernel driver exists only for 2.2.x kernels, for use with
|
2001-03-18 20:41:46 +00:00
|
|
|
Glide 2.x Linux ports. It's not tested with MPlayer, and so no more
|
2001-03-18 19:27:28 +00:00
|
|
|
supported. Volunteers needed to test it and bring the code up-to-date.
|
2001-03-18 17:57:49 +00:00
|
|
|
|
|
|
|
|
2001-03-18 19:27:28 +00:00
|
|
|
IV. If your card lacks hardware acceleration, you can still boost your fps by
|
|
|
|
using the DGA driver:
|
2001-03-18 17:57:49 +00:00
|
|
|
|
|
|
|
1. Make sure X loads the DGA extension:
|
|
|
|
(II) Loading extension XFree86-DGA
|
2001-04-15 11:48:21 +00:00
|
|
|
(you see, XFree86 4.0.x or greater is VERY RECOMMENDED!)
|
2001-03-18 17:57:49 +00:00
|
|
|
2. MPlayer's DGA driver is autodetected on ./configure, or you can force it
|
|
|
|
with --enable-dga.
|
2001-04-15 11:48:21 +00:00
|
|
|
3. If the driver couldn't switch to a smaller resolution, experiment with
|
|
|
|
switches -vm (only with X 3.0.x), -fs, -bpp, -zoom to find a video mode that
|
|
|
|
the movie fits in. There is no converter right now.. :(
|
2001-03-18 17:57:49 +00:00
|
|
|
4. Install MPlayer SUID root.
|
2001-03-18 20:41:46 +00:00
|
|
|
'chown root /usr/local/bin/mplayer'
|
|
|
|
'chmod 750 /usr/local/bin/mplayer'
|
|
|
|
'chmod +s /usr/local/bin/mplayer'
|
|
|
|
Now it works as a simple user, too.
|
|
|
|
!!!! BUT STAY TUNED !!!!
|
|
|
|
This is a BIG security risk! Never do this on a server or on a computer
|
|
|
|
can be accessed by more people than only you because they can gain root
|
|
|
|
privilegies through suid root mplayer.
|
|
|
|
!!!! SO YOU HAVE BEEN WARNED ... !!!!
|
2001-03-18 17:57:49 +00:00
|
|
|
5. Use '-vo dga' option, and there you go! (hope so:)
|
|
|
|
|
2001-03-18 19:27:28 +00:00
|
|
|
If you have fast enough CPU (P3 800 for example) you can try fsdga for
|
|
|
|
fullscreen mpeg playing (using software YUV->RGB scaling):
|
|
|
|
mplayer -vo fsdga ...
|
2001-03-18 17:57:49 +00:00
|
|
|
|
|
|
|
|
2001-04-15 11:48:21 +00:00
|
|
|
V. Not really acceleration, but...
|
|
|
|
|
|
|
|
a, If you don't have X...
|
|
|
|
...use the SVGAlib target! Be sure not to use the -fs switch, since it
|
|
|
|
toggles the usage of the software scaler, and it's SLOOOW now, unless you
|
|
|
|
have a real fast CPU (and/or MTRR?). :(
|
|
|
|
|
|
|
|
Of course you'll have to install svgalib and its development package in
|
|
|
|
order for MPlayer build its SVGAlib driver (autodetected, but can be
|
|
|
|
forced), and don't forget to edit /etc/vga/libvga.config to suit your
|
|
|
|
card & monitor.
|
|
|
|
|
|
|
|
|
|
|
|
b, You want to use framebuffer...
|
2001-04-17 17:32:35 +00:00
|
|
|
... Whether to build the FBdev target is autodetected during ./configure .
|
|
|
|
Read the framebuffer documentation in the kernel sources
|
|
|
|
(Documentation/fb/*) for info on how to enable it, etc.. !
|
2001-04-15 11:48:21 +00:00
|
|
|
|
2001-04-16 06:55:31 +00:00
|
|
|
... but your card doesn't support VBE 2.0 standard (older ISA/PCI
|
2001-04-15 11:48:21 +00:00
|
|
|
cards, such as S3 Trio64) :
|
|
|
|
Well, VESAfb is still available, but you'll have to load SciTech Display
|
|
|
|
Doctor (formerly UniVBE) before booting Linux. Use a DOS boot disk or
|
|
|
|
whatever. And don't forget to register your UniVBE ;))
|
|
|
|
|
2001-04-17 17:32:35 +00:00
|
|
|
NOTE : FBdev video mode changing _does not work_ with the VESA framebuffer,
|
|
|
|
and don't ask for it, since it's not an MPlayer limitation.
|
2001-03-18 17:57:49 +00:00
|
|
|
|
2001-03-18 19:27:28 +00:00
|
|
|
Gabucino & A'rpi
|
2001-03-18 17:57:49 +00:00
|
|
|
|