From d892896933349ab2c0203ad6c92188580aab7561 Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 28 Dec 1999 12:56:47 +0000 Subject: [PATCH] More optimization svn path=/trunk/vorbis/; revision=215 --- vq/vqsplit.c | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/vq/vqsplit.c b/vq/vqsplit.c index 14ba02f..3a83aec 100644 --- a/vq/vqsplit.c +++ b/vq/vqsplit.c @@ -59,15 +59,6 @@ (provided parameter), we may choose to ignore the overlap in order to pare the tree down */ -double *sortvals; -int els; -int dascsort(const void *a,const void *b){ - double av=sortvals[*((long *)a) * els]; - double bv=sortvals[*((long *)b) * els]; - if(avelements;k++){ + spinnit(); + + p[k]=0.; + for(j=0;jentrylist[entryindex[j]*v->elements+k]; + p[k]/=entries; + } + + /* try every normal */ + for(j=0;jbest){ + best=this; + bestj=j; + } + } + + pq_center_out(v,n,&c,p,_now(v,entryindex[bestj])); + } + /* find cells enclosing points */ /* count A/B points */ -- 2.7.4