Skip to main content
Topic: Finally! tooLame gets updated (Read 10746 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Finally! tooLame gets updated

Toolame 0.2j, and then k, have been released.

http://mikecheng.d2.net.au/#tooLAME

You can get v. 0.2k binaries compiled with ICL at RareWares. (MP3 section)
(Thanks to DSPguru for the binaries)
http://www.inf.ufpr.br/~rja00/

If people are interested, I can compile v 0.2l beta too.

Changelog in next post.

Finally! tooLame gets updated

Reply #1
TooLAME 02k - 16 February 2003

    * Some great speedups with a combined filtersubband and windowsubband (Ricardo Schelp ricardoschelp at arnet.com.ar)
    * Cleaned up the psycho model calling (should be easier to add your own psycho model if you felt like having a hack)
    * DAB Extensions are now of variable length controlled by an argument to the -D switch (Nicolas Croiset - ncroiset at vdl.fr)
    * Fixed raw PCM reading to no longer miss the first 40 bytes. (MFC)
    * No longer a 4GB limit when reading from stdin (or if your filesys supports) (Nicolas)
    * Tweaks to the end of the bitstream to allow concatentation of mp2 files (Nicolas)
    * Finally (?) fixed the segfaults using psy model 1 (Nicolas et al)

TooLAME 02j - 12 Feb 2003

    * Definitely LGPL now.
    * encode.c - VBR mode has been stabilised to work correctly for all sampling frequencies (README.VBR has more details)
    * get_audio.c has become audio_read.c - cleaned up that really dodgy wave header parsing. (thanks to Philippe Jouguet - philippe.jouguet at vdl.fr and Henrik Herranen - leopold at vlsi.fi)
    * spelling fix for 'extension' - Philippe again
    * psycho_I.c - Speedup for "% 1408" calcs "-DSAMI_P1" sami.sallinen at g-cluster.com (about 4% overall speedup for me)
    * subband.c - Pointer arithmetic for filter subband "-DSAMI_SB" (sami again) (doesn't give any advantage over gcc3.2 on my system)
    * psycho_II.c
          o enabled the use of gcc's _sincos(). "-DSINCOS -D_GNU_SOURCE" about a 5% overall speed-up in encoding (Philippe again)
          o added the LSF frequencies so that you can use psy model 2 with LSF (good old Philippe)
    * verbosity - added a '-t' flag to set the 'talkativity' level needed for transcode plugin (Andreas neukoetter - anti at webhome.de)
    * toolame.c - LSF files should now select a valid default bitrate by default. (96kbps)

Finally! tooLame gets updated

Reply #2
Great! Finally a new version!
Some time ago I recorded a tv documenatation in mono to burn it on VCD. I encoded the audio (16 Bit; 44100Hz; Mono) with toolame at 224kbps (you have to use this bitrate on VCD), but the output mp2-file wasn´t playable with wmp. I tried it in winamp: perfect. Then I read that there is a bitrate limit for mono-files, maximum is 192kbps (maybe toolame should output a warning when encoding mono >192kbps).
But in winamp the file sounded perfect, I couldn´t hear any difference to original. But to encode correctly at 224kbps I created a stereo-wav (both channels 100% identical) and encoded in joint-stereo. But I could hear artifacts very clearly. I thought, maybe bad joint stereo and encoded in stereo, again artifacts.
Is it possible to produce joint-stereo mp2 from mono files for >192kbps with 100% intensity-stereo (all bands are identical) too produce mono-mp2, which is also within standard at 224kbps? This would allow nearly as high quality like mono, but within standards.

Finally! tooLame gets updated

Reply #3
Quote
Great! Finally a new version!
Some time ago I recorded a tv documenatation in mono to burn it on VCD. I encoded the audio (16 Bit; 44100Hz; Mono) with toolame at 224kbps (you have to use this bitrate on VCD), but the output mp2-file wasn´t playable with wmp. I tried it in winamp: perfect. Then I read that there is a bitrate limit for mono-files, maximum is 192kbps (maybe toolame should output a warning when encoding mono >192kbps).
But in winamp the file sounded perfect, I couldn´t hear any difference to original. But to encode correctly at 224kbps I created a stereo-wav (both channels 100% identical) and encoded in joint-stereo. But I could hear artifacts very clearly. I thought, maybe bad joint stereo and encoded in stereo, again artifacts.
Is it possible to produce joint-stereo mp2 from mono files for >192kbps with 100% intensity-stereo (all bands are identical) too produce mono-mp2, which is also within standard at 224kbps? This would allow nearly as high quality like mono, but within standards.

Intensity stereo can be used for subbands 4...31.
Subbands 0...3 must be encoded as simple stereo.
--  Frank Klemm

Finally! tooLame gets updated

Reply #4
I haven't tested toolame for a looooong time. Anyway, I tested quickly only the 192cbr.

Checked so far maybe 25+ test samples, extreme and not-extreme, from "noise" to classical music and everything between.
Gotta say that the joint-stereo sucks very much, and I don't understand at all why it's default at 192cbr. I got the best results by using psymodel 2 and stereo-coding: -p2 -m s. With spahm.wav the psymodel 1 (-p1 -m s) gives better results, but it seems to be a rare exception.

I'd guess joint-stereo is needed at low bitrates (although not with movie audio because of surround info loss), but it's definitely only harming 192cbr, and very much so.

Don't know if there are any fancy hidden switches which might help. Anybody tested the vbr?

Anyway, toolame -p2 -m s 192cbr is quite good imo. So far I like it better than for example Lame 3.90.2 --alt-preset cbr 192.
Juha Laaksonheimo

Finally! tooLame gets updated

Reply #5
Quote
Intensity stereo can be used for subbands 4...31

Anyway, that would be a big improvement. The bands 0-3 are the lower frequences? Does that mean the bands 4-31 would just be saved one time for both channels, while bands 0-3 are separated? Would  the encoder just so be modified that simply encodes mono (but calculates the double space for bands 0-3) and then writes a joint-stereo bitstream?
Quote
Don't know if there are any fancy hidden switches which might help.

I´ve read about psymodel 3 and 4, but they are only in 0.2l-beta02.

Finally! tooLame gets updated

Reply #6
Quote
Anyway, toolame -p2 -m s 192cbr is quite good imo. So far I like it better than for example Lame 3.90.2 --alt-preset cbr 192.

I tested on two audio samples. The first, creaking, is not really good at 192 kbps compared to 3.90.2 --ap 192.
The second - harpsichord - is really awfull (muffled & distorded sound). I uploaded the flac 1.10 sample here :
http://membres.lycos.fr/guruboolez/AUDIO/s...ga_BWV_868.flac

Finally! tooLame gets updated

Reply #7
Quote
Quote
Anyway, toolame -p2 -m s 192cbr is quite good imo. So far I like it better than for example Lame 3.90.2 --alt-preset cbr 192.

I tested on two audio samples. The first, creaking, is not really good at 192 kbps compared to 3.90.2 --ap 192.
The second - harpsichord - is really awfull (muffled & distorded sound). I uploaded the flac 1.10 sample here :
http://membres.lycos.fr/guruboolez/AUDIO/s...ga_BWV_868.flac

Creaking is definitely better with toolame -p2 -m s than with lame 3.90.2 --alt-preset cbr 192. Very easy to hear, especially the ending which is problematic for the mp3.
Did you test abr or cbr? You said -ap 192 which would indicate abr. ABR mp3 is of course very much better with problem clips than cbr.
The harpsichord is a somewhat better with ap cbr 192, but you know that layer2 based/derived codecs have hard time with harpsichord, even mpc, so this is no surprise imo. I woudn't take this clip and make conclusions here..
Juha Laaksonheimo

Finally! tooLame gets updated

Reply #8
Quote
Creaking is definitely better with toolame -p2 -m s than with lame 3.90.2 --alt-preset cbr 192. Very easy to hear, especially the ending which is problematic for the mp3.


At the end, I prefer mp2 : lame introduce pre-echo. But there is a serious flaw at the beginning with mp2 (approximately the same than with amnesia with mpc).

Quote
Did you test abr or cbr? You said -ap 192 which would indicate abr. ABR mp3 is of course very much better with problem clips than cbr.

I used --alt-preset CBR 192.

Quote
The harpsichord is a somewhat better with ap cbr 192, but you know that layer2 based/derived codecs have hard time with harpsichord, even mpc, so this is no surprise imo.
I take a look in CoolEdit : the mufled sound is a consequence of a very strong lowpass (15000 hertz !!!). Layer 2 isn't guilty for this.
And I'm not sure that layer2 is handicaped against layer3 : mpc is better than LAME [off-topic : the psy-model of lame is maybe responsible : I tried to ABX Fhg Fastenc at high bitrate with some sample, and it was really difficult - when LAME flaws made it easy t ABX].And mpc --radio (166 kbps) is less distorded than toolame stereo psy 1 or 2 at 192 kbps. Layer2 is maybe not so bad with harpsichord at medium/high bitrate.

Quote
I woudn't take this clip and make conclusions here..

I didn't make any conclusion : I just noticed it. Harpsichord is something special : for example, one of the best codec for some harpsichord samples is wma9 pro. At 128 kbps CBR, the result outperform mp3/mp4/mpc and vorbis. I wouldn't conclude any general conclusion on wma.


EDIT : spectral representation of toolame encoding (192 CBR psy2) :
http://membres.lycos.fr/guruboolez/compa/toolame.JPG
EDIT2 : mpc --radio (1.14) :
http://membres.lycos.fr/guruboolez/compa/t..._vs_mpc.bmp.JPG

Finally! tooLame gets updated

Reply #9
Quote
At the end, I prefer mp2 : lame introduce pre-echo. But there is a serious flaw at the beginning with mp2 (approximately the same than with amnesia with mpc).

Hmm, I don't hear any serious flaw with mp2, or anything which reminds me of amnesia problem either. But the mp3 is very seriously flawed after 1 second... Anyway, make sure you use -m s with toolame. Joint stereo does give horrible artifacts for mp2.
Juha Laaksonheimo

Finally! tooLame gets updated

Reply #10
Would it be possible to get a binary of the .2l beta?
Thanks,
Lossy
r3mix zealot.

Finally! tooLame gets updated

Reply #11
Quote
Quote
At the end, I prefer mp2 : lame introduce pre-echo. But there is a serious flaw at the beginning with mp2 (approximately the same than with amnesia with mpc).

Hmm, I don't hear any serious flaw with mp2, or anything which reminds me of amnesia problem either. But the mp3 is very seriously flawed after 1 second... Anyway, make sure you use -m s with toolame. Joint stereo does give horrible artifacts.

Here is a rar file which contain :
1/ my mp2 encoding
2/ the short passage I can't bear (0.500-1.200 appr.)

Rename the archive in *.rar
http://membres.lycos.fr/guruboolez/AUDIO/c...reaking_mp2.aar

My exact command line was : -b 192 -p2 -m s
I read/decoded it with foobar (16 bit / undither). What is command the command line for decoding with tolame ?

Finally! tooLame gets updated

Reply #12
Quote
Here is a rar file which contain :
1/ my mp2 encoding
2/ the short passage I can't bear (0.500-1.200 appr.)

Hmm, weird. Imo the mp3 sounds there already twice as bad compared to the original, not to mention later with its constant distortion.
Juha Laaksonheimo

Finally! tooLame gets updated

Reply #13
Perception is a matter of taste, and of... sleeping.
I listened again to both mp3 cbr and mp2 cbr, with a fresh hearing.

Code: [Select]
* mp2 : poor sound (less treble) | artifact at 0.5-1.0      | Good ending
* mp3 : clear sound              | no distorsion at 0.5-1.0 | very bad ending (clear pre-echo)



I suppose that our global appreciation depend of our irritability level for pre-echo, or maybe sensibility for each kind of artifact. I don't support the 'saur' sound I descriped at 0.5-1.0 (I remind you that I posted this sample for a similar Vorbis flaw, at the same place, audible up to Q8 or Q9, that doesn't affect RC2/GT2). I'm more familiar with pre-echo now : I'm not shoked anymore.  This is maybe the reason for my severe judgment for the toolame encoding.

I have a question. By doing a direct comparison with mp2 and the original, the first thing I can perceive is the lake of treble. The lowpass seems to be very strong when I listen/decode it with foobar. Can you confirm ? Am I doing something bad ? This is certainly more annoying & more universal than a ponctual artifact that occurs with concrete music.

Finally! tooLame gets updated

Reply #14
I have a modified toolame 0.2i binary which uses -p 2 by default. I use it to encode VCDs or mpeg1 streams with tmpgenc. It would be nice to have a 0.2l binary to test those -p 3 and -p 4 options, and maybe then a binary with the best quality options defaulted.
She is waiting in the air

Finally! tooLame gets updated

Reply #15
Quote
I have a modified toolame 0.2i binary which uses -p 2 by default. I use it to encode VCDs or mpeg1 streams with tmpgenc. It would be nice to have a 0.2l binary to test those -p 3 and -p 4 options, and maybe then a binary with the best quality options defaulted.

tooLame 0.2k & l requires several source modifications in order to compile in Win. (Seems Mike Cheng made it un*x-only :-P )

I'll wait until Mike adapts the sources for Windows. (Or merges DSPguru's patches). No way for me to compile them the way they are now.

