AminetAminet
Search:
84512 packages online
About
Recent
Browse
Search
Upload
Setup
Services

gfx/show/mp103.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:MPEG player for ECS/AGA/OpalVision/PicassoII
Requires:020+, 2MB, OS2.04
Architecture:m68k-amigaos >= 2.0.4
Date:1993-09-01
Download:http://aminet.net/gfx/show/mp103.lha - View contents
Readme:http://aminet.net/gfx/show/mp103.readme
Downloads:731

---
mp (mpeg_play) is a MPEG software decoder for the Commodore Amiga computer. It
is derived from the UNIX/X11 MPEG decoder version 2.0 by the Berkeley Plateau
Research Group. Many thanks to Lawrence A. Rowe, Ketan Patel and Brian Smith
for publishing that decoder, without them I wouldn't even know how MPEG works.

Since the least release I found a few things where the player could get
improved. You may enjoy a few new output modes as well as generally faster
playback speed, especially with the gray display modes. If that's not enough
you can now split an MPEG into individual IFF 24bit frames and use your
favourite ANIM rendering tool. ANIMs can be played back much faster and you
can use more sophisticated rendering algorithms as these aren't computed in
real-time, ANIMs however require much more disk space and, for fast play back,
you may need to load them completely into memory. As an example, the tennis.mpg
animation is about 1.2MByte but when converted to HAM6 ANIM-7 format it takes
9.4MByte. On the other hand the MPEG is not much faster than 1 fps on my A3000
but the ANIM plays back at 16..20 fps using ViewTek1.05.

When I added the HAM8 display mode I detected an unfortunate bug in the 39.106
kickstart which is used in most A1200s and A4000s. The player uses a simple
workaround but which makes the HAM8 mode slower than it already is, sorry.

Again, many thanks to all the people that contributed with ideas, code and
time to test the player on as many configurations as possible.

---
Requirements for the 1.03 version (same as for 1.02):

- 68020 or higher CPU. Some thoughts went into that decision since it rules out
  many people in viewing MPEGs but IMHO a 68000 is way too slow to decode MPEG
  at a useful rate. Even an 68030/25MHz is quite slow, at least with this
  program.

- about 2MB memory. The program uses table lookups for some functions,
  especially the HAM rendering code and the hybrid dithering need a large
  table. Other display and dithering options can live with less memory.

- AmigaOS 2.0 or higher. Well, everyone should have updated to AmigaOS2.0.
  Compatibility to AmigaOS1.3 would have added more special cases. I also
  believe that people who can afford an accelerated Amiga have no problems
  with that requirement and it made some functions a bit easier.

---
How to use the program:

mp has to be run from the CLI/Shell. Following the UNIX tradition it accepts
command line parameters in the form 'programname' '-option...' 'input-file'
and reads from standard input when no input filename is given. So if you
run mp without arguments it will appear to do nothing. But in reality it tries
to read an MPEG bitstream from the keyboard. Since that is a bit difficult to
enter you should end input by hitting CTRL-\ which sends an EOF condition.

valid options are:

-display displayname  this has no function and is a remnant from the X11 code
                      that allowed to specify the name of the X server/screen
                      to use.

-dither dithermode    selects a dither and/or display mode. Some displays types
                      need special dithering so this has been combined into one
                      option. More about the possible dithermodes below.

-loop                 causes the player to repeat an animation for ever. You
                      have to break it with CTRL-C.

-eachstat             this would produce verbose statistics information.
                      Calculating the statistics however slows down the player
                      and thus has been #ifdef'ed out.

-no_display           dithers, but does not display, usually used for testing
                      and timing purposes.

-shmem_off            again a remnant of the X11 player with no function

-quiet                the program normally writes the frame number for each
                      frame to the standard output which can be used to pause
                      the player by hitting any key in the shell window. The
                      -quiet option suppresses that output.

