diff options
| author | jon <jon@xiph.org> | 2000-05-01 05:46:23 +0000 |
|---|---|---|
| committer | jon <jon@xiph.org> | 2000-05-01 05:46:23 +0000 |
| commit | c8676ddad27bd857f24274cefcd3a8ddb7c49188 (patch) | |
| tree | 0449593b94bd2cb6abc24b6b14e74d357ce6c1f5 | |
| parent | aab86394a17f87c004867000d95359c68c278a08 (diff) | |
| download | libvorbis-git-c8676ddad27bd857f24274cefcd3a8ddb7c49188.tar.gz | |
Fixed usage of 'hypot' in visual c++ 6 -- was VERY slow.
svn path=/trunk/vorbis/; revision=350
| -rw-r--r-- | lib/lpc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -12,7 +12,7 @@ ******************************************************************** function: LPC low level routines - last mod: $Id: lpc.c,v 1.18 2000/02/23 09:24:28 xiphmont Exp $ + last mod: $Id: lpc.c,v 1.19 2000/05/01 05:46:23 jon Exp $ ********************************************************************/ @@ -296,7 +296,9 @@ void _vlpc_de_helper(double *curve,double *lpc,double amp, for(i=1;i<l->ln;i++){ double real=(curve[i]+curve[l2-i]); double imag=(curve[i]-curve[l2-i]); - curve[i]=(1./hypot(real+unit,imag)); + + double a = real + unit; + curve[i] = 1.0 / FAST_HYPOT(a, imag); } } } |