As soon as win32 sources are ready, I'm sure John33 will perform his magic again and create a default -p 2 compile.

Finally! tooLame gets updated

Reply #16
gratzi.
r3mix zealot.

Finally! tooLame gets updated

Reply #17
Quote
gratzi.

???

Is that supposed to be italian?

Finally! tooLame gets updated

Reply #18
You know... I'm not really sure. It seemed like a good thing to do at the time.

I'll say yes, yes it is.
r3mix zealot.

Finally! tooLame gets updated

Reply #19
Quote
You know... I'm not really sure. It seemed like a good thing to do at the time.

I'll say yes, yes it is.

Then, prego.


Finally! tooLame gets updated

Reply #21
Quote
I have a question. By doing a direct comparison with mp2 and the original, the first thing I can perceive is the lake of treble. The lowpass seems to be very strong when I listen/decode it with foobar. Can you confirm ? Am I doing something bad ? This is certainly more annoying & more universal than a ponctual artifact that occurs with concrete music.

Yeah, toolame 192cbr does have pretty strong lowpass. 15-16khz, and the ath seems to be very non-sensitive.
I don't know, I notice the lack of high freqs too, on the otherhand it has totally superior transient handling. Lame 3.93.1 and below -ap cbr 192 has bad transient handling even for mp3 (standard preset with code level tweaks has pretty much the best transient handling though). I have no problem usually noticing both of these..
I'd say it depends very much on the track.
I'm interested to know which one you prefer for example for
genie or 41_30sec?

