search for: countabove

Displaying 2 results from an estimated 2 matches for "countabove".

2001 Feb 01
1
minor psy.c modifications
...lowidth,float hiwidth, int lomin,int himin, float *thresh,float *off){ long i,lo=0,hi=0; long median=LASTBIN; float bi,threshi; float negFour = -4.0f; float negQuarter = -0.25f; float radix[BINCOUNT]; float countabove=0.f; float countbelow=0.f; memset(radix,0,sizeof(radix)); for(i=0;i<n;i++){ // find new lo/hi bi=b[i]+hiwidth; for(;hi<n && (hi<i+himin || b[hi]<=bi);hi++){ int bin=BIN(f[hi]); if(bin>LASTBIN) bin=LASTBIN; if(bin<0) bin=0; radix[bin]++; if...
2001 Jan 27
1
optimization to bark_noise_median()
...box, this runs about 1.85x as fast as the current version, making the encoding speed about 6.5% faster (at least on my test case). The basic idea is to (a) avoid needless float/int conversions and (b) use multiplies instead of divides. I'm assuming (after having done some tests), that 'countabove+countbelow' is always non-negative. If this isn't the case, that would cause problems. The one other important point is putting -4.0 and -0.25 in stack registers since gcc on Mac OS X Public Beta is too stupid to do it itself and loads the constants inside loops. Duh. Hopefully this wil...