Re: [LAU] klang

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-user@...>
Date: Wednesday, August 1, 2012 - 7:50 pm

On Tue, Jul 31, 2012 at 05:06:17PM -0400, Paul Davis wrote:

> it is NOT a reasonable attempt. its an effort by someone who doesn't really

Yep, it looks like a big waste of time and effort.

There *is* a grain of truth in the argument pro fixed point,
but it matters only in extreme cases and I really wonder if
the Klang author really understands anything of this.

If you compute a very long FIR filter in the 'obvious'
way using 32-bit floating point:

s = 0;
for (i = 0; i < N; i++) s += c [i] * x [i];
out = s;

with N = 100000 or so, you will be adding a nontrivial
amount of noise. The solution is to split up the sum,
first make sums of say 1000 samples then add these:

s1 = s2 = 0;
for (i = j = 0; i < N; i++, j++)
{
if (j == 1000)
{
s2 += s1;
s1 = 0;
j = 0;
}
s1 += c [i] * x [i];
}
out = s1 + s2;

The extreme case of this happens within the FFT: each of the
N outputs is a sum of N terms, but they are added in binary
tree fashion, first sums of two, then sums of four, etc.
It's the reason why computing a long FIR using an FFT-based
convolution engine is not only much more efficient, but also
more accurate than the direct form.

BTW, how long it is since TI introduced their first 40-bit
floating point DSP chip (the C30) ? 20 years or so ...

Ciao,

--
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] klang, Alexandre Prokoudine, (Tue Jul 31, 8:54 pm)
Re: [LAU] klang, Thijs van severen, (Tue Jul 31, 9:02 pm)
Re: [LAU] klang, Louigi Verona, (Tue Jul 31, 9:03 pm)
Re: [LAU] klang, Joel Roth, (Wed Aug 1, 4:56 am)
Re: [LAU] klang, Louigi Verona, (Wed Aug 1, 12:01 pm)
Re: [LAU] klang, Paul Davis, (Wed Aug 1, 12:09 pm)
Re: [LAU] klang, Louigi Verona, (Wed Aug 1, 12:34 pm)
Re: [LAU] klang, Oon-Ee Ng, (Thu Aug 2, 8:38 am)
Re: [LAU] klang, Thomas Vecchione, (Thu Aug 2, 11:12 am)
Re: [LAU] klang, Patrick Shirkey, (Thu Aug 2, 1:19 pm)
Re: [LAU] klang, Thomas Vecchione, (Thu Aug 2, 2:28 pm)
Re: [LAU] klang, Joe Hartley, (Thu Aug 2, 1:38 pm)
Re: [LAU] klang, Ken Restivo, (Thu Aug 2, 7:26 pm)
Re: [LAU] klang, Brett McCoy, (Thu Aug 2, 1:51 pm)
[LAU] OT: klang, Ralf Mardorf, (Sun Aug 5, 11:07 am)
Re: [LAU] klang, Folderol, (Thu Aug 2, 5:33 pm)
Re: [LAU] klang, Louigi Verona, (Thu Aug 2, 5:36 pm)
Re: [LAU] klang, Robin Gareus, (Thu Aug 2, 1:37 pm)
Re: [LAU] klang, Jeremy Jongepier, (Thu Aug 2, 2:19 pm)
Re: [LAU] klang, Paul Davis, (Thu Aug 2, 1:34 pm)
Re: [LAU] klang, Joe Hartley, (Thu Aug 2, 1:47 pm)
Re: [LAU] klang, michael noble, (Thu Aug 2, 9:16 am)
Re: [LAU] klang, Louigi Verona, (Thu Aug 2, 8:59 am)
Re: [LAU] klang, Oon-Ee Ng, (Thu Aug 2, 9:23 am)
Re: [LAU] klang, Nils, (Thu Aug 2, 9:04 am)
Re: [LAU] klang, Paul Davis, (Tue Jul 31, 9:06 pm)
Re: [LAU] klang, Fons Adriaensen, (Wed Aug 1, 7:50 pm)
Re: [LAU] klang, Rustom Mody, (Thu Aug 2, 2:53 am)
Re: [LAU] klang, Paul Davis, (Thu Aug 2, 3:18 am)
Re: [LAU] klang, Folderol, (Tue Jul 31, 9:32 pm)
Re: [LAU] klang, Louigi Verona, (Tue Jul 31, 9:18 pm)