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: Interpretation of complex output from QMF filter? (Read 6573 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Interpretation of complex output from QMF filter?

Hi everybody!

I just started to work on audio coding. Currently looking at HE-AAC + Parametric stereo codec reference software from 3GPP standard..

In the encoder, a QMF analysis filtering is performed, which divides the input signal into 64 subband. The input is 2048 samples, and the output of the filter is 32 complex samples per subband. 

Can anyone explain to me, how to interprete the complex samples?

From my understanding, each subband's output contains time domain components (waveform)  within that particular subband's frequency range. But with complex output samples, which components is the actual time domain sample? Is it the magnitude of the complex samples? If so, what does the phase means? 

Please help.
Thankyou and regards,

Sam.

Interpretation of complex output from QMF filter?

Reply #1
Quote
Can anyone explain to me, how to interprete the complex samples?
[a href="index.php?act=findpost&pid=249266"][{POST_SNAPBACK}][/a]


You can't turn a complex sample into a real sample without losing some of the properties. So in fact you should look at the complex sample as being the time domain sample. You can calculate a magnitude and a phase and do all the well known complex math on these samples.
After processing, the complex time domain samples are converted to real data again using another complex QMF filterbank.

A complex QMF is used in SBR because there is no aliasing introduced in this filterbank. A downside to this is that it is oversampled by a factor 2 making it unusable in codecs like MP3. This is no problem for SBR because both analysis and synthesis are done in the decoder.

Menno

Interpretation of complex output from QMF filter?

Reply #2
Quote
Hi everybody!

I just started to work on audio coding. Currently looking at HE-AAC + Parametric stereo codec reference software from 3GPP standard..

[a href="index.php?act=findpost&pid=249266"][{POST_SNAPBACK}][/a]


I have looked into the 3GPP reference code, but I couldn't find any Parametric Stereo modules in it? It seemed to be that it contains the usual MS and Intensity Stereo.. 


wkwai

Interpretation of complex output from QMF filter?

Reply #3
Quote
Quote
Can anyone explain to me, how to interprete the complex samples?
[a href="index.php?act=findpost&pid=249266"][{POST_SNAPBACK}][/a]


You can't turn a complex sample into a real sample without losing some of the properties. So in fact you should look at the complex sample as being the time domain sample. You can calculate a magnitude and a phase and do all the well known complex math on these samples.
After processing, the complex time domain samples are converted to real data again using another complex QMF filterbank.

A complex QMF is used in SBR because there is no aliasing introduced in this filterbank. A downside to this is that it is oversampled by a factor 2 making it unusable in codecs like MP3. This is no problem for SBR because both analysis and synthesis are done in the decoder.

Menno
[a href="index.php?act=findpost&pid=249310"][{POST_SNAPBACK}][/a]


Do you mean that the input to the complex QMF filterbank is actually a mono channel ?? or is it stereo channel ?? 

From my understanding of the complex filterbank, it is possible to represent the stereo inputs as a pair of complex channels.. that is the L channel is real whereas the R channel is imaginary.. and thus it is also critically sampled.. 

wkwai

Interpretation of complex output from QMF filter?

Reply #4
Quote
Do you mean that the input to the complex QMF filterbank is actually a mono channel ?? or is it stereo channel ??  

From my understanding of the complex filterbank, it is possible to represent the stereo inputs as a pair of complex channels.. that is the L channel is real whereas the R channel is imaginary.. and thus it is also critically sampled..  

wkwai
[a href="index.php?act=findpost&pid=249427"][{POST_SNAPBACK}][/a]


The input and output are both mono, and because the output is complex it is not critically sampled.
Maybe what you're saying is also possible, but I have never seen that. And I don't think a critically sampled filterbank can be alias free?

Menno

Interpretation of complex output from QMF filter?

Reply #5
Quote
The input and output are both mono, and because the output is complex it is not critically sampled.
Maybe what you're saying is also possible, but I have never seen that. And I don't think a critically sampled filterbank can be alias free?

Menno
[a href="index.php?act=findpost&pid=249432"][{POST_SNAPBACK}][/a]



Hey.. I really don't know    in audio coding..
but in DSP filtering techniques, a complex input is alright.

Perhaps, much of the complication is in the real world interpretation of the meaning of the complex output such as temporal information etc-etc ??

wkwai

Interpretation of complex output from QMF filter?

Reply #6
Hi!!

Thanks for the reply and explanation.

The code from 3GPP is on Enhanced aacPlus General Audio Codec (3GPP TS 26.401 etc..).

The input to the QMF filterbank is mono channel, and the output is a set of complex value. I'm still confused as how to check the correctness of the complex output (as I'm trying to 'transfer' the code to MATLAB).