-l_range num
-cr_range num
-cb_range num         All paletted display modes use a 'color cube' to fill the
                      palette. The default is to use 16 luminance values
                      (-l_range), 4 red values (-cr_range) and 4 blue values
                      (-cb_range). For some movies this can produce bad colors,
                      you can change the resolution of the color cube with
                      these options, the total number of colors however cannot
                      be larger than 256.
                      As of 1.03 of the player a smaller color cube is used
                      for the EHB display, only 6 luminance, 3 red and 3 blue
                      values are used. The smaller palette yields more exact
                      colors.

-nob                  causes the player to ignore and not display B (bothway
                      interpolated) frames.

-nop                  causes the player to ignore and not display P (predicted)
                      frames.

-saveiff filespec     new for 1.03: causes the player to save all frames to
                      disk in the IFF24 format so that you can render ANIMs
                      with your favourite image processing tool.
                      filespec can be a simple filename, in this case the frame
                      number is appended to generate the filenames for the
                      individual frames. You can also use a pattern like
                      prefix%%%suffix, the sequence of % characters gets
                      replaced by the frame number (with possible leading
                      zeroes to get equal length filenames).

                      Example:
                      -saveiff micky.iff. generates micky.iff.1,micky.iff.2,..
                      -saveiff micky.%%.iff generates micky.01.iff,...

                      'filename%' is identical to just 'filename'.

Dither and display options:

-dither ordered       use simple ordered dithering
-dither ordered2      a faster ordered dither. This is the default.
-dither mbordered     ordered dithering at the macroblock level.
-dither fs4           Floyd-Steinberg dithering with 4 error values propagated
-dither fs2           Floyd-Steinberg dithering with 2 error values propagated
-dither fs2fast       a faster fs2
-dither hybrid        Hybrid dithering, a combination of ordered dithering for
                      luminance and fs2 dithering for chrominance. Errors are
                      not propagated properly.
-dither hybrid2       Hybrid dithering with error propagation among pixels.
-dither 2x2           A dithering technique using a 2x2 pixel area for each
                      pixel. The image displayed is 4 times larger than the
                      original image encoded. Random error terms are added to
                      each pixel to break up contours and gradients.
-dither gray          Grayscale dithering. The image is dithered into 16
                      grayscales. Chrominance information is thrown away.
-dither gray8         Grayscale dithering with 256 grayscales (AGA only).
-dither color         'True' color display with 4 bits luminance and 2*2 bits
                      for chrominance.
-dither ham6          'True' color display using HAM approximation. For each
                      pixel either red, green or blue are set correctly and
                      the other color components are the same as the pixel to
                      the left. As the name implies this uses the 6bit HAM mode
                      and is limited to 4096 possible colors.
-dither none          no dithering is done, no image is displayed. Used to time
                      the decoding process.
-dither mono          Floyd-Steinberg dithering in black and white.
-dither threshold     Simple thresholding in black and white.

and new for 1.03
-dither ham8          'True' color display using HAM approximation. In HAM8
                      mode you have a 18bit color palette for a maximum of 256k
                      colors produced by mp. This mode produces finer gradients
                      than ham6 but it is significantly slower.
                     

All above modes except for none, mono, threshold, gray, gray8, color, ham6
and ham8 are paletted modes. On OCS/ECS machines this will produce an
EXTRA_HALFBRITE display for the maximum number of colors. On AGA machines a
256 color screen is used which produces a mucher better display. As written
above, the gray8 mode is only available on AGA machines. The selection between
gray and gray8 is not done automatic because the 16 graylevel mode is somewhat
faster and some AGA users might want to trade display quality for speed.

The player supports four 24bit displays: the OpalVision board, the PicassoII
and the Retina graphics boards plus everything supported by the EGS libraries.
The options

-dither opal15         and
-dither opal24         generate a 15bit or 24bit display on the OpalVision.
                       Playback speed is somewhat slower than for the native
                       Amiga graphic. This requires the opal.library to be
                       present in the LIBS: directory.

-dither village24      generates a 24bit display on the PicassoII board. This
                       requires the PicassoII software to be installed
                       properly. You don't need to redirect the Workbench to
                       the PicassoII board nor use the ChangeScreen commodity
                       as the player directly talks to the PicassoII driver
                       software. The player will open a display as large as
                       necessary which will be 320x240 for most MPEG files if
                       you have the latest Picasso software. I talked to the
                       VillageTronic people to support a 352x288 mode as well
                       which is the standard resolution for full screen MPEGs
                       (in PAL).

                       The player cannot be retargeted by the Picasso's
                       Intuition driver, so the standard dither modes will
                       get the native Amiga display.

