summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjon <jon@xiph.org>2000-05-01 05:46:23 +0000
committerjon <jon@xiph.org>2000-05-01 05:46:23 +0000
commitc8676ddad27bd857f24274cefcd3a8ddb7c49188 (patch)
tree0449593b94bd2cb6abc24b6b14e74d357ce6c1f5
parentaab86394a17f87c004867000d95359c68c278a08 (diff)
downloadlibvorbis-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/lpc.c b/lib/lpc.c
index 5b97ee26..63e510f6 100644
--- a/lib/lpc.c
+++ b/lib/lpc.c
@@ -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);
}
}
}