Let say I input a 1 kHz sinusoid with 32 kHz sampling frequency into the filter. Bandwidth of each subband is 16kHz/64 = 250 Hz (am I correct on this?). So the 1 kHz sinusoid lies in approximately 4th or 5th subband. How can I check this? Can I take the complex FFT at each subband, and safely say that there will be a spectral peak at 4th or 5th subband and none at other subbands?

Thank you in advance.
Sam.

Interpretation of complex output from QMF filter?

Reply #7
Quote
Hi!!

Thanks for the reply and explanation.

The code from 3GPP is on Enhanced aacPlus General Audio Codec (3GPP TS 26.401 etc..).

The input to the QMF filterbank is mono channel, and the output is a set of complex value. I'm still confused as how to check the correctness of the complex output (as I'm trying to 'transfer' the code to MATLAB).

Let say I input a 1 kHz sinusoid with 32 kHz sampling frequency into the filter. Bandwidth of each subband is 16kHz/64 = 250 Hz (am I correct on this?). So the 1 kHz sinusoid lies in approximately 4th or 5th subband. How can I check this? Can I take the complex FFT at each subband, and safely say that there will be a spectral peak at 4th or 5th subband and none at other subbands?

Thank you in advance.
Sam.
[a href="index.php?act=findpost&pid=249834"][{POST_SNAPBACK}][/a]


I think taking the FFT is ok, just remember that the frequencies are reversed in the odd subbands.

If you're doing this filterbank in Matlab it might be easier to take the direct implementation instead of looking at this source code. Look at the HE AAC specification for a block diagram.

Menno

Interpretation of complex output from QMF filter?

Reply #8
Quote
If you're doing this filterbank in Matlab it might be easier to take the direct implementation instead of looking at this source code. Look at the HE AAC specification for a block diagram.
[a href="index.php?act=findpost&pid=249861"][{POST_SNAPBACK}][/a]


Just out of curiosity:
Does someone know if there's a freely downloadable final draft of the HE-spec available like it's the case for ISO 14496-3 ? I'm actually not a fan of digging in C code.
Thanks.

SebastianG

Interpretation of complex output from QMF filter?

Reply #9
Quote
I think taking the FFT is ok, just remember that the frequencies are reversed in the odd subbands.


Menno
[a href="index.php?act=findpost&pid=249861"][{POST_SNAPBACK}][/a]


Thanks, I tried taking the FFT and the peak at corresponding subband match the frequency of the sinewave that I input, and that the frequency are reversed (mirrored) in odd subbands.

By the way, do you have any recommendation on books or website for QMF theory? I am a beginner and I find it difficult to grab the concept (eg. aliasing, complex QMF, etc..) because most of the books that I look at are very mathematical.

Regards,
Sam.

Interpretation of complex output from QMF filter?

Reply #10
Quote
I think taking the FFT is ok, just remember that the frequencies are reversed in the odd subbands.

[a href="index.php?act=findpost&pid=249861"][{POST_SNAPBACK}][/a]


Hi!
Just to clear some doubt. Why is the frequencies are reversed in the odd subbands? Is it due to the filter or the complex representation?

Thanks and regards,
Sam.