For me, lower lowpass is often not as irritating as bad transient response, and in case of for example hihats, it doesn't give me any joy to hear higher frequencies if it's otherwise smeared. Though I wouldn't use either of these for music encoding.
Juha Laaksonheimo

Finally! tooLame gets updated

Reply #22
Thx gabriel. The psymodel 4 seems to be improved, but they may be in my head no aba yet.

One thing I did notice was the -q. I wonder if that would be useful in lame. The ability to calculate the psymodel once and run through a few frames and then calculate it again instead of a calculation everytime.

It could serve a purpose at least in audiobooks that are pretty much the same throughout and don't require different masking for any given point. Just a thought.
r3mix zealot.

Finally! tooLame gets updated

Reply #23
 tooLAME 0.2l is now released. You can pick up an ICL6 win32 compile at 'Other Stuff Mirror 1'.
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/

Finally! tooLame gets updated

Reply #24
Hi all,
i'm the author of toolame, and just thought I'd post a bit of a quick response.

First v0.2l is out with the "new" psy models (-1, 0, 3, and 4). No, these psy models aren't much (or any) better than the existing ones -yet.  Psy -1 is using a table of constants, Psy 0 fudges the calculation using the scalefactors. Psy 3 and 4 are pretty much rewrites of Psy model 1 and 2 (respectively) but, instead of using the tables from the ISO11172 document for the ATH and critical bands, it uses the same techniques as LAME (Painter&Spanias formula and others).  These models are not optimized for speed, but hopefully meant as a framework such that quality can be improved. (And for anyone who has had a close look at MP2, there's not really much scope for improvement here)

