Short: Optimised MP3 (MPEG 1 Layer 3 audio) decoder Author: Fraunhofer institute and Johan Hagman Uploader: Troels Walsted Hansen (troels@stud.cs.uit.no) Type: mus/play Requires: ixemul.library V45+ This is a decoder for MPEG 1 Layer 3 audio (often refered to as MP3). It is based on the same freeware source as the other two archives currently on aminet (mp3.lha and mpeg1_iis.lha), but the source has been optimised a lot by Johan Hagman. I downloaded the source after a tip from Cstar on irc, and compiled it with ADE gcc. This decoder is more than 4 times faster than the one found in mp3.lha. It is also completely selfcontained, you don't need the external tables/#? files anymore. I changed the makefile for ADE gcc and changed the source to write a raw PCM file instead of an AIFF file with a header. This means you can make the decoder write to the PIPE: device and have some other program read the audio data from the pipe at the same time. I use this for converting mp3 files to mp2. To convert an mp3 file to mp2 for realtime playback with the mpegaudio.lha delitracker player on aminet execute the following commands in a shell: stack 100000 run mpeg3play -o pipe:mp3 musicin pipe:mp3 -b128 (You need the pipe device mounted, I think it is found in some other archive on aminet..) You can also decode mp3 files to a PCM audio file and play it back using for example Play16. To do that, try the following commands: stack 100000 mpeg3play -o play16 tracks=2 bits=16 freq=44100 hifi Here's some timings I made on my CS060mkII equipped A4000. I used "timer" from the Executive 2.0 package to make the timings, so they should be as exact as possible. The file is spot1.mp3, 130836 bytes, 416 frames, 11 seconds of audio. The suffix of the decoder filenames indicate the CPU they were optimised for by the compiler. Decoder Time w/CyberPatcher Time w/o CyberPatcher ---------------------------------------------------------------- decode020-040 0:09:17.67 0:09:19.51 decode020881 0:06:49.29 0:04:47.49 decode040 0:05:41.69 0:04:26.27 decode040881 0:05:32.96 0:04:19.18 mpeg3play000 0:04:36.61 mpeg3play020 0:04:45.35 mpeg3play040 0:01:07.13 mpeg3play040881 0:01:00.68 0:00:59.06 Yabbadecode060 0:01:05.04 0:01:10.51 Yabbadecode060 is a work in progress. Just like mpeg3play it is based on the original mpeg1_iis sources and it has been optimised by Stefan Burström and compiled for 060 with SAS/C 6.57. All the other decoders were compiled with ADE gcc (which does not have an option to optimise for 060). As you can see from the timings, mpeg3play is currently the fastest decoder available (even if it is still far from realtime). Troels Walsted Hansen, troels@stud.cs.uit.no, Troels on IRC ============================= Archive contents ============================= Original Packed Ratio Date Time Name -------- ------- ----- --------- -------- ------------- 11147 4925 55.8% 11-Feb-97 17:24:26 +README.ISO_1994 4300 1485 65.4% 11-Feb-97 17:24:26 +README.ISO_1996 48093 13538 71.8% 11-Feb-97 17:24:26 +common.c 20546 5548 72.9% 11-Feb-97 17:24:26 +common.h 79011 19148 75.7% 11-Feb-97 17:24:26 +decode.c 8391 2069 75.3% 11-Feb-97 17:24:26 +decoder.h 10614 3326 68.6% 11-Feb-97 17:24:26 +huffman.c 2185 880 59.7% 11-Feb-97 17:24:26 +huffman.h 28027 5857 79.1% 11-Feb-97 17:24:26 +ieeefloat.c 2660 1176 55.7% 11-Feb-97 17:24:26 +ieeefloat.h 2570 1051 59.1% 12-Feb-97 22:28:02 +Makefile 26566 8203 69.1% 12-Feb-97 21:31:34 +musicout.c 6797 1861 72.6% 11-Feb-97 17:24:26 +portableio.c 3789 1306 65.5% 11-Feb-97 17:24:26 +portableio.h 64701 10745 83.3% 11-Feb-97 17:24:26 +tables.c 3002 1406 53.1% 12-Feb-97 22:35:48 +mpeg3play.readme 1281 666 48.0% 11-Feb-97 17:24:26 +README.Fraunhofer 5785 2545 56.0% 11-Feb-97 17:24:26 +README.mpeg3play 116668 50176 56.9% 12-Feb-97 21:49:08 +mpeg3play000 112808 49253 56.3% 12-Feb-97 21:54:54 +mpeg3play020 85720 37090 56.7% 12-Feb-97 21:36:16 +mpeg3play040881 -------- ------- ----- --------- -------- 644661 222254 65.5% 14-Feb-97 01:01:14 21 files