**********************************************************************
* MPEG 1.0/2.0 _AUDIO_ PLAYER, V0.59s                                * 
*                                                                    *
* (full?) MPEG 1.0/2.0, Layer 1,2 and 3 support                      *
* Layer-3 realtime only with a 'fast' machine                        *
* Since April 97, 128kbit j-stereo should work on a 486DX4-120.      *
* With 2:1 down-sampling or using the downmix-mode even a 486DX2-66  *
* should play such a stream in realtime!                             *
*                                                                    *
* I still claim to have the fastest MPEG Audio Player for UNIX ;)    *
**********************************************************************

Please read first the important information in the COPYING file.

written/modfied by:
   Michael Hipp (email: hippm@informatik.uni-tuebingen.de)

and uses code (or at least ideas) from:
  Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
  MPEG Software Simulation Group: reference decoder package
  Tobias Bading: idea for DCT64 in subband synthesis from maplay package
  Jeff Tsay and Mikko Tommila: MDCT36 from maplay package
  Philipp Knirsch <phil@mpik-tueb.mpg.de>: DCT36/manual unroll idea
  Thomas Woerner <..> (SGI Audio)
  Damien Clermonte <..> (HP-UX audio fixes)
  Niclas Lindstrom <nil@wineasy.se>: OS2 port
  Stefan Bieschewski <stb@acm.org>: Pentium optimizations, decode_i586.s
  Martin Denn <mdenn@unix-ag.uni-kl.de>: NAS port
  Niklas Beisert <nbeisert@physik.tu-muenchen.de> MPEG 2.5 tables
  <mycroft@NetBSD.ORG> and <augustss@cs.chalmers.se>: NetBSD
  Kevin Brintnall <kbrint@visi.com> BSD patch
  Tony Million: win32 port
  Steven Tiger Lang: advanced shuffle
  Henrik P Johnson: HTTP auth patch
  Eric B. Mitchell: esd port
  Ryan R. Prosser <prosser@geocities.com> esd port for Solaris
  Daniel Kobras <daniel.kobras@student.uni-tuebingen.de>: lot of (DK)-bugfixes
  and more ....

Current distribution site for new test versions is the CVS repository. 
http://www.mpg123.org/ has more information about how to acces the 
CVS repository.

You can get the latest release from 
  http://www.mpg123.org/

------------------------------------------------------------------------

This version plays a layer3,112Kbit/s,J-Stereo stream on my AMD 5x86/133Mhz
with about 66% CPU load. (on the console, NO X11)
If your machine isn't fast enough you may try the downsampling
feature (--2to1 and --4to1 options) 
Playing in '--singlemix' (stero reduced to mono) also saves some
CPU cycles, though the whole code is optimized for 'full' stereo playing.

'Benchmarks': (+/- 2%)
----------------------
(AMD 486/133MHZ,ASUS SP3G,256KB cache,DIRTY-TAG installed,(BusLogic SCSI))
(Layer3, 112Kbit/s, Joint-Stereo stream (partially MS stereo, no I-stereo))
(Compiled with: -DI386_ASSEM -DREAL_IS_FLOAT -DLINUX -Wall -O2 -m486
   -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math)

  full quality:     (stero)     66% (-> may work on 486DX4-100)
                    (singlemix) 38% (-> should work on 486DX2-66)
  2:1 downsampling: (stereo)    48%
                    (singlemix) 30% (-> should work on 486DX-50)

'Benchmarks' on Solaris/SPARC: (from Sven Oliver Moll)
------------------------------
(Sun SPARCStation 10/30 (one 36MHz SuperSPARC Prozessor) with Solaris 7)
(Layer3, 128Kbit/s Joint-Stereo stream (created with lame))
(compiled with: gcc 2.95.2 and binutils 2.9.1.0.25 and options:
   -O2 -Wall -pedantic -DSOLARIS -DREAL_IS_FLOAT -DUSE_MMAP
   -DREAD_MMAP -DTERM_CONTROL -funroll-all-loops  -finline-functions)

  full quaility:    (stereo)    46%
                    (singlemix) 28%
  2:1 downsampling: (stereo)    42%
                    (singlemix) 21%

---------------------------------------------------------------------
Description:

This isn't a new player. It's a fully rewritten version originally based 
on the dist10/mpegaudio (FHG-version) package. The DCT algorithm in the
synthesis filter is a rewritten version of the DCT first seen in the maplay
package, which was written by Tobias Bading (bading@cs.tu-berlin.de). The 
rewrite was neccassary, because the GPL may not allow this copyright mix.
The mpegaudio package was written by various people from the MPEG/audio
software simulation group. The maplay is under GPL .. You can find the
original source code and the mpegaudio package on: ftp.tnt.uni-hannover.de.

