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: FYI: Wavelet Design (Read 5845 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FYI: Wavelet Design

Hi there !

I just wanted to share some results I got in the quest of designing orthogonal wavelets for audio coding. If you just google for wavelets you usually find some low-order wavelet filters with crappy frequency responses. These may work for coding of images but for audio they cannot be considered appropriate.

That'a why I tinkered around with some formulas, matlab and an old FIR design tool I wrote some years ago. I focussed on 2-channel filterbanks and found a simple but effective way of designing those filters. I just created an equiripple symmetric half band lowpass filter (of the form [... * 0 * 0 * 0.5 * 0 * 0 * ...]) with "double-zeros" on the stopband part of the unit-circle) and factored it into two filters while trying to minimise the group delay range of those two filters. The two new filters are then valid analysis and synthesis lowpass filters for an orthogonal 2 channel filterbank.

Here's an example:
type : orthogonal (non-linear phase)
order : 26
stopband of lowpass begins at 2/3*pi
stopband rejection : 65 dB
group delay range : 1.8 (in samples)
lowpass filter coefficients:
Code: [Select]
    3.041838032672176e-003
   4.567851925971925e-004
  -1.098218439091454e-002
  -3.662646591212077e-003
   2.590409895169532e-002
   2.238250550392113e-002
  -8.271594459588184e-003
   1.234127790542097e-002
   2.359303879336364e-002
  -8.263816787161239e-002
  -8.834730610626840e-002
   2.860866511973148e-001
   7.098094669141314e-001
   5.883907679001247e-001
   6.818727579056634e-002
  -1.668785609869112e-001
   2.641981212615146e-003
   1.103597635527988e-001
  -2.055388939118986e-003
  -7.573586789176684e-002
  -1.913078112714606e-002
   2.245601751887703e-002
   3.112779340745783e-003
  -9.091748528872354e-003
  -3.964428262059837e-004
   2.640004285867931e-003

As usual, to get the corresponsing highpass filter coeffs, reverse the order and negate every 2nd coeff.

The design method takes the desired order and stopband start frequency and gives the best possible equiripple filters for that kind of setup. It's currently not 100% matlab code and still partly done by hand - so, please don't request code for now - but you may suggest some input parameters (order and stopband start frequency ... or stopband start frequency and rjection). I could post the result).


have fun,
Sebi

FYI: Wavelet Design

Reply #1
Quote
Hi there !

I just wanted to share some results I got in the quest of designing orthogonal wavelets for audio coding. If you just google for wavelets you usually find some low-order wavelet filters with crappy frequency responses. [a href="index.php?act=findpost&pid=298397"][{POST_SNAPBACK}][/a]



I do wonder a bit. In light of what Brandenburg and Johnston, and then Sinha, and then others found about the use of wavelets in audio, and also due to the fact that you find that your "first" filter has to have the same length as the "block length" of a block filterbank if you want the same frequency, (which is to then say that there will always be a longer impulse response for a wavelet bank for a given frequency resolution) what do you want to do with wavelets?

There's somebody else who did this, too, but I'm being old and forgetful today, sorry if I left you out, somebody.
-----
J. D. (jj) Johnston

FYI: Wavelet Design

Reply #2
Forgive me for been a newbie, but what properties makes this impulse response a wavelet?
And what attractive properties does it have compared to any number of impulse responses used in filter banks over the years.

Since this is allready not linear phase, how about IIR filter banks ?
I saw in a paper somewhere they recommended the always stable class of IIR filters called gamma filters for use in (low bitrate?) audio compression.

FYI: Wavelet Design

Reply #3
Quote
I do wonder a bit. In light of what Brandenburg and Johnston, and then Sinha, and then others found about the use of wavelets in audio, and also due to the fact that you find that your "first" filter has to have the same length as the "block length" of a block filterbank if you want the same frequency, (which is to then say that there will always be a longer impulse response for a wavelet bank for a given frequency resolution) what do you want to do with wavelets?
[a href="index.php?act=findpost&pid=298419"][{POST_SNAPBACK}][/a]

One could implement a hybrid filterbank (ATRAC-like, just the non-PR QMF filters replaced). Alias cancellation after the 2nd stage will be a problem though due to the non-linear phase issue. I'm just playing around with those kind of filters atm -- nothing serious.

Quote
Forgive me for been a newbie, but what properties makes this impulse response a wavelet?
And what attractive properties does it have compared to any number of impulse responses used in filter banks over the years.
[a href="index.php?act=findpost&pid=298434"][{POST_SNAPBACK}][/a]

Actually "wavelet" is just a buzz word here. But some might refer to this kind of 2-channel filterbank as an orthogonal wavelet transform. (As in every filterbank the signal will be composed of a weighted sum of "wavelets" during the inverse operation. This filter is similar to a Daubechie wavelet filter but IMHO more appropriate for audio since we don't really care much about 'vanishing moments' (at least I don't) rather about a good frequency response.

edit: Let me stress that i did not say that wavelets are the way to go in future audio coding. But the 2-channelfilterbank example I gave is IMHO more appropriate for audio compared to those short filters they use for image coding (i.e. 9/7 tap biorthgonal wavelet trafo).

Sebi

FYI: Wavelet Design

Reply #4
i'm currently working on a hybrid lossless/lossy wavelet coder with
an integer 9/7 transform...lets see how far i get 

FYI: Wavelet Design

Reply #5
Quote
Alias cancellation after the 2nd stage will be a problem though due to the non-linear phase issue. I'm just playing around with those kind of filters atm -- nothing serious.


I'm not sure why this would be a problem, really, because you'll get the reverse phase shift when you reconstruct, won't you?

If an impulse in is an impulse out (i.e. if it's orthonormal) why would there be any problem. The nonlinear phase might spread stuff out in the analyzed MDCT domain, I suppose, but it should come back together as long as the reassembly process happens in reverse order, shouldn't it?

If not, I don't think it's a wavelet.
-----
J. D. (jj) Johnston

FYI: Wavelet Design

Reply #6
Quote
I'm not sure why this would be a problem, really, because you'll get the reverse phase shift when you reconstruct, won't you?
[a href="index.php?act=findpost&pid=298625"][{POST_SNAPBACK}][/a]

Yes. But i was talking about alias reduction in the transform domain like it's done in MP3 to compensate for the frequency alias of the PQF filterbank. I'm not sure but I suspect that it will be harder with a non-linear phase wavelet decomposition to compensate compared to a stacked linear phase QMF decomposition as first transform stage. I'm going to check that later ...


Sebi

FYI: Wavelet Design

Reply #7
Quote
Yes. But i was talking about alias reduction in the transform domain like it's done in MP3 to compensate for the frequency alias of the PQF filterbank. I'm not sure but I suspect that it will be harder with a non-linear phase wavelet decomposition to compensate compared to a stacked linear phase QMF decomposition as first transform stage. [a href="index.php?act=findpost&pid=298675"][{POST_SNAPBACK}][/a]


Good question, my instinct says you're right, but I don't in fact know for sure. The non-uniform delay is likely to get involved.
-----
J. D. (jj) Johnston