> 
> > It is actually not so bad.  The filter banks create some leakage,
> > so the i'th coefficient is not a perfect cosine wave, but it
> > is more or less like this:
> >
> >
> > 576 coefficients representing 576 samples.
> > 0th coefficient is the constant mode (frequency = 0)
> > 575 coefficient is the highest frequency.  At 44.1kHz, this is 22.05kHz.
> >
> > So the frequency of the i'th coefficient is:
> >
> > (sampling_rate/2)*(i/575)
> >
> > For example, 44.1kHz scalefactor 1 contains MDCT coefficients 0,1,2,3,
> > which is 0-115Hz.  For short blocks, change 575 to 191.
> 
> 
> Ok, but how do you know wich coefficient goes in wich scalefactor? I didn't
> succeeded in finding it in the code, so I tryed with the C7 and C8 ISO
> tables, but it doesn't works, as I don't have 576 coefficients.
> 

The C7 & C8 tables map the FFT coefficient into partition bands used
for psycho-acoustics.  After doing a bunch of computations in
partition bands, these values are then mapped into scalefactor bands.

You want to use table B.8: It lists the MDCT coefficients in
scalefactor bands 0-20.  The missing MDCT coefficients (418-575) are
in scalefactor band 21 (16->22kHz).  I've never understood this, but
the standard ignores band 21.  No masking thresholds, no distortion
and no scalefactors are used in band 21.

Mark





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

Reply via email to