View Single Post
  #2 (permalink)  
Old 10-20-2008, 11:30 PM
[email protected]
Guest
 
Posts: n/a
Default Re: Sample rate conversion, Multistage and polyphase?

On Oct 20, 4:59*pm, "baeksan" <breakcha...@yahoo.com> wrote:
> Hi,
>
> I'm working on a audio sample rate converter. *I'm interested particularly
> in the conversion from 44.1 to 48kHz. *I have a version that works using
> polyphase decomposition for a huge fir filter to convert from 44.1 to 48.
> I was trying to do this in a multistage cascade, but it seems to be taking
> up more cpu than just doing a one stage. *
>
> Is there an algorithm or block diagram someone has a pointer to, where
> multistage can be combined with polyphase decomposition when sample rate
> converting? *
>
> The way I am doing it currently is running my polyphase decomposition
> algorithm for each stage, looping over the number of samples however many
> stages there are. *I'm sure there is a way to combine the different stages
> with the polyphase decomposition, while iterating over the number of
> samples only once, but I can't seem to get my head around it.
>
> Thanks!


Think about writing a function that is a simple interpolator/
decimator. For example a 3:2 interpolator/decimator program would
interpolate by a factor of three and then decimate by a factor of two.
The trick is to count through the phases and know where the zeros are,
so you won't waste time computing with zeroes. Once you have such a
routine written then you can simply cascade multiples of these with
different/similar interpolation/decimation ratios to arrive at
essentially any rational transformation you need. The other part is to
design your FIR filter knowing where the overlap and don't car regions
fall. I did this years ago and it worked quite well. I even had the
code take the impulse response and break it up into its various
phases.

IHTH,

Clay





Reply With Quote