diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-09-14 15:39:23 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-09-14 15:39:23 +0000 |
commit | f3da42db0b3c3f01c2f65471c99f1678990c3063 (patch) | |
tree | aa58468cad366b90b6d25f1d1eb7ac101af5f864 /src/post/goom/mathtools.h | |
parent | f60312c6034431a59f0ef1bfb6a9b41f1c2eac99 (diff) | |
download | xine-lib-f3da42db0b3c3f01c2f65471c99f1678990c3063.tar.gz xine-lib-f3da42db0b3c3f01c2f65471c99f1678990c3063.tar.bz2 |
New files of the "new" goom version.
CVS patchset: 5377
CVS date: 2003/09/14 15:39:23
Diffstat (limited to 'src/post/goom/mathtools.h')
-rwxr-xr-x | src/post/goom/mathtools.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/post/goom/mathtools.h b/src/post/goom/mathtools.h new file mode 100755 index 000000000..7ed0f80ef --- /dev/null +++ b/src/post/goom/mathtools.h @@ -0,0 +1,26 @@ +#define _double2fixmagic (68719476736.0*1.5) +//2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor +#define _shiftamt 16 +//16.16 fixed point representation, + +#if BigEndian_ +#define iexp_ 0 +#define iman_ 1 +#else +#define iexp_ 1 +#define iman_ 0 +#endif //BigEndian_ + +#ifdef HAVE_MMX +#define F2I(dbl,i) \ +{double d = dbl + _double2fixmagic; i = ((int*)&d)[iman_] >> _shiftamt; } +#else +#define F2I(dbl,i) i=(int)dbl; +#endif + +#if 0 +#define SINCOS(f,s,c) \ + __asm__ __volatile__ ("fsincos" : "=t" (c), "=u" (s) : "0" (f)) +#else +#define SINCOS(f,s,c) {s=sin(f);c=cos(f);} +#endif |