DSPRelated.com
Forums

Help for sampling rate converter

Started by hsquared January 24, 2008

glen herrmannsfeldt wrote:


> When DAT tapes first came out the 48kHz sampling rate was supposedly > chosen to make sample rate conversion from 44.1kHz CDs hard.
I could never understand that fuss over the direct didital to digital copying. A naive copy through the analog will result in some deterioration still the resultant quality will be pretty good. Same applies to the video DRM crazyness.
> It seems, though, that there are 'good enough' algorithms that > are now implemented in one chip to convert from almost any > sampling rate to another, commonly used on inputs to digital > recorders. As I understand it, they interpolate to some high > rate such as 1MHz and then either select the nearest sample > or linear interpolation from that. It works even if the > two sources have different clocks, and so the conversion > is not synchronous.
It is very simple, similar to the delta sigma DAC followed by the delta sigma ADC. The signal is upsampled to ~12.288 MHz @ 1 bit, then asynchronously resampled and LPF decimated. Basically, the chip is very similar to a common audio codec without the analog part. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Jan 27, 3:48 pm, Michel Rouzic <Michel0...@yahoo.fr> wrote:
> Erratum : > > Michel Rouzic wrote: > > it makes interpolation by a non-integer > > ratio much *SOUND* harder than it is. > > weighted_value = original_signal[indexX] * (0.42 - 0.5*cos(2*pi * > > (indexX-indexA) / sincsize) + 0.08*cos(4*pi * (indexX-indexA) / > > sincsize)) * sin(2*pi*0.5 * (indexX-indexA)) / (indexX-indexA) > > More like : > > weighted_value = original_signal[indexX] * (0.42 - 0.5*cos(2*pi * > ((indexX-indexA) / sincsize + 0.5)) + 0.08*cos(4*pi * ((indexX- > indexA) / sincsize + 0.5)) * sin(2*pi*0.5 * (indexX-indexA)) / (indexX- > indexA) > > I always forget that the Blackman function doesn't peak at x = 0.0 but > at half its size.
Thinking in terms of sine evaluations per tap, using a Blackman window requires 3. I wonder how this compares to using Hamming or Von Hann window with a 50% wider window on the Sinc, but with only two sine evaluations per tap resulting in the same number per sample? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M http://www.nicholson.com/rhn/dsp.html

Andor wrote:

> > Well, every kernel interpolation can be written as an upfirdn- > procedure (exercise to the reader
Not really - although most can. Every resampling scheme ends up being of the form: For each output data point compute a weighted sum of some neighboring input data points That could be an FIR filter. But many image resampling algorithms don't follow this method in a linear fashion which means there will be no equivalent FIR. They often call these resampling schemes something like "smart" or "adaptive". Look it up if you are interested. Also the upfirdn (or multi-phase implementation thereof) procedure has (lower) limits to the extent of the resampling ratios it can handle. To get around this there may need to be some version of the non upfirdn procedure included to make it work at all. In those cases you wouldn't be able to achieve the equivalent with a pure upfirdn. -jim
jim wrote:
> Andor wrote: > > > Well, every kernel interpolation can be written as an upfirdn- > > procedure (exercise to the reader > > Not really - although most can. Every resampling scheme ends up being of > the form: > > For each output data point compute a weighted sum of some neighboring > input data points > > That could be an FIR filter. But many image resampling algorithms don't > follow this method in a linear fashion which means there will be no > equivalent FIR. They often call these resampling schemes something like > "smart" or "adaptive". Look it up if you are interested.
You're right. I should have added the qualifier "linear" in the sentence you quoted. Regards, Andor
> > Also the upfirdn (or multi-phase implementation thereof) procedure has > (lower) limits to the extent of the resampling ratios it can handle. To > get around this there may need to be some version of the non upfirdn > procedure included to make it work at all. In those cases you wouldn't be > able to achieve the equivalent with a pure upfirdn. > > -jim