Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Improving lame 3.96 -V 5 with --athaa-sensitivity (Read 21870 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Improving lame 3.96 -V 5 with --athaa-sensitivity

[span style='font-size:7pt;line-height:100%']Split from here.
---------------------------------------------------
[/span]

I've encoded the CDs used for my previous bitrate comparison with -V 5 and -V 6 + --athaa-sensitivity 1. The bitrate increases by 0.3 - 1.2kbps for a whole CD, 0.5kbps on average. So bitrate-wise there is no problem for sure.

Now I wonder how such an improvement can be achived with only a few bits added. There might be very well the possibility that adding this switch "steals" bits from somewhere else and creates new problems. That's why testing the 12 samples as ff123 suggested (and others too) is a good idea.

@ Gabriel (or someone else who knows): Can you please give some insight about how that switch works (what's the default BTW?) and if/where there might be problems caused by adding it?
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #1
Quote
@ Gabriel (or someone else who knows): Can you please give some insight about how that switch works (what's the default BTW?) and if/where there might be problems caused by adding it?

The default setting should be "--athaa-sensitivity 0" because i've compared some files and results are bit-identical. I don't know exactly what the switch does but i suppose it can only INCREASE quality, the bitrate growth is trascurable because 1 dB is a slight adjustment. I take the idea of using this switch from the medium preset where the sensitivity of --preset standard was lowered (negative value).
Obviously, Gabriel can give us some technical explainations. I will try to test with some more samples when possible 
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #2
Quote
@ Gabriel (or someone else who knows): Can you please give some insight about how that switch works (what's the default BTW?) and if/where there might be problems caused by adding it?

--athaa-sensitivity should adjust the maximum adjustement done by the automatic ath adjustement.
You probably noticed that there is a display problem related to this switch (--verbose) that I have to investigate.

I'd suggest to split this thread for V5 tuning.

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #3
Quote
--athaa-sensitivity should adjust the maximum adjustement done by the automatic ath adjustement.

I haven't been able to find much information about automatic ATH adjustment.
My asumption is this: signals below the ATH are considered inaudible by lame and therefore encoded using as few bits as possible (e.g. not at all). Loud signals (in some frequency band(s)?) lead to a general adjusment of the ATH curve to some higher level. - Correct so far?

What does the value after --athaa-sensitivity mean then? From what I've read in lame --longhelp and in some links I found with google, it's in dB. So --athaa-sensitivity 1 would mean that the ath curve is raised by not more then 1 dB while default (0) would mean it can only be adjusted to negative values (= ath is lowered on very quiet signals). This doesn't sound logical to me, I must have misunderstood something.

Gabriel, no matter if you want to give a more detailed explanation about this or not, do you think --athaa-sensitivity 1 can introduce problems? If yes - where (and why)? Since [proxima] said he found this switch improving ringing problems by experimenting, maybe you have an alternative that could improve these problems as well (with less disadvantages if there are any) - it would be more effective to test more then 1 modified -V 5 commandline at once IMO.
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #4
Quote
I haven't been able to find much information about automatic ATH adjustment.

In VBR, Lame is continuously adjusting its ath base level based on loudness increase/decrease of content, in order to mimicks the middle ear.

By default it adjusts up to 32dB. V5 is reducing the maximum adjustement by 16dB:
http://cvs.sourceforge.net/viewcvs.py/*che...Fplain&rev=1.44

By using 1 your are allowing up to 33dB. The only drawback should be increased bitrate.

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #5
Thanks for your answer, Gabriel. It makes sense now, but there seems to be another small problem (besides the display error with --verbose):
-V 5
-V 5 --athaa-sensitivity -16 and
-V 5 --athaa-sensitivity 0
give bit-identical results.

Increasing --athaa-sensitivity <x> value from -16 to -1 increases bitrate in small steps, at 0 it drops to default, at 1 and higher it keeps increasing again.

Edit:
Quote
the bitrate growth is trascurable...

Yes.
Quote
... because 1 dB is a slight adjustment
It seems like --athaa-sensitivity 1 is an adjustment by 17 dB (from -V 5 default 16dB to general default 32dB + 1dB = 33dB).

Gabriel: Last question:
Quote
In VBR, Lame is continuously adjusting its ath base level based on loudness increase/decrease of content
Does this mean "ath base level" can be adjusted from default level in both directions (i.e. by +/-16dB (with V5) or +/-32dB (default, e.g. V2)), so the total adjustment range is 32dB (V5) or 64dB (default)?
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #6
Quote
Increasing --athaa-sensitivity <x> value from -16 to -1 increases bitrate in small steps, at 0 it drops to default, at 1 and higher it keeps increasing again.

I have to check it. Perhaps there is an issue related to the "0" value. In the meantime you could try 0.001 or -0.001.

Quote
Does this mean "ath base level" can be adjusted from default level in both directions (i.e. by +/-16dB (with V5) or +/-32dB (default, e.g. V2)), so the total adjustment range is 32dB (V5) or 64dB (default)?

No.
If adjust range is 32dB (as with V2), ath can go down by 32dB from base level, but can not go higher than base level.
To achieve (example) a 64dB that would be +/-32, you would use --athadjust 32 --athaa-sensitivity 32 (if everything is working fine)

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #7
Quote
It seems like --athaa-sensitivity 1 is an adjustment by 17 dB (from -V 5 default 16dB to general default 32dB + 1dB = 33dB).

You're right, now that Gabriel gently clarified the switch, i realized that. What is important is that bitrate increase is very small indeed. However, as you've pointed out, there is still something not clear with this switch:
Quote
-V 5
-V 5 --athaa-sensitivity -16 and
-V 5 --athaa-sensitivity 0
give bit-identical results.

Above zero, quality start to increase. I can notice an improvemente even with a smaller value (0.5): bitrate increase with this value is ridiculous. To maximize quality/bitrate ratio we need to perform tests and find the best value for this switch.
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #8
explanation of the "0" effect:

in presets.c:
Code: [Select]
SET_OPTION(athaa_sensitivity, -16, 0);

means "set athaa_sensitivity to -16 if its value is the default value which is 0"

So when you set 0, it is considering that the value is still default. Workaround: use 0.1 or something similar

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #9
Quote
,Apr 23 2004, 03:56 PM] Above zero, quality start to increase.

Well, in theory, compared to plain -V 5 quality should start increasing with --athaa-sensitiviy -15 ... - have you e.g. tried --athaa-sensitiviy -1 ? I would be surprised if you could easily find a samle where you can ABX --athaa-sensitiviy -1 vs. --athaa-sensitiviy 1. Anyway, I'll stop nitpicking now ...
Quote
I can notice an improvemente even with a smaller value (0.5): bitrate increase with this value is ridiculous. To maximize quality/bitrate ratio we need to perform tests and find the best value for this switch.
Given the ridiculous bitrate differences --athaa-sensitiviy 1 causes, I'd say let's not waste energy on testing different values. IMO it makes more sense to just stick with "1" and check if increasing the value helps if someone comes across a samples that contains still ringing (especially if it's worse then 3.90.2/3 --ap 128).

This probably belongs into the other thread, but I think we should focus on testing 3.90.2/3 --ap 128 vs. 3.96 -V 5 --athaa-sensitivity 1 now to get a useful result before rjamorim's multiformat test starts.

Edit: Gabriel, thanks for the explanation. It makes sense now, but still seems somehow strange to me...
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #10
I just tested variuous LAME 3.96 VBR settings with an interesting (low volume) sample where ringing artifacts are very annoying/easy to notice.
Regarding ringing, even --preset medium is nothing special, in this case strangely worse than -V5. As expected, --athaa-sensitivity 1 makes -V5 less annoying. --preset standard is good but not transparent.
Code: [Select]
ABC/HR Version 1.0, 6 May 2004
Testname: Atom_heart_mother

Tester: [proxima]

1R = C:\Documents and Settings\proxima\Desktop\caprice\V5.wav
2R = C:\Documents and Settings\proxima\Desktop\caprice\V4_ath1.wav
3R = C:\Documents and Settings\proxima\Desktop\caprice\V4.wav
4R = C:\Documents and Settings\proxima\Desktop\caprice\std.wav
5R = C:\Documents and Settings\proxima\Desktop\caprice\V5_ath1.wav

---------------------------------------
General Comments:
This is an interesting sample for ringing issues with LAME VBR.
---------------------------------------
1R File: C:\Documents and Settings\proxima\Desktop\caprice\V5.wav
1R Rating: 1.5
1R Comment: Very annoying ringing. Background noise is REPLACED with a waving metallic sound.
---------------------------------------
2R File: C:\Documents and Settings\proxima\Desktop\caprice\V4_ath1.wav
2R Rating: 2.2
2R Comment: Ringing is less annoying, now background noise is somewhat warbling, less metallic. In some parts metallic sound is still present.
---------------------------------------
3R File: C:\Documents and Settings\proxima\Desktop\caprice\V4.wav
3R Rating: 1.0
3R Comment: Very annoying ringing. Background noise is MIXED with a waving metallic sound.
---------------------------------------
4R File: C:\Documents and Settings\proxima\Desktop\caprice\std.wav
4R Rating: 3.7
4R Comment: Ringing at 24.5 - 27.5
---------------------------------------
5R File: C:\Documents and Settings\proxima\Desktop\caprice\V5_ath1.wav
5R Rating: 2.7
5R Comment: Ringing is less annoying, now background noise is somewhat warbling, less metallic.
---------------------------------------
ABX Results:
Original vs C:\Documents and Settings\proxima\Desktop\caprice\V5.wav
   10 out of 10, pval < 0.001
Original vs C:\Documents and Settings\proxima\Desktop\caprice\V4_ath1.wav
   10 out of 10, pval < 0.001
Original vs C:\Documents and Settings\proxima\Desktop\caprice\V4.wav
   10 out of 10, pval < 0.001
Original vs C:\Documents and Settings\proxima\Desktop\caprice\std.wav
   10 out of 10, pval < 0.001
Original vs C:\Documents and Settings\proxima\Desktop\caprice\V5_ath1.wav
   9 out of 10, pval = 0.011

The sample Atom_heart_mother.flac (by Pink Floyd) is available here: http://xoomer.virgilio.it/fofobella/Sample...art_mother.flac
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #11
Quote
I just tested variuous LAME 3.96 VBR settings with an interesting (low volume) sample where ringing artifacts are very annoying/easy to notice.

What is the ReplayGain value of this sample?

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #12
replaygain_track_gain = +0.68 dB
replaygain_track_peak = 0.695129
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

 

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #13
Quote
,Jun 5 2004, 09:30 PM] The sample Atom_heart_mother.flac (by Pink Floyd) is available here: http://xoomer.virgilio.it/fofobella/Sample...art_mother.flac

The flac file has an error. If you do "flac -t", I get:
ERROR while decoding data
state = 4:FLAC__STREAM_DECODER_END_OF_STREAM
foobar says it's 29 seconds, but it can only play the first 12 seconds.

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #14
Quote
Quote
,Jun 5 2004, 09:30 PM] The sample Atom_heart_mother.flac (by Pink Floyd) is available here: http://xoomer.virgilio.it/fofobella/Sample...art_mother.flac

The flac file has an error. If you do "flac -t", I get:
ERROR while decoding data
state = 4:FLAC__STREAM_DECODER_END_OF_STREAM
foobar says it's 29 seconds, but it can only play the first 12 seconds.

Code: [Select]
D:\tmp>flac -t Atom_heart_mother.flac

flac 1.1.0, Copyright (C) 2000,2001,2002,2003 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

Atom_heart_mother.flac: ok


Here it works fine.
Vital papers will demonstrate their vitality by spontaneously moving from where you left them to where you can't find them.

Improving lame 3.96 -V 5 with --athaa-sensitivity

Reply #15
Quote
Here it works fine.

Yes, sorry everyone, the file I had was 721KB, it seems that it was partially downloaded and I didn't notice it.