Re: [linux-audio-user] Re: [linux-audio-dev] swh plugins and fixing undenormalize

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] Re: [linux-audio-dev] swh plugins and fixing undenormalize
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Thu Jun 24 2004 - 12:25:07 EEST


On Thu, Jun 24, 2004 at 02:11:34AM -0300, Juan Linietsky wrote:
> #define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0)
> sample=0.0f
>
> however gcc 3.3 and 3.4 seem to produce an undesired effect
> when the optimizer is turned on, rendering this macro unusable..
> this breaks freeverb and a few other stuff I have that uses it.

It violates C99's pointer aliasing rules. I've posed a C99 friendly
version later in the thread.

Another point of differentiation between denomal hacks is tht this one
doesnt even analyse the potential denomal as a float, so you miss one
denomal operation that can occur with cleaner methods.

- Steve


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jun 24 2004 - 12:20:59 EEST