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 generating a SIGFPE on my machine. Any ideas? Richard --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
At 03:54 PM 10/31/00 +0000, you wrote:>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 generating a SIGFPE on my machine.Strange. I went through this code a while ago to kill off some other FPEs. I tested on both alpha and x86, and fixed a closely related problem. (we were using something bigger than 3.4e38, which was fine for doubles, but got turned into +-INF when we moved to floats). After that fix, though, there weren't any troubles with FPEs in that bit of code, unless I turned on extra ones which aren't on by default. The code ends up getting reasonable values in there, too. So I'm not sure why you're having trouble. The problem is the todB() macro (scales.h). If the argument is 0, the 'correct' answer is -INF. We don't actually want it to do that, so we use a very large negative number which is non-infinite. For whatever reason, the value being used (-9e38) is too big. I think this can be safely increased without impacting anything else (try a couple of orders of magnitude, seemed to work ok when I fixed this code before). Michael --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Wed, Nov 01, 2000 at 12:18:00PM +1100, Michael Smith wrote:> At 03:54 PM 10/31/00 +0000, you wrote: > >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 generating a SIGFPE on my machine.I'll look at this tomorrow. There are a number of underflows I need to catch for beta 3 too. (Hmm... values that negative shouldn't be popping up in bark_noise...) Monty --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Michael Smith wrote :> At 11:23 AM 11/8/00 +0000, you wrote: > >I would like to understand what is going on, I freely admit. Having no > >signal processing knowledge means that looking at the code gives me > >headaches 8-) I would, however, be more than happy to read any weighty > >tomes if you could point me to any relevant ones. > > > >Given that the arrival time of beta 3 has been discussed in the past, I shall > >refrain from asking. However, I would appreciate knowing how to fix this > >particular problem so that I can move ahead and play with the alpha a bit > >more ;-) > > I think the particular problem you were encountering has been fixed in CVS > as of yesterday. Please try again. > > Short description: the code was converting some value to dB at one point. > You can't do this (you get -INF) if the value is 0, so the code was using a > large negative number instead. Too large. > > In the particular case it was being used in, anything negative got clipped > to 0 about 2 lines later, so it didn't matter. The code now uses -400 > instead. > > There may be other problems, but I think they've all been cleared up - let > us know (preferably with a backtrace of where things are dying) if anything > else breaks. > > MichaelWhat are those problems with -INF and large negative numbers ? AFAIK -INF is a valid value and the following code works ( almost ) as expected : /* BEGIN PROGRAM */ #include <math.h> #include <stdio.h> int main() { double a; a = log((double)0.0); printf ("isinf : %d\n",isinf(a)); printf ("3.0/a : %e\n",3.0/a); printf ("a : %e\n-----\n",a); a=a+a; printf ("isinf : %d\n",isinf(a)); printf ("3.0/a : %e\n",3.0/a); printf ("a : %e\n=====\n=====\n",a); a = HUGE_VAL; printf ("isinf : %d\n",isinf(a)); printf ("3.0/a : %e\n",3.0/a); printf ("a : %e\n-----\n",a); a=a+a; printf ("isinf : %d\n",isinf(a)); printf ("3.0/a : %e\n",3.0/a); printf ("a : %e\n-----\n",a); } /* END PROGRAM */ The output on HP-UX 10.20 : ------------------------------------ isinf : 0 3.0/a : -1.668805e-308 a : -1.797693e+308 ----- isinf : -1 3.0/a : -0.000000e+00 a : -inf ========isinf : 0 3.0/a : 1.668805e-308 a : 1.797693e+308 ----- isinf : 1 3.0/a : 0.000000e+00 a : inf ----- ------------------------------------ And on HP-UX 11.00 : isinf : 1 3.0/a : -0.000000e+00 a : -inf ----- isinf : 1 3.0/a : -0.000000e+00 a : -inf ========isinf : 1 3.0/a : 0.000000e+00 a : inf ----- isinf : 1 3.0/a : 0.000000e+00 a : inf ----- -- David Balazic -------------- "Be excellent to each other." - Bill & Ted - - - - - - - - - - - - - - - - - - - - - - --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.