search for: todb

Displaying 7 results from an estimated 7 matches for "todb".

Did you mean: tdb
2000 Sep 09
0
floating point exceptions, and questions.
...exceptions. These tend to have nasty effects like making libvorbis not work on your typical alpha (which doesn't mask them like x86 does by default). These seem to be turning up in a number of places, mainly in psy.c - I'm slowly dealing with each of them. The last one goes back to the todB() macro defined in scales.h: #define todB(x) ((x)==0?-9.e40:log(fabs(x))*8.6858896) Now that we're using floats instead of doubles in most places, this -9e40 is actually -INF, causing various problems. Easy enough to fix. So, finally getting to the question - what should this be changed to,...
2000 Jun 28
2
trivial optimization to psy.c
...memset(flr,0,n*sizeof(double)); - for(i=0;i<n;i++)work[i]=fabs(f[i]); - - /* find the highest peak so we know the limits */ for(i=0;i<n;i++){ - if(work[i]>specmax)specmax=work[i]; - } + work[i]=fabs(f[i]); + if(work[i]>specmax) + specmax=work[i]; + } specmax=todB(specmax); /* don't use the smoothed data for noise */ ================================================================= -Andy ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com --- >8 ---- Li...
2004 Aug 02
9
various patches from Mandrakelinux package
I was looking at the libvorbis 1.0 SRPM of Mandrakelinux, and it contained some patches which are not included in vorbis 1.1 svn. I'm attaching these patches here, because it could maybe be interesting to include these upstream. (libvorbis-1.1-aliasing.patch is actually a rediffed patch of Mandrakesoft's one for 1.0 against 1.1 svn). The author of these patches is Gwenole Beachesne,
2001 Jan 17
0
bitrate scaling by freq / quality bug ? / comments
...point constants: You should add some comments to these values, becasue in a few years nobody will know how did you get (calculate) these numbers... (in scales.h, mdct.h, smallft.c) Examples: // 8.68588963806503678 = 20*log10(2.0)/log(2.0) // 0.115129254649702278 = 1.0/8.68588963806503678 #define todB(x) (((x)==0.)? -9e20:log(fabs(x))*8.68588963806503678f) #define todB_nn(x) (((x)==0.)? -400:log(x)*8.68588963806503678f) #define fromdB(x) (exp((x)*0.115129254649702278f)) // 0.69314718055994529 = log(2.0) // 1.44269504088896339 = 1.0/log(2.0) // 6.96578428466208699 = log(125.0)*1.0/log(2.0) #de...
2001 Feb 03
1
fast math optimization patch
...s off all processor-specific code. - Added VORBIS_BIG_ENDIAN and VORBIS_LITTLE_ENDIAN since the other various macros for this are not portable - Switched a few tests to use VORBIS_BIG/LITTLE_ENDIAN - Modify scales.h - Import fast_math.h and use fast_log_est instead of log() for todB and todB_nn() The sqrt approximation functions are only applicable on PPC right now and this patch does not include the code to actually use them (since I wanted to provide some testing numbers that would better reflect likely changes in x86 performance). The log approximation breaks th...
2000 Oct 31
3
bark_noise
I am experiencing some difficulties with vorbis on my LX164 alpha. Specifically, in bark_noise (psy.c) I see the following behaviour on the first pass through the function: val=-3.4e38 del=1 noise[0]+=val*del noise[1]-=val*del norm[0]+=del norm[1]-=del del=1 noise[1]-=val*del <== here is the problem At this point, noise[1]==3.4e38. We are trying to add another 3.4e38 to it and this is
2000 Aug 28
3
optimization patches
...eird. unrolled && rerolled the decodevs loops. envelope.c if (fabs(...) < min) creates horrible assembler (gcc 2.95, x86), so changed to if (... < min && ... > -min). muchos faster. lsp.c put the fromdB() before linearmap cales.h todB_nn() for non-negative values. fabs() is horror. Added some prefixes to pack(), inverse(), et. al. (i.e., time0_pack() etc.) Think I still forgot some. I don't think you'll want to apply all of this, oh, especially not the debug output :-). Have some fun, Segher <HR NOSHADE> <...