function ATHmdct(gfp, f) {
	        var ath = psy.ATHformula(f, gfp);

	        ath -= NSATHSCALE;

	        /* modify the MDCT scaling for the ATH and convert to energy */
	        ath = Math.pow(10.0, ath / 10.0 + gfp.ATHlower);
	        return ath;
	    }
<PRE>
compute the ATH for each scalefactor band cd range: 0..96db

Input: 3.3kHz signal 32767 amplitude (3.3kHz is where ATH is smallest =
-5db) longblocks: sfb=12 en0/bw=-11db max_en0 = 1.3db shortblocks: sfb=5
-9db 0db

Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) longblocks: amp=1
sfb=12 en0/bw=-103 db max_en0 = -92db amp=32767 sfb=12 -12 db -1.4db

Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) shortblocks: amp=1
sfb=5 en0/bw= -99 -86 amp=32767 sfb=5 -9 db 4db


MAX energy of largest wave at 3.3kHz = 1db AVE energy of largest wave at
3.3kHz = -11db Let's take AVE: -11db = maximum signal in sfb=12. Dynamic
range of CD: 96db. Therefor energy of smallest audible wave in sfb=12 =
-11 - 96 = -107db = ATH at 3.3kHz.

ATH formula for this wave: -5db. To adjust to LAME scaling, we need ATH =
ATH_formula - 103 (db) ATH = ATH * 2.5e-10 (ener)
</PRE>