[mad-dev] mad_frame subbands and filtering

Bertrand Petit eemad@phoe.frmug.org
Tue, 8 Jul 2003 12:51:56 +0200


On Wed, Jul 02, 2003 at 05:17:34PM -0700, Rob Leslie wrote:
> On Sunday, June 29, 2003, at 10:02  PM, Bill Zissimopoulos wrote:
> > 2. What are the frequency ranges that each subband covers?
> 
> That depends on the sampling frequency. Generally the entire frequency 
> spectrum (up to the Nyquist frequency) has been divided into 32 
> equal-sized frequency bands. However, due to the nature of the 
> synthesis filter there is some overlap between bands, and this makes 
> applying anything other than a uniform filter on the subbands tricky at 
> best. For example, trying to implement a general EQ against the subband 
> samples will have disappointing results.

	I had a question similar to Bill's query but before going to
the mailing list I did a little experiment. I synthesized specialy
crafted frame where all subbands are except one:

	for(j=0;j<32;j++)
		SubBandsTemplate[j]=0;
	SubBandsTemplate[i]=MAD_F_ONE-1;

These frame were synthesized and the PCM analyzed through fftw: I got
strange results.

	The fake frame were as if comming from a 192000 kb/s audio
mpeg layer III stream with crc, normal LR stereo with no emphasis at
48000 Hz sample rate. The measured center frequency is the same for
two consecutive bands except for DC and the Nyquist frequency. Here is
the output of the test program:

subband #0: peak power at 0 Hz
subband #1: peak power at 1500 Hz
subband #2: peak power at 1500 Hz
subband #3: peak power at 3000 Hz
subband #4: peak power at 3000 Hz
subband #5: peak power at 4500 Hz
subband #6: peak power at 4500 Hz
subband #7: peak power at 6000 Hz
subband #8: peak power at 6000 Hz
subband #9: peak power at 7500 Hz
subband #10: peak power at 7500 Hz
subband #11: peak power at 9000 Hz
subband #12: peak power at 9000 Hz
subband #13: peak power at 10500 Hz
subband #14: peak power at 10500 Hz
subband #15: peak power at 12000 Hz
subband #16: peak power at 12000 Hz
subband #17: peak power at 13500 Hz
subband #18: peak power at 13500 Hz
subband #19: peak power at 15000 Hz
subband #20: peak power at 15000 Hz
subband #21: peak power at 16500 Hz
subband #22: peak power at 16500 Hz
subband #23: peak power at 18000 Hz
subband #24: peak power at 18000 Hz
subband #25: peak power at 19500 Hz
subband #26: peak power at 19500 Hz
subband #27: peak power at 21000 Hz
subband #28: peak power at 21000 Hz
subband #29: peak power at 22500 Hz
subband #30: peak power at 22500 Hz
subband #31: peak power at 24000 Hz

	I can't explain this behaviour. It is expected or is it a bug
in my test program (note that I'm familiar with the fftw library, I
may had used it improperly).

-- 
%!PS
297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100
180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180
0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont
240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage