1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
.
toolame
an optimized mpeg 1/2 layer 2 audio encoder
toolame.sourceforge.net
All changes to the ISO source are licensed under the GPL
(see COPYING for details)
/*
* toolame - an optimized mpeg 1/2 layer 2 audio encoder
* Copyright (C) 2001 Michael Cheng
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
INTRODUCTION
tooLAME is an optimized Mpeg Audio 1/2 Layer 2 encoder. It is based heavily on
- the ISO dist10 code
- improvement to algorithms as part of the LAME project (www.sulaco.org/mp3)
- work by myself and other contributors (see CONTRIBUTORS)
CONTRIBUTORS
Dist10 code writers
LAME specific contributions
fht routines from Ron Mayer <mayer@acuson.com>
fht tweaking by Mathew Hendry <math@vissci.com>
window_subband & filter_subband from LAME circa v3.30
(multiple LAME authors)
(before Takehiro's window/filter/mdct combination)
Oliver Lietz <lietz@nanocosmos.de>
Tables now included in the exe! (yay! :)
Patrick de Smet <pds@telin.rug.ac.be>
scale_factor calc speedup.
subband_quantization speedup
Federico Grau <grauf@rfa.org>
Bill Eldridge <bill@hk.rfa.org>
option for "no padding"
Nick Burch <gagravarr@SoftHome.net>
WAV file reading
os/2 Makefile mods.
Phillipe Jouguet <philippe.jouguet@vdldiffusion.com>
DAB extensions
Mike Cheng <mikecheng@users.sourceforge.net>
Most of the rest
INSTALLATION
1. edit Makefile
2. 'make'
USAGE
./toolame [options] <input> <output>
Input File
tooLAME parses AIFF and WAV files for file info
raw PCM is assumed if no header is found
for stdin use a -
Output File
file is automatically renamed from *.* to *.mp2
for stdout use a -
Input Options
-s sfrq
if inputting raw PCM sound, you must specify the sample rate
default sample rate is 44.1khz.
-a
downmix from stereo to mono
if the incoming file is stereo, combine the audio into
a single channel
-x
force byte-swapping of the input. (current endian detection if naff,
so if toolame just produces noise, just use -x )
-g
swap the LR channels of a stereo file
Output Options
-m mode
the encoding mode (default 'j')
's' stereo
'd' dual channel
'j' joint stereo
'm' mono
-p psy
which psy model to use (default '1')
Different models for the psychoacoustics
Choice between 1 or 2.
-b br
the total bitrate (default '192')
-v lev
Switch on VBR mode *** experimental ***
'lev' is the minimum MNR acceptable and the bitrate is increased
until this criteria is met. Useful range -5 to 15. (usu 5)
Only valid for 44.1khz input. Anything else and it will choke.
[need to properly switch over the alloc tables]
Operation
-f
fast mode turns off calculation of the psychoacoustic model.
Instead a set of default values are assumed
-q num
quick mode calculates the psy model every 'num' frames.
Misc
-d emp
de-emphasis (default 'n')
-c
mark as copyright
-o
mark as original
-e
add error protection
-r
force padding bits off
-D
add DAB extensions
RECOMMENDED SUPPORT SOFTWARE
* mp3_check ftp://ftp.thedeepsky.com/outgoing/
A frame checker for mpeg audio layer 2 and 3.
Even groks layer2 VBR files.
* mpg123 http://mpg.123.de/
Supports layer2 VBR
REFERENCE PAPERS
(Specifically LayerII Papers)
Kumar, M & Zubair, M., A high performance software implementation of mpeg audio
encoder, 1996, ICASSP Conf Proceedings (I think)
Fischer, K.A., Calculation of the psychoacoustic simultaneous masked threshold
based on MPEG/Audio Encoder Model One, ICSI Technical Report, 1997
ftp://ftp.icsi.berkeley.edu/pub/real/kyrill/PsychoMpegOne.tar.Z
Hyen-O et al, New Implementation techniques of a real-time mpeg-2 audio encoding
system. p2287, ICASSP 99.
Imai, T., et al, MPEG-1 Audio real-time encoding system, IEEE Trans on Consumer
Electronics, v44, n3 1998. p888
Teh, D., et al, Efficient bit allocation algorithm for ISO/MPEG audio encoder,
Electronics Letters, v34, n8, p721
Murphy, C & Anandakumar, K, Real-time MPEG-1 audio coding and decoding on a DSP
Chip, IEEE Trans on Consumer Electronics, v43, n1, 1997 p40
Hans, M & Bhaskaran, V., A compliant MPEG-1 layer II audio decoder with 16-B
arithmetic operations, IEEE Signal Proc Letters v4 n5 1997 p121
mikecheng@users.sourceforge.net
|