changeset 448:198b46b739d8

qrva eletbe nem kene cvs-t elbaszni inkabb ne nyuljatok hozza baz+
author arpi_esp
date Sun, 15 Apr 2001 20:31:58 +0000
parents b3b28a0d9404
children 450521994982
files DOCS/CODECS DOCS/LIRC DOCS/SOUNDCARDS DOCS/VIDEOCARDS DOCS/codecs.conf DOCS/mplayer.1 Makefile TVout/Mon-640x400 cfg-mplayer.h configure drivers/mga_vid.h help_mp.h libvo/mga_common.c libvo/vo_mga.c libvo/vo_sdl.c libvo/vo_svga.c libvo/vo_xmga.c libvo/wskeys.h libvo/x11_common.c lirc_mp.c mplayer.c
diffstat 21 files changed, 318 insertions(+), 446 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/CODECS	Sun Apr 15 19:35:34 2001 +0000
+++ b/DOCS/CODECS	Sun Apr 15 20:31:58 2001 +0000
@@ -80,7 +80,7 @@
 ~~~~~~~~~~~~~
 Built-in native codecs:
 
-- Uncompressed PCM (0x1)
+- Uncompressed PCM (0)
 - Uncompressed DVD PCM: (0x10001)
 - MPEG layer 2 and 3:  (0x50, 0x55)
   mp3lib, based on mpg123  (sometimes segfaults, then use ACM, see below)
--- a/DOCS/LIRC	Sun Apr 15 19:35:34 2001 +0000
+++ b/DOCS/LIRC	Sun Apr 15 20:31:58 2001 +0000
@@ -29,10 +29,6 @@
  FRWND  - 60 secs back
  FWD    - skip 10 secs
  FFWD   - skip 60 secs
- INCVOL - increase volume one percent
- DECVOL - decrease volmue one percent
- MASTER - use master mixer channel
- PCM    - use pcm mixer channel
 
  Don't forget to enable the repeat flag for RWND/FWD in .lircrc. Here's an
  excerpt from my .lircrc:
--- a/DOCS/SOUNDCARDS	Sun Apr 15 19:35:34 2001 +0000
+++ b/DOCS/SOUNDCARDS	Sun Apr 15 20:31:58 2001 +0000
@@ -2,11 +2,12 @@
 Recommendations for misc. soundcards
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Aureal Vortex 2:        In config.h, change #define HAVE_AUDIO_SELECT to
-			  #undef HAVE_AUDIO_SELECT or run 
-			  ./configure script with --disable-select option
-			  
-ALSA with GUS PnP:	see Aureal Vortex2
+Aureal Vortex 2: (Pontscho)
+			In config.h, change #define HAVE_AUDIO_SELECT to
+			  #undef HAVE_AUDIO_SELECT
+			OSS	: With MPEG files : defaults are ok
+				  With AVI files  : -delay -0.5
+			ALSA	: same
 
 SB Live!:
 			OSS	: OK
