>
> I don't know anything about how the encoder works, but I built lame
> with egcs-1.1.2+bounds-checking, and when I try to encode a 22khz file
> (at any bitrate), I get the following:
> 
...
>       -Dan Nelson
>       [EMAIL PROTECTED]



I am very glad that you found this!  It turns out to be several 
bugs in the ISO code and all versions of LAME, both MPEG1 and MPEG2.
the ISO code was assuming the number of partition bands and 
convolved partition bands were the same and equal to the maximum possible.  
Both of these assumptions turn out to be false!  Fixing these should
make a noticable improvment to MPEG2, and might improve MPEG1.  

Here is what I think is happening: (in l3psy.c)

1. Energies are mapped from frequency bands to partition bands
2. data computed in partition bands
3. this data is convolved with the spreading function down to a smaller
   number of partition bands.  
4. more data computed in partition bands
5. partition band data mapped to critical bands.


The mapping in (1) was buggy.  It was mapping all the high frequency 
energies (which are supposed to be ignored) into partition band 0, 
at the complete opposite end of the spectrum!

(3) convolution is taken over too many partition bands.  Wasted cycles.

(4) computed over too many partition bands.  accesses unititialized 
    values of qthr.  

(4) short block loops run up to 42, the max number of critical bands in MPEG1.
    (but there are up to 46 short block critical bands in MPEG2.)


This is my highest priority, but the fix will take a few more
evenings.

Mark




--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to