CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
esac
-
- case "$GCC_VERSION" in
- 4.*)
- # work around a problem with the gcc4 optimizer
- PROFILE="$DEBUG -fno-inline-functions"
- CFLAGS="$CFLAGS -fno-inline-functions"
- PROFILE="$PROFILE -fno-inline-functions" ;;
- esac
fi
CFLAGS="$CFLAGS $cflags_save"
LDFLAGS="$LDFLAGS $ldflags_save"
#ifdef VORBIS_IEEE_FLOAT32
static float unitnorm(float x){
- ogg_uint32_t *ix=(ogg_uint32_t *)&x;
- *ix=(*ix&0x80000000UL)|(0x3f800000UL);
- return(x);
-}
-
-static float FABS(float *x){
- ogg_uint32_t *ix=(ogg_uint32_t *)x;
- *ix&=0x7fffffffUL;
- return(*x);
+ union {
+ ogg_uint32_t i;
+ float f;
+ } ix;
+ ix.f = x;
+ ix.i = (ix.i & 0x80000000U) | (0x3f800000U);
+ return ix.f;
}
/* Segher was off (too high) by ~ .3 decibel. Center the conversion correctly. */
static float todB(const float *x){
- return (float)((*(ogg_int32_t *)x)&0x7fffffff) * 7.17711438e-7f -764.6161886f;
+ union {
+ ogg_uint32_t i;
+ float f;
+ } ix;
+ ix.f = *x;
+ ix.i = ix.i&0x7fffffff;
+ return (float)(ix.i * 7.17711438e-7f -764.6161886f);
}
#define todB_nn(x) todB(x)
return(1.f);
}
-#define FABS(x) fabs(*(x))
-
#define todB(x) (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f)
#define todB_nn(x) (*(x)==0.f?-400.f:log(*(x))*8.6858896f)