Readme file for vgamp 1.0.  Vgamp is a mpeg displayer for standard VGA.
Vgamp is copyright by Gwoho Liu.

You may distribute exact copies of the vgamp.tar file--once you untar it, don't
distribute it.  You may not distribute modified versions or modifications.
Please send suggested modifications to me.
My email address is st20c@ucrmath.ucr.edu.


To compile, type make.  It only works with VGA compatible system--if you have
EGA or CGA or monochrome, don't bother--it will not work.  Don't bother
adding -O3 or such--it'll just slow it down.


If you like, change -DCPU_NUMBER=3 in Makefile to something appropriate.
3 is for 386, etc.  4 or higher won't work for 386.  Other than this, it
really doesn't matter at all what you make it.  Just leaving it 3 is fine.


Make should produce a binary called `vgamp'.  This should be run setuid root.
(If this scares you, see note 1.)


Vgamp will take input from stdin (which may be pipe) or from file named in
command line.  There are three output routines--
-2 will cause vgamp to display output double size.
-gray will cause vgamp to display in gray in ordinary size.
Specifying none of the above will cause vgamp to output color ordinary size.


This program doesn't know anything about SVGA.  If you use wacky cosole
like 132x40 or such, this program probably will not work--it doesn't know about
the wacky SVGA mode.  Use 80x25 console.


Before you complain that the output looks lousy, please keep the following
facts in mind.

VGA can only display 320x200 with 256 colors, so the player only displays the
upper left 320x200 of the image.

Please consider that probably you are viewing display at 30 dpi.
At 30 dpi, effects of dithering are more easily seen than at 100 dpi,
which is how X runs (at least on my computer).  Dithering is much more
pronounced on this program than on mpeg_play for this reason.

The display of this program is worse than mpeg_play's display for color.
If you use -gray, it should be the same.

(See note 2 for more about this.)


This decoder is based on mpeg_play, but it has been completely rewritten.
The tables come from mpeg_play, but this decoder does not contain a single
line of code from mpeg_play--it was entirely rewritten.  Maybe this code
is illegal because it doesn't have that huge copyright notice.


If you experience problems with video, please excuse me and tell me about
your problems.  Please include detailed description of problem and hardware.

Please keep in mind that I don't have VGA compatible system, so it is
rather hard for me to test it--I think it will work, but I am not sure.
If it works, please tell me.  If it doesn't work, also please tell me.

I don't know how to program for svgalib or for X, so it doesn't work for
svgalib or for X.  Besides--I don't have VGA anyway.
(If this sounds fishy to you, please see note 3.)

Please tell me about any problems with the video and I will try to fix it--
though it may be hard considering I don't have VGA.

If there is interest in a SVGA version of this, I might consider making it
work with svgalib.

gwoho liu.


note 1:

If you are wary, please take a look at main().  The first routine it calls is
get_rid_of_root()--look at that too.  Hopefully this will satisfy you.

note 2:

Mpeg_play uses YUV color space dither, but because of clipping from certain
combinations of YUV having negative RGB, conversion isn't really linear, so
dithering gives inaccurate colors sometimes.  This is a problem with their
dithering algorithm.  As far as I know, no one else has noticed this.
My dither algorithm is also far from perfect, but in any case, it is quite a
lot faster.  Which you like better is subjective, but almost certainly you
will like mpeg_play's dithering more because you are viewing it at 100 dpi
instead of 30 dpi.

note 3:

In case you are wondering why I wrote such a thing, considering that I
don't have VGA--I wrote it for friend who has VGA, and a Pentium, so I guess
he doesn't need the extra speed anyway.
I only have wimpy 486sx, but vgamp on 486sx is faster than mpeg_play on
Pentium-60.
