> I took a look at that: I think s[][] is the spreading function used
> for psymodel 2, layer II. In LAME, it is never used, so I went ahead
> and deleted all that code. The layer III psy model is modified - see
> page 80 in the ISO docs, "adaption of psychoacoustic model II for layer
> III")
>
>
> Mark
So, is the ISO Doc buggy or Lame?
The ISO doc states, to calculate the spreading function s(i,j)
for layer III one has to change the line
tmpx = 1.05*(bval[j]-bval[i]);
into
if( j>=i ) tmpx = (bval[j]-bval[i])*3.0;
else tmpx = (bval[j]-bval[i])*1.5;
^ ^
but in Lame
if( j>=i ) tmpx = (bval[i]-bval[j])*3.0;
else tmpx = (bval[i]-bval[j])*1.5;
^ ^
we calculate -tmpx instead of tmpx!
And to be a bit more pessimistic, I would suggest
tmpx = (bval[j]-bval[i])*3.0;
Robert
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )