Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Sub-band filter bank output (Read 4546 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sub-band filter bank output

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.

Sub-band filter bank output

Reply #1
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!!  You can't get a DC component from a single pure tone !!!  Perhaps, you didn't average enough samples..

Please note that due to interchannel aliasing, the sidebands are not zero but gradually tapering off.

Sub-band filter bank output

Reply #2
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.


Sub-band filter bank output

Reply #3
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?

Sub-band filter bank output

Reply #4
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


Sub-band filter bank output

Reply #5
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..

Sub-band filter bank output

Reply #6
Quote
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
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.

Sub-band filter bank output

Reply #7
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.