X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Flsp.c;h=85880545159506a892dfcf80c0188f23f1ac4ab9;hb=679433ebb8287744a9801f847b7a105dbc2a0404;hp=c639d614c8a1386a6c41b6cec5326c2cf808f282;hpb=cbf2877701c6d6522602599f5d8ea27877c5c63d;p=platform%2Fupstream%2Flibvorbis.git diff --git a/lib/lsp.c b/lib/lsp.c index c639d61..8588054 100644 --- a/lib/lsp.c +++ b/lib/lsp.c @@ -11,7 +11,6 @@ ******************************************************************** function: LSP (also called LSF) conversion routines - last mod: $Id$ The LSP generation code is taken (with minimal modification and a few bugfixes) from "On the Computation of the LSP Frequencies" by @@ -46,7 +45,7 @@ implementation. The float lookup is likely the optimal choice on any machine with an FPU. The integer implementation is *not* fixed point (due to the need for a large dynamic range and thus a - seperately tracked exponent) and thus much more complex than the + separately tracked exponent) and thus much more complex than the relatively simple float implementations. It's mostly for future work on a fully fixed point implementation for processors like the ARM family. */ @@ -81,11 +80,11 @@ void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, float *ftmp=lsp; int c=m>>1; - do{ + while(c--){ q*=ftmp[0]-w; p*=ftmp[1]-w; ftmp+=2; - }while(--c); + } if(m&1){ /* odd order filter; slightly assymetric */ @@ -309,7 +308,6 @@ static int comp(const void *a,const void *b){ #define EPSILON 10e-7 static int Laguerre_With_Deflation(float *a,int ord,float *r){ int i,m; - double lastdelta=0.f; double *defl=alloca(sizeof(*defl)*(ord+1)); for(i=0;i<=ord;i++)defl[i]=a[i]; @@ -346,7 +344,6 @@ static int Laguerre_With_Deflation(float *a,int ord,float *r){ if(delta<0.f)delta*=-1; if(fabs(delta/new)<10e-12)break; - lastdelta=delta; } r[m-1]=new;