summaryrefslogtreecommitdiff
path: root/src/post/goom/mathtools.h
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-06-27 11:58:47 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-06-27 11:58:47 +0000
commit90f730ca714fb53f47ee16be46fcb06bd98d53ed (patch)
treec028f9afa30ec4137501fdada9c6ef1130daf2fb /src/post/goom/mathtools.h
parent29f04d913513a470bc91aff3e6c0fca699e460f8 (diff)
downloadxine-lib-90f730ca714fb53f47ee16be46fcb06bd98d53ed.tar.gz
xine-lib-90f730ca714fb53f47ee16be46fcb06bd98d53ed.tar.bz2
include the new goom version 2k4-dev15
everybody: test, test, test CVS patchset: 6756 CVS date: 2004/06/27 11:58:47
Diffstat (limited to 'src/post/goom/mathtools.h')
-rwxr-xr-xsrc/post/goom/mathtools.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/post/goom/mathtools.h b/src/post/goom/mathtools.h
index 7ed0f80ef..0e2293c3f 100755
--- a/src/post/goom/mathtools.h
+++ b/src/post/goom/mathtools.h
@@ -1,7 +1,11 @@
+#ifndef MATHTOOLS_H
+#define MATHTOOLS_H
+
+
#define _double2fixmagic (68719476736.0*1.5)
-//2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor
+/* 2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor */
#define _shiftamt 16
-//16.16 fixed point representation,
+/* 16.16 fixed point representation */
#if BigEndian_
#define iexp_ 0
@@ -9,14 +13,14 @@
#else
#define iexp_ 1
#define iman_ 0
-#endif //BigEndian_
+#endif /* BigEndian_ */
+/* TODO: this optimization is very efficient: put it again when all works
#ifdef HAVE_MMX
-#define F2I(dbl,i) \
-{double d = dbl + _double2fixmagic; i = ((int*)&d)[iman_] >> _shiftamt; }
-#else
+#define F2I(dbl,i) {double d = dbl + _double2fixmagic; i = ((int*)&d)[iman_] >> _shiftamt;}
+#else*/
#define F2I(dbl,i) i=(int)dbl;
-#endif
+/*#endif*/
#if 0
#define SINCOS(f,s,c) \
@@ -24,3 +28,9 @@
#else
#define SINCOS(f,s,c) {s=sin(f);c=cos(f);}
#endif
+
+extern float sin256[256];
+extern float cos256[256];
+
+#endif
+