Help - Search - Members - Calendar
Full Version: Sub-band filter bank output
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
vitya
Hello!

I apologize if I get wrong place to ask.

I'm trying to develop MPEG-1 Layer II encoder. Now I work on sub-band filter bank. And I found some kind of strange (for me) behaviour of its output. I feed filter with sigle tone oscillations (simple sine wave). And output of filter produces sub-band samples, which have average value far from zero. I mean that all that picture looks like shifted relatively zero value. So I wondering whether it is "by design" and expected behaviour or just my buggy code. I would appreciate any suggestions.
wkwai
Without any sample output from your implementation, it is hard to tell...
You should present your subband filter output in a proper manner so that it is
easy for us to visualize.

The average should be zero otherwise, you have a DC component!! blink.gif You can't get a DC component from a single pure tone !!! sad.gif Perhaps, you didn't average enough samples..

Please note that due to interchannel aliasing, the sidebands are not zero but gradually tapering off.
vitya
O, sorry, I did not present it.

I'm using Matlab for visualisation purposes. I feed this filter with 1 kHz tone. So, as you can see at picture, it fits in second sub-band. But average level is not zero... Additionaly, I have put 480 samples on the tail of analysis vector X. So by input of next 32 I have full vector X. Otherwise first frame is irregular, but my objective is to encode only one frame.

user posted image
wkwai
Please explain the green, red, blue lines?
If the green line is the output.. then it is strange..
There seemed to be a negative offset..
How about trying the output of each of the subband filters with its
corresponding input sine frequencies?
How about trying out for more frames? Does the negative offset continue to exists?
vitya
Legend at the right of the figure maps number of sub-band to color of line. Number of colors is not sufficient and they cycle, but I made me sure that curve of interest is #2 (you may see its line on legend is thicker). As you suggested, I've tried other bands. I supplied frequensy of 4500 kHx, that is in the middle of the seventh sub-band - more strange... Output exceeds unity... Most likely it is a bug... But I have no idea, how it is possible to make error in two loops... Anyway, your comment turned me to look further. Thank you for that. More comments are greatly appreciated

user posted image
wkwai
I think it is very likely to be a bug.. You shouldn't have a DC-offset at the output of the subband filters.. otherwise the energy of the subbands' output would not match the psychoacoustic fft level..

In MPEG4 AAC -SSR profile, there is no DC offset for the 4 PQF subbandfilter output..

I am just curious in the beginning because I have never observed the output of the 32 subband filters of MPEG1 audio encoder.

Why don't you try implementing the inverse subband filter as well so that you can reconstruct its output for comparison with the input audio? It won't be 100% matching but the errors should be in the range of +- 2 bits.. In this case you can be sure you have the filters correct..
vitya
QUOTE(wkwai @ Apr 7 2004, 07:38 PM)
I am just curious in the beginning because I have never observed the output of the 32 subband filters of MPEG1 audio encoder.

First, thank you very much for comments.
I asked for people's opinion because I also never seen that output and thus its hard for me to guess whether it correct or no. Most likely no, so I hav eto debug it more attentivly.
QUOTE(wkwai @ Apr 7 2004, 07:38 PM)
Why don't you try implementing the inverse subband filter as well so that you can reconstruct its output for comparison with the input audio?

Yes it could be helpful. At present time I did not relize it because decoder will not be required for my application. But yes, idea is rigth. Thank you.
vitya
I apologize for bothering people because of buggy code. Finaly I have fixed that problem. It was difficult for me to debug because I had no reference to compare. Probably it could be easier for me if I knew it before. So for other people I'll post few samples of sub-band filter output. Sure, they do not present full picture of behaviour and peculiarities left beyond the scope.

user posted image
user posted image
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.