21 #include "../ogg/os_types.h"
25 #ifndef _V_IFDEFJAIL_H_
26 # define _V_IFDEFJAIL_H_
29 # define STIN static __inline__
31 # define STIN static __inline
37 # define rint(x) (floor((x)+0.5f))
41 # define M_PI (3.1415926536f)
46 # define rint(x) (floor((x)+0.5f))
47 # define NO_FLOAT_MATH_LIB
48 # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
52 # define FAST_HYPOT hypot
66 # define min(x,y) ((x)>(y)?(y):(x))
70 # define max(x,y) ((x)<(y)?(y):(x))
73 #if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__)
74 # define VORBIS_FPU_CONTROL
87 __asm__ __volatile__(
"fnstcw %0\n\t"
91 "fldcw %1\n\t":
"=m"(ret):
"m"(temp):
"dx");
96 __asm__ __volatile__(
"fldcw %0"::
"m"(fpu));
100 static inline int vorbis_ftoi(
double f){
104 __asm__(
"fistl %0":
"=m"(i) :
"t"(f));
110 #if defined(_WIN32) && !defined(__GNUC__) && !defined(__BORLANDC__)
111 # define VORBIS_FPU_CONTROL
115 static __inline
int vorbis_ftoi(
double f){
133 #ifndef VORBIS_FPU_CONTROL
137 static int vorbis_ftoi(
double f){
142 # define vorbis_fpu_setround(vorbis_fpu_control) {}
143 # define vorbis_fpu_restore(vorbis_fpu_control) {}
#define vorbis_fpu_setround(vorbis_fpu_control)
#define vorbis_fpu_restore(vorbis_fpu_control)