--- a/DOCS/VIDEOCARDS	Sun Apr 15 19:35:34 2001 +0000
+++ b/DOCS/VIDEOCARDS	Sun Apr 15 20:31:58 2001 +0000
@@ -157,7 +157,7 @@
   read the framebuffer documentation in the kernel sources
   (Documentation/fb/*) !
 
-  ... but your card doesn't support VBE 2.0 standard (older ISA/PCI
+  ... but don't your card doesn't support VBE 2.0 standard (older ISA/PCI
   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
--- a/DOCS/codecs.conf	Sun Apr 15 19:35:34 2001 +0000
+++ b/DOCS/codecs.conf	Sun Apr 15 20:31:58 2001 +0000
@@ -146,12 +146,11 @@
   out BGR32,BGR24,BGR16,BGR15
 
 videocodec ap41
-  info "AngelPotion Definitive V1 (really (MS MPEG-4 v3))"	; yet another stolen stuff
+  info "AngelPotion Definitive V1"	; yet another stolen stuff
   status working
   fourcc AP41 div3  
   driver dshow
-  dll "divx_c32.ax"		; no need to use apmpg4v1.dll, it's only a
-				; fuckin' wrapper..
+  dll "divx_c32.ax"		; no need to use apmpg4v1.dll
   guid 0x82CCd3E0, 0xF71A, 0x11D0, 0x9f, 0xe5, 0x00, 0x60, 0x97, 0x78, 0xaa, 0xaa
   out YUY2
   out BGR32,BGR24,BGR16,BGR15
--- a/DOCS/mplayer.1	Sun Apr 15 19:35:34 2001 +0000
+++ b/DOCS/mplayer.1	Sun Apr 15 20:31:58 2001 +0000
@@ -28,11 +28,6 @@
 .RB [ \-pp\ quality ]
 .RB [ \-include\ configfile ]
 .RB [ \-ffactor\ number ]
-.RB [ \-sub\ file ]
-.RB [ \-subfps\ rate ]
-.RB [ \-vm\ ]
-.RB [ \-zoom\ ]
-
 .I file
 .PP
 .SH DESCRIPTION
@@ -65,15 +60,12 @@
 don't play sound
 .TP
 .B \-fs
-fullscreen playing (with xv, xmga, gl, sdl, x11,
-fbdev drivers)
-.TP
-.B \-vm
-use the XF86VidMode extension (with x11, sdl, and dga1
-drivers, dga2 doesn't need this)
-.TP
-.B \-zoom
-use software scaling
+fullscreen playing (only gl, xmga and xv drivers)
+
+.I NOTE
+The X11 driver doesn't support fullscreen and scaling.
+However, you can do it yourself, just press ALT,CTRL,-
+or ALT,CTRL,+ simultaneously, see X-server docs for details.
 .TP
 .B \-x\ x
 scale image to x width [if driver suppports!]
@@ -155,13 +147,6 @@
 .TP
 .B \-include
 specify config file to be parsed after the default
-.TP
-.B \-sub
-specify subtitle file to display
-.TP
-.B \-subfps
-specify frame/sec rate of the subtitle file, in
-case it was autodetected wrong
 .IP
 .SH "ALPHA/BETA CODE"
 .TP
--- a/Makefile	Sun Apr 15 19:35:34 2001 +0000
+++ b/Makefile	Sun Apr 15 20:31:58 2001 +0000
@@ -22,8 +22,8 @@
 prefix = /usr/local
 BINDIR = ${prefix}/bin
 # BINDIR = /usr/local/bin
-SRCS = codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c
-OBJS = codec-cfg.o subreader.o linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o cfgparser.o mixer.o
+SRCS = codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c
+OBJS = codec-cfg.o subreader.o linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o cfgparser.o
 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo # -Wall
 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3
 VO_LIBS = -Llibvo -lvo $(X_LIBS)
@@ -32,7 +32,7 @@
 
 # .PHONY: all clean
 
-all:	$(PRG) $(PRG_CFG)
+all:	version.h $(PRG) $(PRG_CFG)
 # $(PRG_AVIP)
 
 .c.o:
@@ -65,7 +65,6 @@
 	$(MAKE) -C encore
 
 $(PRG):	.depend mplayer.o $(OBJS) loader/libloader.a loader/DirectShow/libDS_Filter.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
-	@for a in mp3lib libac3 libmpeg2 opendivx encore libvo loader loader/DirectShow ; do $(MAKE) -C $$a; done
 	$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -Lloader/DirectShow -lDS_Filter -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Lencore -lencore -lpthread -lstdc++
 
 $(PRG_HQ):	.depend mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
@@ -77,7 +76,7 @@
 $(PRG_TV):	.depend tvision.o $(OBJS) $(COMMONLIBS)
 	$(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS)
 
-$(PRG_CFG):        codec-cfg.c codec-cfg.h
+$(PRG_CFG):        .depend codec-cfg.c codec-cfg.h
 	$(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DTESTING
 
 install: $(PRG)
@@ -99,9 +98,20 @@
 .depend: Makefile config.mak config.h
 	makedepend -f- -- $(CFLAGS) -- mplayer.c mplayerHQ.c aviparse.c tvision.c $(SRCS) 1>.depend 2>/dev/null
 
+# rebuild at every config.h/config.mak change:
+version.h: config.h config.mak Makefile
+	$(MAKE) distclean
+	./version.sh
+
+# rebuild at every CVS update:
+ifneq ($(wildcard CVS/Entries),)
+version.h: CVS/Entries
+endif
+
 #
 # include dependency files if they exist
 #
 ifneq ($(wildcard .depend),)
 include .depend
 endif
+
--- a/TVout/Mon-640x400	Sun Apr 15 19:35:34 2001 +0000
+++ b/TVout/Mon-640x400	Sun Apr 15 20:31:58 2001 +0000
@@ -1,3 +1,3 @@
 
-fbset/fbset -fb /dev/fb1 -db fbset.db 640x400-60
+fbset/fbset -fb /dev/fb0 -db fbset.db 640x400-60
 
--- a/cfg-mplayer.h	Sun Apr 15 19:35:34 2001 +0000
+++ b/cfg-mplayer.h	Sun Apr 15 20:31:58 2001 +0000
@@ -6,76 +6,78 @@
 extern char *fb_dev_name;
 extern char *fb_mode_cfgfile;
 extern char *fb_mode_name;
-extern int fb_mode_depth;
+extern char *monitor_hfreq_str;
+extern char *monitor_vfreq_str;
+extern char *monitor_dotclock_str;
 #endif
 
 struct config conf[]={
-        /* name, pointer, type, flags, min, max */
-        {"include", cfg_include, CONF_TYPE_FUNC_PARAM, 0, 0, 0}, /* this must be the first!!! */
-        {"o", "Option -o has been renamed to -vo (video-out), use -vo !\n",
+	/* name, pointer, type, flags, min, max */
+	{"include", cfg_include, CONF_TYPE_FUNC_PARAM, 0, 0, 0}, /* this must be the first!!! */
+	{"o", "Option -o has been renamed to -vo (video-out), use -vo !\n",
             CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
-        {"vo", &video_driver, CONF_TYPE_STRING, 0, 0, 0},
-        {"dsp", &dsp, CONF_TYPE_STRING, 0, 0, 0},
-        {"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0},
-        {"master", &mixer_usemaster, CONF_TYPE_FLAG, 0, 0, 1},
+	{"vo", &video_driver, CONF_TYPE_STRING, 0, 0, 0},
+	{"dsp", &dsp, CONF_TYPE_STRING, 0, 0, 0},
 #ifdef HAVE_FBDEV
-        {"fb", &fb_dev_name, CONF_TYPE_STRING, 0, 0, 0},
-        {"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0},
-        {"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0},
-//        {"fbdepth", &fb_mode_depth, CONF_TYPE_INT, CONF_RANGE, 15, 32},
+	{"fb", &fb_dev_name, CONF_TYPE_STRING, 0, 0, 0},
+	{"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0},
+	{"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0},
+	{"monitor_hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0},
+	{"monitor_vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0},
+	{"monitor_dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0},
 #endif
-        {"encode", &encode_name, CONF_TYPE_STRING, 0, 0, 0},
-        {"sub", &sub_name, CONF_TYPE_STRING, 0, 0, 0},
-        {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0},
-        {"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0},
-        {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0},
-        {"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0},
-        {"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1},
-        {"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
-        {"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
-//      {"ss", &seek_to_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
-        {"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
-        {"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
-        {"abs", &audio_buffer_size, CONF_TYPE_INT, CONF_MIN, 0, 0},
-        {"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0},
-        {"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1},
-        {"nobps", &pts_from_bps, CONF_TYPE_FLAG, 0, 1, 0},
-        {"alsa", &alsa, CONF_TYPE_FLAG, 0, 0, 1},
-        {"noalsa", &alsa, CONF_TYPE_FLAG, 0, 1, 0},
-        {"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1},
-        {"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0},
-        {"aid", &audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 256},
-        {"vid", &video_id, CONF_TYPE_INT, CONF_RANGE, 0, 256},
-//      {"auds", &avi_header.audio_codec, CONF_TYPE_STRING, 0, 0, 0},
-//      {"vids", &avi_header.video_codec, CONF_TYPE_STRING, 0, 0, 0},
-        {"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10},
-        {"fps", &force_fps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0},
-        {"afm", &audio_format, CONF_TYPE_INT, CONF_RANGE, 1, 6},
-        {"vcd", &vcd_track, CONF_TYPE_INT, CONF_RANGE, 1, 99},
-        {"divxq", "Option -divxq has been renamed to -pp (postprocessing), use -pp !\n",
+	{"encode", &encode_name, CONF_TYPE_STRING, 0, 0, 0},
+	{"sub", &sub_name, CONF_TYPE_STRING, 0, 0, 0},
+	{"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0},
+	{"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0},
+	{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0},
+	{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0},
+	{"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1},
+	{"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
+	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
+//	{"ss", &seek_to_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
+	{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
+	{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
+	{"abs", &audio_buffer_size, CONF_TYPE_INT, CONF_MIN, 0, 0},
+	{"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0},
+	{"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1},
+	{"nobps", &pts_from_bps, CONF_TYPE_FLAG, 0, 1, 0},
+	{"alsa", &alsa, CONF_TYPE_FLAG, 0, 0, 1},
+	{"noalsa", &alsa, CONF_TYPE_FLAG, 0, 1, 0},
+	{"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1},
+	{"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0},
+	{"aid", &audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 256},
+	{"vid", &video_id, CONF_TYPE_INT, CONF_RANGE, 0, 256},
+//	{"auds", &avi_header.audio_codec, CONF_TYPE_STRING, 0, 0, 0},
+//	{"vids", &avi_header.video_codec, CONF_TYPE_STRING, 0, 0, 0},
+	{"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10},
+	{"fps", &force_fps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0},
+	{"afm", &audio_format, CONF_TYPE_INT, CONF_RANGE, 1, 6},
+	{"vcd", &vcd_track, CONF_TYPE_INT, CONF_RANGE, 1, 99},
+	{"divxq", "Option -divxq has been renamed to -pp (postprocessing), use -pp !\n",
             CONF_TYPE_PRINT, 0, 0, 0},
-        {"pp", &divx_quality, CONF_TYPE_INT, CONF_RANGE, 0, 63},
-        {"br", &encode_bitrate, CONF_TYPE_INT, CONF_RANGE, 10000, 10000000},
+	{"pp", &divx_quality, CONF_TYPE_INT, CONF_RANGE, 0, 63},
+	{"br", &encode_bitrate, CONF_TYPE_INT, CONF_RANGE, 10000, 10000000},
 
-        {"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
-        {"y", &screen_size_y, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
-        {"xy", &screen_size_xy, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
+	{"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
+	{"y", &screen_size_y, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
+	{"xy", &screen_size_xy, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
         {"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1},
         {"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0},
-        {"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1},
-        {"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0},
+	{"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1},
+	{"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0},
         {"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1},
         {"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0},
-
+       
         {"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32},
-
-        {"idx", &no_index, CONF_TYPE_FLAG, 0, 1, 0},
-        {"noidx", &no_index, CONF_TYPE_FLAG, 0, 0, 1},
-        {"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100},
-        {"v", cfg_inc_verbose, CONF_TYPE_FUNC, 0, 0, 0},
-        {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
-        {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
-        {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
-        {NULL, NULL, 0, 0, 0, 0}
+	
+	{"idx", &no_index, CONF_TYPE_FLAG, 0, 1, 0},
+	{"noidx", &no_index, CONF_TYPE_FLAG, 0, 0, 1},
+	{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100},
+	{"v", cfg_inc_verbose, CONF_TYPE_FUNC, 0, 0, 0},
+	{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
+	{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
+	{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
+	{NULL, NULL, 0, 0, 0, 0}
 };
 
--- a/configure	Sun Apr 15 19:35:34 2001 +0000
+++ b/configure	Sun Apr 15 20:31:58 2001 +0000
@@ -6,10 +6,6 @@
 #
 # Changes in reversed order:
 #
-# 2001/04/15 by Pontscho
-#  - added --disable-select option
-#  - added X11DIR variable in config.mak and fix syncfb Makefile -L/usr/X11/lib bug 
-#
 # 2001/03/24 by Mike Graffam:
 #  - added autodetect code for XF86VidMode, along with explicit --enable-vm
 #
@@ -93,10 +89,7 @@
 
 	--enable-termcap	use termcap database for key codes
 	--enable-xmmp	        use XMMP audio drivers
-	--enable-lirc	        enable LIRC ( remote control ) support
-	
-	--disable-select        disable audio select() support ( for example required this
-	                        option ALSA or Vortex2 driver )
+	--enable-lirc	        enable LIRC (remote control) support
 
         --with-x11libdir=DIR    X library files are in DIR
         --with-win32libdir=DIR  windows codec files
@@ -137,6 +130,16 @@
 # ---  Check for C compiler:
 
 _cc=gcc
+_x11=auto
+
+_x11libdir=
+if [ -e /usr/X11R6 ]; then
+ _x11libdir=-L/usr/X11R6/lib
+else
+ if [ -e /usr/X11 ]; then
+  _x11libdir=-L/usr/X11/lib
+ fi
+fi
 
 for ac_option
 do
@@ -144,6 +147,15 @@
   --cc=*)
         _cc=`echo $ac_option | cut -d '=' -f 2`
         ;;
+  --with-x11libdir=*)
+        _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
+        ;;
+  --enable-x11)
+        _x11=yes
+        ;;
+  --disable-x11)
+        _x11=no
+        ;;
  esac
 done
 
@@ -170,7 +182,6 @@
 _sdl=no
 _xv=no
 _vm=no
-_x11=no
 _3dfx=no
 _syncfb=no
 _mlib=no
@@ -179,7 +190,7 @@
 _dga=no
 _dga2=no
 _svga=no
-_fbdev=no
+_fbdev=yes
 _lirc=no
 _xdpms=no
 
@@ -188,11 +199,8 @@
 
 _gllib=
 _sdllib=
+_xvlib=
 _x11lib=
-_xvlib=
-_xlibdir=
-
-_select='#define HAVE_AUDIO_SELECT'
 
 for i in `echo $pparam`; do
 
@@ -229,13 +237,6 @@
 
 done
 
-if [ -e /usr/X11R6 ]; then
- _x11libdir=-L/usr/X11R6/lib
-else
- if [ -e /usr/X11 ]; then
-  _x11libdir=-L/usr/X11/lib
- fi
-fi
 
 _win32libdirnotify=no
 if [ -e /usr/lib/win32 ]; then
@@ -375,21 +376,15 @@
 #echo "DONE (${proc})."
 
 
-# check GL & X11 & Xext & Xv & SDL & termcap libs
+$_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes
 
-$_cc $TMPC -o $TMPO $_x11libdir/ -lGL &> /dev/null && _gl=yes
-$_cc $TMPC -o $TMPO $_x11libdir/ -lXxf86vm &> /dev/null && _vm=yes
-$_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes
-$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes
-$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes
-$_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes
-$_cc $TMPC -o $TMPO $_x11libdir -L/usr/local/lib/ -lpthread &> /dev/null || \
+$_cc $TMPC -o $TMPO -lpthread &> /dev/null || \
  { echo "Lib pthread not found."; rm -f $TMPC $TMPO ; exit 1; }
 
 # SDL disabled by default (0.11pre22-) because of the compilation problems
 # this is very buggy & experimental code, use it only if you really need it!!
 _have_sdl=no
-$_cc $TMPC -o $TMPO $_x11libdir -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes
+$_cc $TMPC -o $TMPO -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes
 
 _termcap=no
 $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes
@@ -397,7 +392,28 @@
 _binutils=no
 as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes
 
-# LGB: Check DGA
+# ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) --------------
+
+if [ $_x11 = auto ]; then
+  _x11=no
+  $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes
+fi
+
+if [ $_x11 = yes ]; then
+
+$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes
+$_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes
+
+$_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null && _gl=yes
+
+cat > $TMPC << EOF
+#include <GL/gl.h>
+int main( void ) { return 0; }
+EOF
+$_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null || \
+ { _gl=no; echo "GL includes not found!";}
+
+$_cc $TMPC -o $TMPO $_x11libdir -lXxf86vm &> /dev/null && _vm=yes
 
 cat > $TMPC << EOF
 #include <stdio.h>
@@ -406,7 +422,6 @@
 int main (void) { return 0;}
 EOF
 
-_dga=no
 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga=yes
 # Note: the -lXxf86vm library is the VideoMode extension and though it's
 # not needed for DGA, AFAIK every distribution packages together with DGA
@@ -414,8 +429,6 @@
 # for further mplayer versions to set resolution by mplayer itself.
 # If you run into problems, remove '-lXxf86vm'.
 
-# ---
-
 # Check if DGA is 2.0 or greater
 cat > $TMPC << EOF
 #include <stdio.h>
@@ -427,24 +440,10 @@
 _dga2=no
 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=yes
 
-
-cat > $TMPC << EOF
-#include <GL/gl.h>
-int main( void ) { return 0; }
-EOF
-
-$_cc $TMPC -o $TMPO $_x11libdir/ -lGL &> /dev/null || \
- { _gl=no; echo "GL includes not found!";}
+fi
 
 rm -f $TMPC $TMPO
 
-
-if [ $_x11 = 'yes' ]; then
- if [ $_mga = 'yes' ]; then
-  _xmga=yes
- fi
-fi
-
 # ---
 
 # check for the parameters.
@@ -494,9 +493,6 @@
   --enable-vm)
         _vm=yes
         ;;
-  --enable-x11)
-        _x11=yes
-        ;;
   --enable-3dfx)
         _3dfx=yes
         ;;
@@ -518,9 +514,6 @@
   --enable-lirc)
 	_lirc=yes
 	;;
-  --enable-select)
-        _select='#define HAVE_AUDIO_SELECT'
-	;;
   --disable-sse)
         _sse=no
         ;;
@@ -552,9 +545,6 @@
   --disable-vm)
         _vm=no
         ;;
-  --disable-x11)
-        _x11=no
-        ;;
   --disable-mlib)
 	_mlib=no
 	;;
@@ -573,12 +563,6 @@
   --disable-termcap)
 	_termcap=no
 	;;
-  --disable-select)
-        _select='#undef HAVE_AUDIO_SELECT'
-	;;
-  --with-x11libdir=*)
-        _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
-        ;;
   --with-win32libdir=*)
         _win32libdir=`echo $ac_option | cut -d '=' -f 2`
 	_win32libdirnotify=no
@@ -589,11 +573,19 @@
   --size-y=*)
 	_y=`echo $ac_option | cut -d '=' -f 2`
 	;;
+  --with-x11libdir=*)
+        ;;
   --cc=*)
 	;;
  esac
 done
 
+if [ $_x11 = 'yes' ]; then
+ if [ $_mga = 'yes' ]; then
+  _xmga=yes
+ fi
+fi
+
 # to screen.
 echo "Using C compiler: $_cc"
 echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )"
@@ -683,12 +675,10 @@
 
 AR=ar
 CC=$_cc
-X11DIR=$_x11libdir
 # OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
 OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -ffast-math
 # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib
-# X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
-X_LIBS=\$(X11DIR) $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
+X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
 TERMCAP_LIB=$_libtermcap
 XMM_LIBS = $_xmmplibs
 LIRC_LIBS = $_lirclibs
@@ -847,7 +837,7 @@
 /* Undefine this if your soundcard driver has no working select().
    If you have kernel Oops, player hangups, or just no audio, you should
    try to recompile MPlayer with this option disabled! */
-$_select
+#define HAVE_AUDIO_SELECT
 
 /* You have a choice for MP3 decoding: mp3lib(mpg123) or Win32(l3codeca.acm)
    #define this if you prefer mpg123 (with 3Dnow! support) than l3codeca.acm
--- a/drivers/mga_vid.h	Sun Apr 15 19:35:34 2001 +0000
+++ b/drivers/mga_vid.h	Sun Apr 15 20:31:58 2001 +0000
@@ -39,6 +39,7 @@
 
 #define MGA_VID_FORMAT_YV12 0x32315659
 #define MGA_VID_FORMAT_YUY2 (('Y'<<24)|('U'<<16)|('Y'<<8)|'2')
+#define MGA_VID_FORMAT_UYVY (('U'<<24)|('Y'<<16)|('V'<<8)|'Y')
 
 #define MGA_VID_CONFIG    _IOR('J', 1, mga_vid_config_t)
 #define MGA_VID_ON        _IO ('J', 2)
--- a/help_mp.h	Sun Apr 15 19:35:34 2001 +0000
+++ b/help_mp.h	Sun Apr 15 20:31:58 2001 +0000
@@ -1,10 +1,10 @@
 static char* banner_text=
 "\n\n"
-"MPlayer " VERSION "       (C) 2000-2001 Arpad Gereoffy <arpi@esp-team.scene.hu>\n"
+"MPlayer " VERSION "  (C) 2000-2001 Arpad Gereoffy <arpi@thot.banki.hu>\n"
 "\n";
 
 static char* help_text=
-"Usage:   mplayer [options] [path/]name\n"
+"\nUsage:   mplayer [options] [path/]name\n"
 "\n"
 "  Options:\n"
 "    -vo <driver>    select output driver (see '-vo help' for driver list)\n"
@@ -40,6 +40,4 @@
 "    q or ESC        stop playing and quit program\n"
 "    + or -          adjust audio delay by +/- 0.1 second\n"
 "    o               toggle OSD:  none / seek / seek+timer\n"
-"    * or /          increase or decrease volume\n"
-"    m or c          use mixer master or pcm channel\n"
 "\n";
--- a/libvo/mga_common.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/mga_common.c	Sun Apr 15 20:31:58 2001 +0000
@@ -150,9 +150,13 @@
 static uint32_t
 draw_frame(uint8_t *src[])
 {
-        if (mga_vid_config.format==MGA_VID_FORMAT_YUY2)
-                write_frame_yuy2(src[0]);
-	return 0;
+    switch(mga_vid_config.format){
+    case MGA_VID_FORMAT_YUY2:
+        write_frame_yuy2(src[0]);break;
+    case MGA_VID_FORMAT_UYVY:
+        write_frame_yuy2(src[0]);break;
+    }
+    return 0;
 }
 
 static uint32_t
@@ -161,6 +165,7 @@
     switch(format){
     case IMGFMT_YV12:
     case IMGFMT_YUY2:
+    case IMGFMT_UYVY:
 //    case IMGFMT_RGB|24:
 //    case IMGFMT_BGR|24:
         return 1;
--- a/libvo/vo_mga.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/vo_mga.c	Sun Apr 15 20:31:58 2001 +0000
@@ -70,6 +70,9 @@
         case IMGFMT_YUY2:
 	    mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
             mga_vid_config.format=MGA_VID_FORMAT_YUY2; break;
+        case IMGFMT_UYVY:
+	    mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
+            mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
         default: 
             fprintf(stderr,"mga: invalid output format %0X\n",format);
             return (-1);
--- a/libvo/vo_sdl.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/vo_sdl.c	Sun Apr 15 20:31:58 2001 +0000
@@ -377,27 +377,24 @@
 	struct sdl_priv_s *priv = &sdl_priv;
         unsigned int sdl_format;
 
-	sdl_format = format;
+
         switch(format){
-		case IMGFMT_YV12:
-			printf("\nSDL: Using 0x%X (YV12) image format\n", format); break;
-		case IMGFMT_IYUV:
-			printf("\nSDL: Using 0x%X (IYUV) image format\n", format); break;
-		case IMGFMT_YUY2:
-			printf("\nSDL: Using 0x%X (YUY2) image format\n", format); break;
-		case IMGFMT_UYVY:
-			printf("\nSDL: Using 0x%X (UYVY) image format\n", format); break;
-		case IMGFMT_YVYU:
-			printf("\nSDL: Using 0x%X (YVYU) image format\n", format); break;
-		case IMGFMT_I420:
-			printf("\nSDL: Using 0x%X (I420) image format\n", format);
-			printf("SDL: Mapping I420 to IYUV (untested please report if it works)\n");
-			sdl_format = SDL_IYUV_OVERLAY;
-		break;	
-		default:
-			printf("\nSDL: Unsupported image format (0x%X)\n",format);
-			return -1;
-	}
+          case IMGFMT_YV12:
+	  	sdl_format=SDL_YV12_OVERLAY;
+		printf("SDL: Using YV12 image format\n");
+	  break;
+          case IMGFMT_YUY2:
+	  	sdl_format=SDL_YUY2_OVERLAY;
+		printf("SDL: Using YUY2 image format\n");
+	  break;
+          case IMGFMT_UYVY:
+	  	sdl_format=SDL_UYVY_OVERLAY;
+		printf("SDL: Using UYVY image format\n");
+	  break;
+          default:
+            printf("SDL: Unsupported image format (0x%X)\n",format);
+            return -1;
+        }
 
 	sdl_open (NULL, NULL);
 
--- a/libvo/vo_svga.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/vo_svga.c	Sun Apr 15 20:31:58 2001 +0000
@@ -41,203 +41,124 @@
 static float scaling = 1.0;
 static uint32_t x_pos, y_pos; // Position
 
-// SVGAlib - list of detected modes
-typedef struct vga_modelist_s {
-          uint16_t modenum;
-          vga_modeinfo modeinfo;
-	  struct vga_modelist_s *next;
-        } vga_modelist_t;
-
-vga_modelist_t *modelist = NULL;
+// Order must not change!
+#define _640x480x32K 	 0   // 17
+#define _640x480x64K 	 1   // 18
+#define _640x480x16M 	 2   // 19
+#define _640x480x16M32   3   // 34
+#define _800x600x32K 	 4   // 20
+#define _800x600x64K 	 5   // 21
+#define _800x600x16M 	 6   // 22 
+#define _800x600x16M32   7   // 35
+#define _1024x768x32K 	 8   // 23
+#define _1024x768x64K 	 9   // 24
+#define _1024x768x16M 	 10  // 25
+#define _1024x768x16M32  11  // 36
+#define VID_MODE_NUM	 12
 
+static uint8_t vid_modes[VID_MODE_NUM];
+static vid_mode_nums[VID_MODE_NUM] = {17,18,19,34,20,21,22,35,23,24,25,36};
+static uint8_t vid_mode;
 static uint8_t bpp;
-static uint8_t bpp_conv = 0;
-static uint32_t pformat;
 
-#define BPP_15 1
-#define BPP_16 2
-#define BPP_24 4
-#define BPP_32 8
-static uint8_t bpp_avail = 0;
+static uint32_t pformat;
 
 static uint8_t checked = 0;
-
-static int add_mode(uint16_t mode, vga_modeinfo minfo) {
-  vga_modelist_t *list;
+static uint8_t bpp_conv = 0;
 
-  if (modelist == NULL) {
-    modelist = malloc(sizeof(vga_modelist_t));
-    modelist->modenum = mode;
-    modelist->modeinfo = minfo;
-    modelist->next = NULL;
-    if (modelist == NULL) {
-      printf("vo_svga: add_mode() failed. Not enough memory for modelist.");
-      return(1); // error
-    }
-  } else {
-      list = modelist;
-      while (list->next != NULL)
-        list = list->next;
-      list->next = malloc(sizeof(vga_modelist_t));
-      if (list->next == NULL) {
-        printf("vo_svga: add_mode() failed. Not enough memory for modelist.");
-        return(1); // error
-      }
-      list = list->next;
-      list->modenum = mode;
-      list->modeinfo = minfo;
-      list->next = NULL;
-    }  
-}
-
-static int checksupportedmodes() {
-  uint16_t i;
-  vga_modeinfo *minfo;
+static void checksupportedmodes() {
+  int i;
   
   checked = 1;
   vga_init();
   vga_disabledriverreport();
-  for (i = 1; i < vga_lastmodenumber(); i++)
-    if (vga_hasmode(i) > 0) {
-      minfo = vga_getmodeinfo(i);
-      switch (minfo->colors) {
-        case 32768: bpp_avail |= BPP_15; break;
-        case 65536: bpp_avail |= BPP_16; break;
-      }
-      switch (minfo->bytesperpixel) {
-        case 3: bpp_avail |= BPP_24; break;
-        case 4: bpp_avail |= BPP_32; break;
-      }
-      if (add_mode(i, *minfo))
-        return(1);
-    }
+  for (i = 0; i < VID_MODE_NUM; i++) {
+    if (vga_hasmode(vid_mode_nums[i]) > 0)
+      vid_modes[i] = 1;
+    else vid_modes[i] = 0;
+  }
 }
 
 static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
                      uint32_t d_height, uint32_t fullscreen, char *title, 
 		     uint32_t format) {
-  uint32_t req_w = (d_width > 0 ? d_width : width);
-  uint32_t req_h = (d_height > 0 ? d_height : height);
-  uint16_t vid_mode = 0;
-  uint8_t widescreen = (((req_w*1.0)/req_h) > (4.0/3)) ? 1 : 0;
-  vga_modelist_t *list = modelist;
+  uint32_t wid = (d_width > 0 ? d_width : width);
   
   if (!checked) {
-    if (checksupportedmodes()) // Looking for available video modes
-      return(1);
+    checksupportedmodes(); // Looking for available video modes
   }
 
-  bpp_avail = 0;
-  while (list != NULL) {
-    if ((list->modeinfo.width >= req_w) && (list->modeinfo.height >= req_h)) {
-      switch (list->modeinfo.colors) {
-        case 32768: bpp_avail |= BPP_15; break;
-        case 65536: bpp_avail |= BPP_16; break;
-      }
-      switch (list->modeinfo.bytesperpixel) {
-        case 3: bpp_avail |= BPP_24; break;
-        case 4: bpp_avail |= BPP_32; break;
-      }
-    }
-    list = list->next;
-  }
-  
   pformat = format;
   
-  // bpp check
-  bpp_conv = 0;
+  // -bpp check
   if (!vo_dbpp) {
     if (format == IMGFMT_YV12) bpp = 32;
     else bpp = format & 255;
-    switch (bpp) {
-      case 32: if (!(bpp_avail & BPP_32)) {
-	         printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
-		 printf("vo_svga: Maybe you should try -bpp\n");
-		 return(1);
-	       } 
-               break;
-      case 24: if (!(bpp_avail & BPP_24))
-                 if (!(bpp_avail & BPP_32)) {
-	           printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
-		   printf("vo_svga: Maybe you should try -bpp\n");
-		   return(1);
-		 } else {
-		     bpp = 32;
-		     bpp_conv = 1;
-		   }     
-               break;
-      case 16: if (!(bpp_avail & BPP_16)) {
-	         printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
-		 printf("vo_svga: Maybe you should try -bpp\n");
-		 return(1);
-	       } 
-               break;
-      case 15: if (!(bpp_avail & BPP_15))
-                 if (!(bpp_avail & BPP_16)) {
-	           printf("vo_svga: Haven't found video mode which fit to: %dx%d %dbpp\n",req_w,req_h,bpp);
-		   printf("vo_svga: Maybe you should try -bpp\n");
-		   return(1);
-		 } else {
-		     bpp = 16;
-		     bpp_conv = 1;
-		   }
-               break;
-    }
   } else {
       bpp = vo_dbpp;
       switch (bpp) {
-        case 32: if (!(bpp_avail & BPP_32)) {
-	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
+        case 32: if (!(vid_modes[_640x480x16M32] | vid_modes[_800x600x16M32] | vid_modes[_1024x768x16M32])) {
+	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
 		   return(1);
                  }
-        case 24: if (!(bpp_avail & BPP_24)) {
-	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
+        case 24: if (!(vid_modes[_640x480x16M] | vid_modes[_800x600x16M] | vid_modes[_1024x768x16M])) {
+	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
 		   return(1);
                  }
-        case 16: if (!(bpp_avail & BPP_16)) {
-	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
+        case 16: if (!(vid_modes[_640x480x64K] | vid_modes[_800x600x64K] | vid_modes[_1024x768x64K])) {
+	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
 		   return(1);
                  }
-        case 15: if (!(bpp_avail & BPP_15)) {
-	           printf("vo_svga: %dbpp not supported by HW or SVGAlib\n",bpp);
+        case 15: if (!(vid_modes[_640x480x32K] | vid_modes[_800x600x32K] | vid_modes[_1024x768x32K])) {
+	           printf("vo_svga: %dbpp not supported by HW or SVGAlib",bpp);
 		   return(1);
                  }
       }
     }
-
-  list = modelist;
-  while ((list != NULL) && (!vid_mode)) {
-    if ((list->modeinfo.width >= req_w) && (list->modeinfo.height >= req_h)) {
+  
+  if (wid > 800)
+    switch (bpp) {
+      case 32: vid_mode = 36; break;
+      case 24: vid_mode = bpp_conv ? 36 : 25; bpp = 32; break;
+      case 16: vid_mode = 24; break;
+      case 15: vid_mode = bpp_conv ? 24 : 23; bpp = 16; break;
+    }
+  else
+    if (wid > 640)
       switch (bpp) {
-        case 32: if (list->modeinfo.bytesperpixel == 4)
-	           vid_mode = list->modenum;
-        case 24: if (list->modeinfo.bytesperpixel == 3)
-	           vid_mode = list->modenum;
-        case 16: if (list->modeinfo.colors == 65536)
-	           vid_mode = list->modenum;
-        case 15: if (list->modeinfo.colors == 32768)
-	           vid_mode = list->modenum;
+        case 32: vid_mode = 35; break;
+        case 24: vid_mode = bpp_conv ? 35 : 22; bpp = 32; break;
+        case 16: vid_mode = 21; break;
+        case 15: vid_mode = bpp_conv ? 21 : 20; bpp = 16; break;
       }
-    }
-    list = list->next;
+    else
+      switch (bpp) {
+        case 32: vid_mode = 34; break;
+        case 24: vid_mode = bpp_conv ? 34 : 19; bpp = 32; break;
+        case 16: vid_mode = 18; break;
+        case 15: vid_mode = bpp_conv ? 18 : 17; bpp = 16; break;
+      }
+  if (bpp_conv)
+    bppbuf = malloc(maxw * maxh * BYTESPERPIXEL);
+  if (!bppbuf) {
+    printf("vo_svga: Not enough memory for buffering!");
+    uninit();
+    return (1);
   }
-  
+
   vga_setlinearaddressing();
   if (vga_setmode(vid_mode) == -1){
     printf("vo_svga: vga_setmode(%d) failed.\n",vid_mode);
-    uninit();
     return(1); // error
   }
   if (gl_setcontextvga(vid_mode)){
     printf("vo_svga: gl_setcontextvga(%d) failed.\n",vid_mode);
-    uninit();
     return(1); // error
   }
   screen = gl_allocatecontext();
   gl_getcontext(screen);
   if (gl_setcontextvgavirtual(vid_mode)){
     printf("vo_svga: gl_setcontextvgavirtual(%d) failed.\n",vid_mode);
-    uninit();
     return(1); // error
   }
   virt = gl_allocatecontext();
@@ -245,24 +166,16 @@
   gl_setcontext(virt);
   gl_clearscreen(0);
   
-  if (bpp_conv)
-    bppbuf = malloc(maxw * maxh * BYTESPERPIXEL);
-  if (bppbuf == NULL) {
-    printf("vo_svga: Not enough memory for buffering!\n");
-    uninit();
-    return (1);
-  }
-
   orig_w = width;
   orig_h = height;
   if ((fullscreen & 0x04) && (WIDTH != orig_w)) {
-    if (!widescreen) {
+    if (((orig_w*1.0) / orig_h) < (4.0/3)) {
       maxh = HEIGHT;
       scaling = maxh / (orig_h * 1.0);
       maxw = (uint32_t) (orig_w * scaling);
       scalebuf = malloc(maxw * maxh * BYTESPERPIXEL);
-      if (scalebuf == NULL) {
-        printf("vo_svga: Not enough memory for buffering!\n");
+      if (!scalebuf) {
+        printf("vo_svga: Not enough memory for buffering!");
 	uninit();
 	return (1);
       }
@@ -271,8 +184,8 @@
         scaling = maxw / (orig_w * 1.0);
         maxh = (uint32_t) (orig_h * scaling);
         scalebuf = malloc(maxw * maxh * BYTESPERPIXEL);
-        if (scalebuf == NULL) {
-          printf("vo_svga: Not enough memory for buffering!\n");
+        if (!scalebuf) {
+          printf("vo_svga: Not enough memory for buffering!");
 	  uninit();
 	  return (1);
         }
@@ -287,8 +200,8 @@
   if (pformat == IMGFMT_YV12) {
     yuv2rgb_init(bpp, MODE_RGB);
     yuvbuf = malloc(maxw * maxh * BYTESPERPIXEL);
-    if (yuvbuf == NULL) {
-      printf("vo_svga: Not enough memory for buffering!\n");
+    if (!yuvbuf) {
+      printf("vo_svga: Not enough memory for buffering!");
       uninit();
       return (1);
     }
@@ -304,33 +217,31 @@
 static uint32_t query_format(uint32_t format) {
   uint8_t res = 0;
 
-  if (!checked) {
-    if (checksupportedmodes()) // Looking for available video modes
-      return(0);
-  }
+  if (!checked)
+    checksupportedmodes(); // Looking for available video modes
   switch (format) {
     case IMGFMT_RGB32: 
     case IMGFMT_BGR|32: {
-      return ((bpp_avail & BPP_32) ? 1 : 0);
+      return (vid_modes[_640x480x16M32] | vid_modes[_800x600x16M32] | vid_modes[_1024x768x16M32]);
     }
     case IMGFMT_RGB24: 
     case IMGFMT_BGR|24: {
-      res = (bpp_avail & BPP_24) ? 1 : 0;
+      res = vid_modes[_640x480x16M] | vid_modes[_800x600x16M] | vid_modes[_1024x768x16M];
       if (!res) {
-        res = (bpp_avail & BPP_32) ? 1 : 0;
+        res = vid_modes[_640x480x16M32] | vid_modes[_800x600x16M32] | vid_modes[_1024x768x16M32];
 	bpp_conv = 1;
       }
       return (res);
     }
     case IMGFMT_RGB16: 
     case IMGFMT_BGR|16: {
-      return ((bpp_avail & BPP_16) ? 1 : 0);
+      return (vid_modes[_640x480x64K] | vid_modes[_800x600x64K] | vid_modes[_1024x768x64K]);
     }
     case IMGFMT_RGB15: 
     case IMGFMT_BGR|15: {
-      res = (bpp_avail & BPP_15) ? 1 : 0;
+      res = vid_modes[_640x480x32K] | vid_modes[_800x600x32K] | vid_modes[_1024x768x32K];
       if (!res) {
-        res = (bpp_avail & BPP_16) ? 1 : 0;
+        res = vid_modes[_640x480x64K] | vid_modes[_800x600x64K] | vid_modes[_1024x768x64K];
         bpp_conv = 1;
       }
       return (res);
@@ -367,7 +278,7 @@
     yuv2rgb(yuvbuf, src[0], src[1], src[2], orig_w, orig_h, orig_w * BYTESPERPIXEL, orig_w, orig_w / 2);
     src[0] = yuvbuf;
   }
-  if (scalebuf != NULL) {
+  if (scalebuf) {
     gl_scalebox(orig_w, orig_h, src[0], maxw, maxh, scalebuf);
     src[0] = scalebuf;
   }
@@ -413,7 +324,7 @@
   sw = (uint32_t) (w * scaling);
   sh = (uint32_t) (h * scaling);
   yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, stride[0], stride[1]);
-  if (scalebuf != NULL) {
+  if (scalebuf) {
     gl_scalebox(w, h, yuvbuf, sw, sh, scalebuf);
     src = scalebuf;
   }
@@ -436,25 +347,14 @@
 }
 
 static void uninit(void) {
-  vga_modelist_t *list = modelist;
-
   gl_freecontext(screen);
   gl_freecontext(virt);
   vga_setmode(TEXT);
-  if (bppbuf != NULL)
+  if (bppbuf)
     free(bppbuf);
-  if (scalebuf != NULL)
+  if (scalebuf)
     free(scalebuf);
-  if (yuvbuf != NULL)
+  if (yuvbuf)
     free(yuvbuf);
-  if (modelist != NULL) {
-    while (modelist->next != NULL) {
-      list = modelist;
-      while (list->next != NULL)
-        list = list->next;
-      free(list);
-    }
-    free(modelist);
-  }
 }
 	
\ No newline at end of file
--- a/libvo/vo_xmga.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/vo_xmga.c	Sun Apr 15 20:31:58 2001 +0000
@@ -189,6 +189,10 @@
         mga_vid_config.format=MGA_VID_FORMAT_YUY2;
         mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height * 2;
         break;
+   case IMGFMT_UYVY:
+        mga_vid_config.format=MGA_VID_FORMAT_UYVY;
+        mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height * 2;
+        break;
    default:          fprintf(stderr,"mga: invalid output format %0X\n",format); return (-1);
   }
 
--- a/libvo/wskeys.h	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/wskeys.h	Sun Apr 15 20:31:58 2001 +0000
@@ -60,8 +60,6 @@
 #define wsSpace ' '
 #define wsMinus '-'
 #define wsPlus  '+'
-#define wsMul   '*'
-#define wsDiv   '/'
 
 #define wsUp            0x52 + 256
 #define wsDown          0x54 + 256
--- a/libvo/x11_common.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/libvo/x11_common.c	Sun Apr 15 20:31:58 2001 +0000
@@ -1,37 +1,41 @@
+
 #include <stdio.h>
 #include <stdlib.h>
+
+#include "config.h"
+
+#ifdef X11_FULLSCREEN
+
 #include <string.h>
-
 #include <unistd.h>
 #include <sys/mman.h>
 
-#include "config.h"
 #include "video_out.h"
 
-#ifdef X11_FULLSCREEN
-
 #include <X11/Xmd.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 
+#include <X11/extensions/dpms.h>
+
 static int dpms_disabled=0;
 static int timeout_save=0;
 
 
 void vo_hidecursor ( Display *disp , Window win )
 {
-        Cursor no_ptr;
-        Pixmap bm_no;
-        XColor black,dummy;
-        Colormap colormap;
-        static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0  };
-
-        colormap = DefaultColormap(disp,DefaultScreen(disp));
-        XAllocNamedColor(disp,colormap,"black",&black,&dummy);
-        bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8);
-        no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0);
-        XDefineCursor(disp,win,no_ptr);
+	Cursor no_ptr;
+	Pixmap bm_no;
+	XColor black,dummy;
+	Colormap colormap;
+	static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0  };
+	
+	colormap = DefaultColormap(disp,DefaultScreen(disp));
+	XAllocNamedColor(disp,colormap,"black",&black,&dummy);	
+	bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8);    
+	no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0);									          
+	XDefineCursor(disp,win,no_ptr);
 }
 
 
@@ -96,10 +100,6 @@
    case wsGrayMinus: mplayer_put_key('-'); break;
    case wsPlus:
    case wsGrayPlus:  mplayer_put_key('+'); break;
-   case wsGrayMul:
-   case wsMul:       mplayer_put_key('*'); break;
-   case wsGrayDiv:
-   case wsDiv:       mplayer_put_key('/'); break;
    default: if((key>='a' && key<='z')||(key>='A' && key<='Z')) mplayer_put_key(key);
   }
 
@@ -153,17 +153,17 @@
    switch( Event.type )
     {
        case Expose:
-             ret|=VO_EVENT_EXPOSE;
+	     ret|=VO_EVENT_EXPOSE;
              break;
        case ConfigureNotify:
              vo_dwidth=Event.xconfigure.width;
-             vo_dheight=Event.xconfigure.height;
-             ret|=VO_EVENT_RESIZE;
+	     vo_dheight=Event.xconfigure.height;
+	     ret|=VO_EVENT_RESIZE;
              break;
        case KeyPress:
              XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
              vo_x11_putkey( ( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ) );
-             ret|=VO_EVENT_KEYPRESS;
+	     ret|=VO_EVENT_KEYPRESS;
              break;
     }
   }
@@ -171,27 +171,25 @@
   return ret;
 }
 
-#endif
-
 void saver_on(Display *mDisplay) {
 
     int nothing;
     if (dpms_disabled)
     {
-        if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
-        {
-            printf ("Enabling DPMS\n");
-            DPMSEnable(mDisplay);  // restoring power saving settings
-            DPMSQueryExtension(mDisplay, &nothing, &nothing);
-        }
+	if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
+	{
+	    printf ("Enabling DPMS\n");
+	    DPMSEnable(mDisplay);  // restoring power saving settings
+	    DPMSQueryExtension(mDisplay, &nothing, &nothing);
+	}
     }
-
+    
     if (timeout_save)
     {
-        int dummy, interval, prefer_blank, allow_exp;
-        XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp);
-        XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp);
-        XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
+	int dummy, interval, prefer_blank, allow_exp;
+	XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp);
+	XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp);
+	XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
     }
 
 }
@@ -202,18 +200,20 @@
 
     if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
     {
-        BOOL onoff;
-        CARD16 state;
-        DPMSInfo(mDisplay, &state, &onoff);
-        if (onoff)
-        {
-            printf ("Disabling DPMS\n");
-            dpms_disabled=1;
-                DPMSDisable(mDisplay);  // monitor powersave off
-        }
+	BOOL onoff;
+	CARD16 state;
+	DPMSInfo(mDisplay, &state, &onoff);
+	if (onoff)
+	{
+	    printf ("Disabling DPMS\n");
+	    dpms_disabled=1;
+		DPMSDisable(mDisplay);  // monitor powersave off
+	}
     }
     XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
     if (timeout_save)
-        XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
-                    // turning off screensaver
+	XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
+		    // turning off screensaver
 }
+
+#endif
--- a/lirc_mp.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/lirc_mp.c	Sun Apr 15 20:31:58 2001 +0000
@@ -95,11 +95,7 @@
     {"FFWD" , KEY_UP},
     {"RWND" , KEY_LEFT},
     {"FRWND" , KEY_DOWN},
-    {"PAUSE", 'p'},
-    {"INCVOL", '*'},
-    {"DECVOL", '/'},
-    {"MASTER", 'm'},
-    {"PCM", 'c'}
+    {"PAUSE", 'p'}    
   };
        
   char *code;
--- a/mplayer.c	Sun Apr 15 19:35:34 2001 +0000
+++ b/mplayer.c	Sun Apr 15 20:31:58 2001 +0000
@@ -32,7 +32,6 @@
 #include "config.h"
 
 #include "cfgparser.h"
-#include "mixer.h"
 #include "cfg-mplayer-def.h"
 
 #include "subreader.h"
@@ -1579,18 +1578,6 @@
     case 'o':  // toggle OSD
       osd_level=(osd_level+1)%3;
       break;
-    case '*':
-      mixer_incvolume();
-      break;
-    case '/':
-      mixer_decvolume();
-      break;
-    case 'm':
-      mixer_usemaster=1;
-      break;
-    case 'c':
-      mixer_usemaster=0;
-      break;
   }
   if(rel_seek_secs)
   if(file_format==DEMUXER_TYPE_AVI && avi_header.idx_size<=0){