home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 3
/
AACD03.BIN
/
AACD
/
Sound
/
Resources
/
MPEGA
/
MPEGA.doc
< prev
next >
Wrap
Text File
|
1997-08-29
|
12KB
|
346 lines
-------------------------------------------------------------------------------
MPEGA 3.3 (29-Aug-1997) (68020+) (GIFTWARE)
-------------------------------------------------------------------------------
Distribution Conditions
-----------------------
This program is copyright (c) 1995-1997 by Stephane TAVENARD.
It may be distributed freely under the condition that no profit is
gained from its distribution, nor from any other program distributed
in the same package.
Permission is granted to distribute this package by Bulletin Board
systems or network sites, under the condition that no fee is charged
on downloading it.
All files that are part of this package have to be distributed
together and none of them may be changed in any way other than
archiving or crunching. The only exception to this rule are the
icons, including the tooltypes, which may be changed to accommodate
them to the rest of the disk it is distributed on.
This program is distributed as freeware (and giftware).
Disclamer
---------
This package is provided "as is" without warranty of any kind.
The author assumes no responsibility or liability whatsoever
for any damage or dataloss caused by using this package.
Introduction
------------
What is MPEG audio ?
It's a very efficient audio compression standard. Actually, there is 3
compression methods, named layer I, II & III. Layer III is more efficient
than layer II, which is more efficient than layer I. But, more efficient
means more complex.
MPEG audio allows to compress a 16-bit PCM sound file from 1.2 to
32 times.
Why is it so hard to make a real time MPEG audio decoder ?
MPEG audio decoding requires a lot of arithmetic calculation, so a lot of CPU
power is required. Normally, MPEG audio decoding is made with help of a DSP.
History
-------
V1.0 23-Jun-1995 First aminet release
V1.1 09-Sep-1995 Added mixing audio output. For example, it can play at
28000Hz a 11025Hz decoded stream (-d4 option).
V1.2B 31-Jul-1996 68020..68040 and 68060 versions
Buffer time can be set by user
Can play half rate if private bit is set in mpeg stream
V1.3 01-Nov-1996 Added MPEG2 low sampling frequencies
V2.0 31-Mar-1997 Added Layer III !
V2.1 02-Apr-1997 -x option now works (missing !)
V2.2 05-Apr-1997 Corrected bug in MPEG I,II dequantization
IMDCT now in pure asm
Decoding Layer III is now 20% faster than V2.1
V2.2B 06-Apr-1997 Added MPEG2.5 support
Fixed bug in subband synthesis filter
V2.3 11-Apr-1997 Optimized subband synthesis filter
play audio as default (-s to silence)
added priority option (-p)
V2.4 19-Apr-1997 Optimized huffman decoding of Layer III
Added AHI support (-I option)
Use now async I/O for reading input file
Improved multitasking capabilities
V2.5 03-May-1997 Fixed bug for 48kHz & 24kHz streams
Fixed bug in that swallows end of sound
Added seek into stream (-S option)
Use of AHI V4
Fixed bug when stopping with Ctrl-C
Re-enabled AIFF header (-A option)
Added max decoding frequency (-F option)
V2.6 16-May-1997 Added Time counter (-T option)
Fixed small bug into IMDCT of layer III
Fixed "Audio skipping" bug at start of play
V2.7 18-May-1997 Optimized Subband synthesis (global gain = 20% on 060 !)
Added synchronization tolerance (allows to read some incorrect bitstreams)
No more crash if input stream is not MPEG Audio
V2.8 24-May-1997 All output text info is now output to stdio instead of stderr
Audio manager use now soft interrupts
V2.9 29-May-1997 Added -w option to wait for audio buffer to be full before starting audio
Added -b option to set the input file buffer size (default is 16KB)
Gain of 6% for layer III decoding (on '060)
V3.0 15-Jul-1997 FPU Version use now Optimized FPU routines (no more INTEGER calc.)
-> FPU is slower than non FPU version, but provides more quality
Suppressed MPEG Audio header check (some streams have pb with it)
Corrected bad lock when opening stream (MUFS files didn't work)
New Huffman filling buffer (Decoding layer III is 5% faster on a 060)
-a option to display audio buffer fill level (in secs)
Audio buffer size can be more than 32 secs now
Added WAVE output option (-W)
Added Decoding parameters output option (-D)
Faster dequantization & stereo process in layer III
Play list as input file with -l option
Output file can be specified with -o <file> option
Added a config file (default is MPEGA:MPEGA.CFG, then MPEGA.CFG):
- separate mpeg decoder options for Layer I&II and III, mono and stereo files
- default options
Added -C option to display current configuration
Now time used is only displayed if -u option is set
V3.1 23-Jul-1997 Corrected WAVE Format (bug in size calc)
Added -r option to disable Async I/O for input file (don't lock input file)
Suppressed the need for an MPEGA: assign (sorry about this...)
Read MPEGA.CFG now from ENV:, S:, PROGDIR:, and then current directory.
Added -N option to display filename
V3.2 16-Aug-1997 Version string format now STYLEGUIDE compliant
Added Random play for playlist (-R option)
Added TAG info display (-i option)
V3.3 29-Aug-1997 Output display changed
Description
-----------
You need at least a 68020 CPU to use it !
This is an highly optimized MPEG audio decoder. This one can decode MPEG audio
standard streams, layer I, II & III. The output can be either a raw PCM file
or AMIGA-builtin audio device (14-bit/cybersound/AHI).
How to use it
-------------
Syntax: MPEGA [<options>] <MPEG Audio file> [<out pcm file>]
options are:
-d <freq_div> frequency division: 1, 2 or 4
-q <quality> output quality: 0 (worst), 1 or 2 (best)
-h display header only
-n no frame counter
-m mono output (left channel)
-p <pri> process priority (-30..30)
-I[<id>] AHI output, <id> = Audio mode ID in hex (ex: -I20004)
-s silence (no audio output)
-f 0|1 audio filter off/on (default = auto)
-x <freq> audio mixing frequency (default = none)
-t <ms> audio buffer time in ms (default = 1 sec)
-v <vol> audio volume (0..64 or 65..256 for boost)
-w wait for audio buffer to be full before starting audio
-a audio buffer fill level in secs (use with -T option)
-S <ms> seek to time postion in stream (unit is ms)
-A write AIFF header to output file
-W write WAVE header to output file
-F <freq_max> max decoding frequency (auto freq_div)
-T display time counter instead of frame counter
-b <k_size> set the input file buffer size in KBytes (default = 16KB)
-D display decoding parameters
-l input file is a play list (text file)
-o <out file> output decoded file
-c <cfg file> configuration file (default = MPEGA.CFG)
-C display current configuration
-u display time used
-r don't use Async I/O for input file (no lock)
-N Display filename
-R random play
-i display TAG infos
Play list
~~~~~~~~~
A play list is a text file, each line containing a filename (and its path).
Example:
----- BEGIN OF playlist.txt -----
mpega:films/PFICTION.MP3
mpega:films/Blade_Runner/Blade_Runner_Blues.mp2
mpega:Angra/Carolina_IV.mp2
------ END OF playlist.txt ------
-> 'mpega -l playlist.txt' will play all the files in this play list
Config File
~~~~~~~~~~~
The default config file is 'MPEGA.CFG' loaded each time you start mpega.
It try to read MPEGA.CFG from ENV:, S:, PROGDIR:, and then current directory.
You can specify an alternate config file with -c option.
A config file is a set of line options. The first 4 lines are used to
configure the mpeg decoder according to the mpeg audio file type.
line option # mpeg audio file type
1 Layer I or II, Mono
2 Layer III, Mono
3 Layer I or II, Stereo
4 Layer III, Stereo
On this first lines, only options -d, -q, -F and -m are allowed
The next lines are used as default options, as they were entered
on the command line.
Comment lines are blank lines or lines begining with #
Example of config file:
----- BEGIN OF MPEGA.CFG -----
# Config file for MPEGA
#
# WARNING You must not change the config lines order !
# option line is limited to 255 characters
#
# MPEG decoder options (allowed options: -d -q -F -m)
#
# Mono files:
# Layers I & II
-d1 -q2
# Layers III
-d2 -q1
#
# Stereo files:
# Layers I & II
-d1 -q1 -m
# Layers III
-q0 -F22050 -m
#
# Default options (all options allowed, may overwrite previous options)
-u -T
------ END OF MPEGA.CFG ------
TAG infos
~~~~~~~~~
TAG infos are often used now for mp3 files. When tag info is available and -i option
is selected, an info line will appear with the following format:
<title> (<artist>) [<album>] <year> - <genre> - <comment>
TAG info can be added/modified with the utility mp3Info by Thorvald Natvig.
This utility can be found in aminet/mus/misc (Amiga version by mikecheng@cryogen.com)
Several version are available:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mpega.020 68020 or 68030 with or without FPU
mpega.020FPU 68020 or 68030 + FPU
mpega.040 68040 or 68060 with or without FPU
mpega.040FPU 68040 or 68060 + FPU
*******************************************************************
***** *****
***** USE NON FPU VERSION FOR MAXIMUM SPEED OR AUDIO PLAYBACK *****
***** *****
*******************************************************************
Examples:
playing sound without counter, priority of 10:
mpega -p10 -n <mpeg file>
or with AHI:
mode id requester:
mpega -p10 -n -I <mpeg file>
mode id 20004:
mpega -p10 -n -I20004 <mpeg file>
playing on a pal screen (limit to 28Khz):
mpega -x28000 <mpeg file>
creating an output pcm file without sound:
mpega -s <mpeg file> <output pcm file>
creating an output AIFF file without sound:
mpega -s -A <mpeg file> <output pcm file>
Limit the decoding frequency to 22.05KHz
mpega -F22050 <mpeg file>
Speed
-----
Today, MPEG layer III decoders are very rare on AMIGA
A little comparison with amp.0.7.2 on 68060/64 MHz:
Spot1-44S.96.mp3 (Stereo 44.1KHz 96kpbs layer III) of 10.9 sec
amp.040881 mpega:test/Spot1-44S.96.mp3 ram:out.pcm -> 12.5 sec
mpega.040 mpega:test/Spot1-44S.96.mp3 -s -> 3.3 sec
Future
------
- Port of Layer III to 'SongPlayer' (aminet/mus/play)
- More speed !
Copyrights
----------
AHI is Copyright ©1994-96 Martin Blom
Credits
-------
Thanks to Thorvald Natvig <xeno@mix.hive.no> for his mp3info sources (read & write of TAG info)
ID3 TAG format by NamkraD/DC (erick@marble.net)
Thanks to my friend, AMIGA, the best computer ever made.
/ /
/ /
/ /
\ \ / /
\ \/ /
\/\/
Stéphane TAVENARD (ANGERS/France)
Email: tavenard@xiii.univ-angers.fr (it's my brother Raphaël mail)
IRC: Tatav
Send your gifts here :^)
Stéphane TAVENARD
La Bezanière
49070 Saint Jean de Linières
FRANCE
Nota from Raphaël: Because my E-mail account is very very short, please tell me before
using an attachment :(