I'll try to put up win/dos compiles of toolame on www.planckenergy.com (toolame-02l.zip is already there). They'll be compiled with cygwin (so you'll need the cygwin.dll - which i've included in the zip). I've got no idea on their performance (they're compiled for a standard pentium architecture).

To user "S_O": * I'll put in a mono bitrate sanity check in version 0.2m
                        * To make a fake 224kbps stereo mode from a mono file should be "easy" (Just copy the mono data into two channels and encode that). Would probably also need to add a new encoder mode which would always force JS encoding. At the moment,  JS encoding is free to swtich between JS mode and dual stereo depending upon the noise it reckons it hears.

JohnV: I agree that JS mode is a waste at 192kbps, and I'll probably make the default mode "192 kbps dual stereo" for the next release. But the command line switches are there for a reason. If you don't like the default, switch it.

rjamorim:  The source is just plain ANSI C. (with a little bit of K&R - which will finally be gone in the next version).  If someone sends me the equivalent of a "makefile" for the varied arrays of windows compilers out there, it should compile just fine. Check below for an MSVC makefile. (no idea if it works or not. you may also need to change the definition of "INLINE" somewhere).

Any other makefiles or fixes which would make it more win compiler friendly are welcome. (It compiles fine using cygwin on dos.)

later
mike