new for 1.03
-dither retina24       generates a 24bit display on the Retina board. This
                       requires the Retina software to be installed properly.
                       The player was tested with version 1.3 of the Retina
                       software. The player uses the standard screen dimensions
                       for the 24bit display. You can change the resolution
                       with the Retina software, you will probably prefer the
                       lowest resolution to get the largest image size on the
                       screen.

                       The player will be retargeted by the Retina software
                       when using the standard dither modes, however, since
                       the Retina software does not report that the display
                       memory is non-standard you have to tell the Retina
                       driver to update the display from chip memory
                       continously to see a picture under the emulation.
                       Most people will prefer the 24bit display using the
                       retina24 dither mode though.

-dither egs24          generates a 'true color' display on any hardware
                       supported by the EGS libraries. Dithering and rendering
                       is done by EGS while the player just supplies the 24bit
                       raw data. If you have an EGS supported 24bit board this
                       means you will see full 24bit. In any case the _default_
                       EGS screen is used, you can choose the dimensions and
                       depth with the EGS preferences tools.

                       Warning! EGS does not yet support to send raw 24bit data
                       to the libraries rendering routines except for single
                       pixels. To improve speed the player fakes a EGS Bitmap
                       structure that points to the internal 24bit data created
                       by the MPEG decoding stage. This works well with the
                       current implementation of EGS but may fail in the
                       future. A future version of EGS however will support
                       rendering of 24bit data arrays and I intend to update
                       the player code as soon as the new EGS documentation
                       because publically available.

Example:

mp -dither ham6 jet.mpg

will play back the MPEG movie from the file jet.mpg and use a HAM display.

mp -loop -dither village24 micky.mpg

will play back the file micky.mpg endlessly on the PicassoII board until
CTRL-C is hit.

---
Playback speeds:

MPEG is a very CPU intensive way of compressing and decompressing digital
video data. An Amiga A3000 achieves a rate of about 3.7 frames per second for
average MPEG streams of 160x120 pixels per frame that were encoded with
the XING encoder. Better _encoders_ can get better compression and streams
from these encoders can be played back a bit faster.

MPEG movie        |  Resolution           |  Compression ratio  |  Frame rate
----------------------------------------------------------------------------
micky.mpg         |  160x120              |  19.4               |  3.69
moglie.mpg        |  160x120              |  23.8               |  3.80
flight.mpg        |  160x120              |  20.8               |  3.77
birdisba.mpg      |  160x120              |  27.6               |  4.36
BigE_accel.mpg    |  176x144              |  41.1               |  4.16
tennis.mpg        |  352x240              |  30.5               |  1.13
jet.mpg           |  128x96               |  48.3               |  8.06

The frame rates were measured on an A3000/25MHz with static column RAMs on a
PAL monitor using the ham6 dither mode. NTSC machines may show slightly
different timing due to different frame times (50Hz vs. 60Hz) and the need to
synchronize a double buffered display.

---
The 1.03 version of the player has been finished at the Amiga User Meeting in
Bielefeld/Germany on August 28-29th 1993. Just a few hours later Harv Laser
reported a bug in the OpalVision 24bit output, so there is a 1.03fix release.
The length of the fixed executable is 115840 Bytes and yields the VERSION
string:

mpeg_play 1.03fix
(Bielefeld meeting final)

Please send any suggestions and bug reports to me. I can be reached via E-Mail
as mlelstv at mpifr-bonn.mpg.de. People with Internet access can also find me
often in the IRC (Internet Relay Chat) channels #amiga and #amigager.

Michael van Elst


Contents of gfx/show/mp103.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                54280  115840  46.9% -lh5- bab0 Sep  1  1993 mp
[generic]                 5558   14966  37.1% -lh5- 82cc Sep  1  1993 mp103.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         2 files   59838  130806  45.7%            Sep  1  1993

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>