[linux-audio-dev] C2

Jens M Andreasen jens.andreasen at chello.se
Mon Jul 18 18:06:25 EDT 2005


> The project name is: "C2"!
> 


Now of course, anybody could say whatever about some imaginary future
algorithm. Whatever, this is the starting point:

 
// s(x) = 3 (x - x^3 / 2) (x^2 - 1)
// --------------------------------
inline 
static short s(short x)
{
  short x2 = (x * x) >> 15; // x^2;

  short x3 = x;             // (x - x^3 / 2)
  x >>= 1;                  // ...
  x3 -= ((x2 * x) >> 15);   // ...

  x2 += 0x8000;             // (x^2 - 1)

  return  ((x3 * x2) >> 15);
}



Oh yess, I have more ;)


> 
> --
> mvh // Jens M Andreasen
> 
-- 



More information about the linux-audio-dev mailing list