Here's  a MSVC makefile that someone sent me:

PGM = tooLAME

#intel compiler
CC = icl
# MSVC
#CC=cl
LN = link

CC_OPTS = /nologo /DNDEBUG /Qip /W2 /Wport /YX /GA /O2 /Gs1024 \
          /Qunroll /Qsox- /QIfdiv /QI0f /QaxiMK $(CC_OPTS)
LN_OPTS = /nologo
CC_SWITCHES = $(CC_OPTS) /DVBR /DIOFIX \
              /DBS_FORMAT=BINARY
LN_SWITCHES = $(LN_OPTS)
c_sources = \
   common.c \
   encode.c \
   ieeefloat.c \
   toolame.c \
   portableio.c \
   psycho_n1.c \
   psycho_0.c \
   psycho_1.c \
   psycho_2.c \
   psycho_3.c \
   psycho_4.c \
   fft.c \
   subband.c \
   audio_read.c \
   bitstream.c \
   mem.c \
   crc.c \
   tables.c \
   availbits.c \
   ath.c \
   encode_new.c

OBJ = $(c_sources:.c=.obj)

.c.obj:
@$(CC) $(CC_SWITCHES) /c $< /Fo$@

$(PGM).exe: $(OBJ) Makefile.MSVC
@echo $(PGM).exe
@$(LN) $(LN_SWITCHES) $(OBJ) \
  /out:$(PGM).exe /map:$(PGM).map

clean:
@-del *.exe
@-del icl.pch
@-del *.obj
\ No newline at end of file

 
SimplePortal 1.0.0 RC1 © 2008-2020