140
|
1
|
|
2 Videocards with hardware acceleration:
|
|
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
4
|
|
5 * read DOCS/MTRR too!
|
|
6
|
|
7 "Hardware acceleration" usually means hardware YUV conversion, scaling,
|
141
|
8 bilinear filtering. Under Linux, there are several ways to access it:
|
|
9
|
146
|
10 I. The Xv (XVideo) extension of XFree86 4.0.2
|
144
|
11 II. OpenGL drivers with glTexSubImage() support (currently the Utah-GLX
|
|
12 drivers)
|
|
13 III. Native card-specific drivers, using special abilities of some cards
|
|
14 IV. DGA - direct graphic access. no YUV & scaling, but faster than raw X11
|
141
|
15
|
144
|
16 Now, let's see them in details:
|
141
|
17
|
144
|
18 I. Under XFree86 4.0.2 or newer, using the XVideo extension:
|
141
|
19 this is what the option '-vo xv' uses.
|
|
20
|
|
21 In order to make this work, be sure to check the following:
|
|
22
|
144
|
23 1. You use XFree86 4.0.2 or newer (former versions don't have XVideo)
|
141
|
24
|
144
|
25 2. Your card actually supports harware acceleration (modern cards do)
|
141
|
26
|
140
|
27 3. X loads the XVideo extension, it's something like this:
|
|
28 (II) Loading extension XVideo
|
|
29 in /var/log/XFree86.0.log
|
144
|
30 NOTE : this loads only the XFree86's extension. In a good install, this is
|
140
|
31 always loaded, and doesn't mean that the _card's_ XVideo support is
|
|
32 loaded!
|
141
|
33
|
144
|
34 4. Your card has Xv support under Linux. To check, try 'xvinfo', it is the
|
141
|
35 part of the XFree86 distribution. It should display a long text, similar
|
|
36 to this:
|
140
|
37
|
|
38 X-Video Extension version 2.2
|
|
39 screen #0
|
|
40 Adaptor #0: "Savage Streams Engine"
|
|
41 number of ports: 1
|
|
42 port base: 43
|
|
43 operations supported: PutImage
|
|
44 supported visuals:
|
|
45 depth 16, visualID 0x22
|
|
46 depth 16, visualID 0x23
|
|
47 number of attributes: 5
|
144
|
48 (...)
|
|
49 Number of image formats: 7
|
|
50 id: 0x32595559 (YUY2)
|
|
51 guid: 59555932-0000-0010-8000-00aa00389b71
|
|
52 bits per pixel: 16
|
|
53 number of planes: 1
|
|
54 type: YUV (packed)
|
|
55 id: 0x32315659 (YV12)
|
|
56 guid: 59563132-0000-0010-8000-00aa00389b71
|
|
57 bits per pixel: 12
|
|
58 number of planes: 3
|
|
59 type: YUV (planar)
|
140
|
60 (...etc...)
|
141
|
61
|
|
62 It must support YUY2 packed, and YV12 planar pixel formats to be
|
|
63 usable with MPlayer.
|
|
64
|
140
|
65 5. Be sure MPlayer is compiled with the "xv" target. "./configure" should say:
|
|
66 Checking for Xv ... yes
|
141
|
67
|
140
|
68 6. If all is fine, try the option '-vo xv' . It should work.
|
|
69 (if it doesn't, send us a bugreport. See the README on how to do this.)
|
|
70
|
|
71
|
141
|
72 II. OpenGL drivers with *working* *fast* glTexSubImage() support.
|
140
|
73
|
141
|
74 Currently only the old Utah-GLX drivers (for X 3.3.6) have it.
|
|
75 See http://utah-glx.sourceforge.net for details about how to install it.
|
|
76
|
|
77 The new X4/DRI and nVidia's binary drivers has no usable glTexSubImage :(
|
|
78
|
144
|
79 III. Native card-specific drivers
|
141
|
80
|
144
|
81 There is 3 native drivers for Linux:
|
141
|
82 1. Matrox G200/G400/G450 BES (Back-End Scaler) support -> mga_vid kernel drv.
|
|
83 It's active developed by me (A'rpi), and it has hardware VSYNC support
|
|
84 with triple buffering. It works on both framebuffer console and under X.
|
|
85
|
|
86 To use, simply compile the mga_vid.o in the drivers/ subdir (type: make)
|
|
87 and load it with insmod mga_vid.o. You should verify the memory size
|
|
88 detection using the 'dmesg' command. If it's bad, use the mga_ram_size
|
|
89 option (rmmod mga_vid first), specify card's memory size in MB:
|
274
|
90 insmod mga_vid.o mga_ram_size=16
|
141
|
91
|
|
92 Using it from MPlayer: (you should re-compile it with mga_vid support...)
|
|
93
|
|
94 Use the 'mga' vo driver on framebuffer console (matroxfb): -vo mga
|
|
95 and use the xmga driver for X 3.3.x: -vo xmga
|
|
96
|
146
|
97 Note: it works under X 4.0.2 too, but it conflicts with the Xv driver,
|
141
|
98 so avoid using both. Usually X restart or reboot needs to get Xv usable
|
|
99 again :(
|
|
100
|
|
101 2. SiS 6326 YUV Framebuffer driver -> sis_vid kernel driver
|
|
102 Its interface should be compatible with the mga_vid, but the driver
|
|
103 was not updated after the mga_vid changes, so it's outdated now.
|
|
104 Volunteers needed to test it and bring the code up-to-date.
|
|
105
|
|
106 3. 3dfx (which ones?) YUV+scaler support, using /dev/3dfx (tdfx.o driver?)
|
|
107 The /dev/3dfx kernel driver exists only for 2.2.x kernels, for use with
|
144
|
108 Glide 2.x Linux ports. It's not tested with MPlayer, and so no more
|
141
|
109 supported. Volunteers needed to test it and bring the code up-to-date.
|
140
|
110
|
|
111
|
141
|
112 IV. If your card lacks hardware acceleration, you can still boost your fps by
|
|
113 using the DGA driver:
|
140
|
114
|
|
115 1. Make sure X loads the DGA extension:
|
|
116 (II) Loading extension XFree86-DGA
|
|
117 2. MPlayer's DGA driver is autodetected on ./configure, or you can force it
|
|
118 with --enable-dga.
|
|
119 3. Be sure to use 24/32bpp mode, since there is no converter right now.. :(
|
|
120 4. Install MPlayer SUID root.
|
144
|
121 'chown root /usr/local/bin/mplayer'
|
|
122 'chmod 750 /usr/local/bin/mplayer'
|
|
123 'chmod +s /usr/local/bin/mplayer'
|
|
124 Now it works as a simple user, too.
|
|
125 !!!! BUT STAY TUNED !!!!
|
|
126 This is a BIG security risk! Never do this on a server or on a computer
|
|
127 can be accessed by more people than only you because they can gain root
|
|
128 privilegies through suid root mplayer.
|
|
129 !!!! SO YOU HAVE BEEN WARNED ... !!!!
|
|
130
|
140
|
131 5. Use '-vo dga' option, and there you go! (hope so:)
|
|
132
|
141
|
133 If you have fast enough CPU (P3 800 for example) you can try fsdga for
|
|
134 fullscreen mpeg playing (using software YUV->RGB scaling):
|
|
135 mplayer -vo fsdga ...
|
140
|
136
|
|
137
|
|
138
|
141
|
139 Gabucino & A'rpi
|
140
|
140
|