[vorbis] bark_noise

Michael Smith msmith at labyrinth.net.au
Tue Oct 31 17:18:00 PST 2000



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 at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list