[Speex-dev] Precomputing the remaining floating pointoperations.

Nic Roets speex at rational.co.za
Tue Sep 27 14:24:08 PDT 2005


Firstly, running for more channels will not break my hack. All that's needed
 is to call RECOPLAY_MARK with different identifiers (say nb, wb or uwb)
 before doing the appropriate initialization.

 Secondly, my attempts to do the Gaussian in fixed point went like this :
 Define a new constant lag_factor_gauss that is manually set equal to
 exp(sqr(2*M_PI*lag_factor)/-2) by whoever changes the lag_factor. From bash
 you can say
echo 'e((8*a(1)*.012)^2/-2)' |bc -l
Then we can replace the code in the init functions with :
   gauss = 16384;
   for (i=0;i<st->lpcSize+1;i++) {
      st->lagWindow[i]=gauss;
      for (j=i*i; j < (i+1)*(i+1); j++) {
         gauss = MULT16_16_Q15 (gauss, st->lag_factor_gauss);
      }
   }
A Taylor expansion will be more accurate.



More information about the Speex-dev mailing list