Especially layer3.c common.c and mpg123.h is based on the dist10 package.
The code is fullly rewritten but I'm using sometimes the
same variable names or similar function names as in the
original package.

In the current layer3.c I'm using a DCT36 first seen in Jeff Tsay's 
(ctsay@pasteur.eecs.berkeley.edu) maplay 1.2+ package. His code is
under GPL .. I also tried the enhancement from Mikko Tommila. His
code is also in layer3.c (but it's disabled at the moment, because
it was slightly slower than the unrolled 9 point DCT (at least on 
_my_ system)). Theoretically it should be faster. You may try it on
your system.

The output can converted to different audio formats and
rates. Currently, only (very simple) audiosupport for
the most common computer systems. It's possible
to build a 'generic' version which needs an external
audio player for playing.

I have tested the program with a lot of teststreams, but it's very 
likely, that there are still a few bugs.

Playing MP3s coming with MIMEType "audio/x-mpegurl" 
---------------------------------------------------
For netscape navigator: 
Go: Preferencs->Navigator->Applications
 Click 'NEW' Button and fill in the form:
  Description: MP3 Playlist
  MIMEType:    audio/x-mpegurl
  suffix:      m3u
 Click the 'Application' button below and add a
  mpg123 -@ %s
 or maybe better
  xterm -e mpg123 -@ %s
 in the application field. Press OK. That's all.


NAS notes: (from Martin Denn)
-----------------------------
you may wanna play with the following defines: (from audio.c)
  NAS_SOUND_PORT_DURATION 
  NAS_SOUND_LOW_WATER_MARK
Change them to optimize the player for your environment. For slow
networks a proven config is:
#define NAS_SOUND_PORT_DURATION 10 /* seconds */
#define NAS_SOUND_LOW_WATER_MARK 75 /* percent */

Pentium optimization notes:
---------------------------
The ASM optimaztions are especially for Intel Pentium FPUs.
On other processorts the egcs compiler optimization
may do a better job. This part can be used under GPL.

3DNow notes:
------------
You need a new 'as'. ie. the 'as' from binutils-2.9.1.0.19a.
If you donīt have a suitable īasī, you may wanna try to _copy_ the
files dct64_3dnow.o and decode_3dnow.o from the precompiled/ 
directory to the base mpg123 source path and try to compile
the source.
A funny side-effect of the 3dnow optimizations is, that now the
-2 and -4 downsampling is a little slower than full quality, because
the 3dnow optimization is only enabled for full quality decoding.
3dnow only works with -DREAL_IS_FLOAT. 

License Change:
---------------
It is possible to use the raw decoder under GPL. 
(please note: the use under GPL may be restricted by patents in some countries!)
Currently, 'the raw decoder' means the following files: 
  layer1.c, layer2.c, layer3.c, decode.c, dct64.c, decode_i386.c, dct64_i386.c,
  decode_i586.s, decode_2to1.c, decode_4to1.c, getbits.c, getbits.h, mpg123.h,
  tabinit.c, l2tables, huffman.h

----------------------------------------------------------------------------

And now have fun,
           Mike

----------------------------------------------------------------------------

Just for info:
    I'm also working (but not at the moment) on a DSP port for this package. 
    A first testversion of the _LAYER-2_ part is finished and seems
    to work in realtime with my 20MHZ ADSP-2115 

----------------------------------------------------------------------------

Copyrights (c) 1995,1996,1997,1998,1999,2000 of all changes/modifications and
of the new code by Michael Hipp. All rights reserved.
Copyrights (c) 1997 of several enhancements by Oliver Fromme.
See the packages 'maplay 1.2(+)' and 'mpegaudio' for their copy-policies.
Copyrights (c) 1997 of the OS2 specific parts by Niclas Lindstrom

known bugs:
-----------
  layer 3 i-stereo not heavily tested
   btw: I'm looking for i-stereo teststreams .. maybe you could send me a few
  Layer 1 not heavily tested
  no CRC checking ..
  no 'free format streams'
  no clean audio interface
  MPEG 2.0, Layer1 and Layer2 not tested (and probably will not work)
  MPEG 2.0, Layer3 not heavily tested .. may has bugs.

related information:
--------------------
  If you need an mp3 frame re(assembler) and stream debug tool you should
  have a look at the mp3asm program on Olli's mpg123 page.(http://mpg.123.org)

some interessting patent information:
-------------------------------------
  http://www.iis.fhg.de/amm/legal/


******************************************************************************
*
* This is software with ABSOLUTELY NO WARRANTY.
* Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
* due to a bug or for other reasons. 
*
* I do not warrant that the program is free of infringement of any third-party
* patents.
*
******************************************************************************

