[MPlayer-dev-eng] [PATCH] fix for -srate bug

Michael Niedermayer michaelni at gmx.at
Thu Oct 28 15:13:23 CEST 2004


Hi

On Thursday 28 October 2004 13:18, Ed Wildgoose wrote:
> >blackman nuttall windowed sinc, its trivial to change it to ANY other
> > linear resampling algorithm, and ive never seen a non-linear one used for
> > audio, and u dont even seem to know what linear means ...
>
> I'm not quite sure why you and Richard have descended to name calling?
>
> I have a 1st class honours degree in mathematics, and so I feel
> reasonably comfortable with the definition of "linear".  On the other
> hand, DSP is not something that I have studied previously, and so like
> the rest of us, I am learning.  I haven't intentionally claimed to be a
> DSP guru, and I thought I had said as much in a previous email.  I
> certainly should think that we have already lost the average reader in
> this thread already...
>
> For those still following, and who aren't DSP gurus like Michael and
> Richard, then I would claim that the comment "ive never seen a
> non-linear one used" is slightly misleading.  First, many of the better
> resampling routines use sinc based interpolation between samples.
> However, whilst the sinc function is non-linear (and infinitely long),
> it turns out that you can approximate it using only (finite) linear
> functions to a high degree of accuracy.  This is the technique used in
> libsamplerate.

wikipeda:
----
    A linear function is a mathematical term of the form: 
    f(x) = m x + c
----

sinc (sin(x)/x) is non linear, but that is completely irrelevant because sinc 
isnt a resampling function, a resampling function is a function which takes a 
vector of samples and outputs another vector of samples (r(x) = y | x,y is in 
R^n)

sinc resampling:
sinc(x)= sin(x)/x
y[i] = sum_j sinc(c*(i-j))*x[j]

the sinc resampler is linear, or more specific it can be written as f(x)= mx
proof:
m[i,j] = sinc(c*(i-j))

[...]

-- 
Michael

"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire




More information about the MPlayer-dev-eng mailing list