summaryrefslogtreecommitdiffstats
path: root/thirdparty/libtheora/mathops.h
diff options
context:
space:
mode:
authorDeeJayLSP <djlsplays@gmail.com>2022-09-27 21:18:11 -0300
committerDeeJayLSP <djlsplays@gmail.com>2022-10-18 21:15:13 -0300
commitb87584a070c5bb6ca1c51f756ec6db5ab4729349 (patch)
treedd3c528a2ee92d9bc2b406dfa7559e5fd6ed2123 /thirdparty/libtheora/mathops.h
parent92bcd3c01d5188480793c03b2b50e97363ceb624 (diff)
downloadredot-engine-b87584a070c5bb6ca1c51f756ec6db5ab4729349.tar.gz
Update libtheora to GIT (2020.10)
Diffstat (limited to 'thirdparty/libtheora/mathops.h')
-rw-r--r--thirdparty/libtheora/mathops.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/thirdparty/libtheora/mathops.h b/thirdparty/libtheora/mathops.h
index efbc5377b0..a1a4f9df0e 100644
--- a/thirdparty/libtheora/mathops.h
+++ b/thirdparty/libtheora/mathops.h
@@ -2,29 +2,27 @@
# define _mathops_H (1)
# include <ogg/ogg.h>
-# ifdef __GNUC_PREREQ
-# if __GNUC_PREREQ(3,4)
-# include <limits.h>
+# if __GNUC_PREREQ(3,4)
+# include <limits.h>
/*Note the casts to (int) below: this prevents OC_CLZ{32|64}_OFFS from
"upgrading" the type of an entire expression to an (unsigned) size_t.*/
-# if INT_MAX>=2147483647
-# define OC_CLZ32_OFFS ((int)sizeof(unsigned)*CHAR_BIT)
-# define OC_CLZ32(_x) (__builtin_clz(_x))
-# elif LONG_MAX>=2147483647L
-# define OC_CLZ32_OFFS ((int)sizeof(unsigned long)*CHAR_BIT)
-# define OC_CLZ32(_x) (__builtin_clzl(_x))
-# endif
-# if INT_MAX>=9223372036854775807LL
-# define OC_CLZ64_OFFS ((int)sizeof(unsigned)*CHAR_BIT)
-# define OC_CLZ64(_x) (__builtin_clz(_x))
-# elif LONG_MAX>=9223372036854775807LL
-# define OC_CLZ64_OFFS ((int)sizeof(unsigned long)*CHAR_BIT)
-# define OC_CLZ64(_x) (__builtin_clzl(_x))
-# elif LLONG_MAX>=9223372036854775807LL|| \
- __LONG_LONG_MAX__>=9223372036854775807LL
-# define OC_CLZ64_OFFS ((int)sizeof(unsigned long long)*CHAR_BIT)
-# define OC_CLZ64(_x) (__builtin_clzll(_x))
-# endif
+# if INT_MAX>=2147483647
+# define OC_CLZ32_OFFS ((int)sizeof(unsigned)*CHAR_BIT)
+# define OC_CLZ32(_x) (__builtin_clz(_x))
+# elif LONG_MAX>=2147483647L
+# define OC_CLZ32_OFFS ((int)sizeof(unsigned long)*CHAR_BIT)
+# define OC_CLZ32(_x) (__builtin_clzl(_x))
+# endif
+# if INT_MAX>=9223372036854775807LL
+# define OC_CLZ64_OFFS ((int)sizeof(unsigned)*CHAR_BIT)
+# define OC_CLZ64(_x) (__builtin_clz(_x))
+# elif LONG_MAX>=9223372036854775807LL
+# define OC_CLZ64_OFFS ((int)sizeof(unsigned long)*CHAR_BIT)
+# define OC_CLZ64(_x) (__builtin_clzl(_x))
+# elif LLONG_MAX>=9223372036854775807LL|| \
+ __LONG_LONG_MAX__>=9223372036854775807LL
+# define OC_CLZ64_OFFS ((int)sizeof(unsigned long long)*CHAR_BIT)
+# define OC_CLZ64(_x) (__builtin_clzll(_x))
# endif
# endif
@@ -134,8 +132,12 @@ int oc_ilog64(ogg_int64_t _v);
# define OC_STATIC_ILOG_64(_v) (OC_STATIC_ILOG6((ogg_int64_t)(_v)))
#define OC_Q57(_v) ((ogg_int64_t)(_v)<<57)
+#define OC_Q10(_v) ((_v)<<10)
ogg_int64_t oc_bexp64(ogg_int64_t _z);
ogg_int64_t oc_blog64(ogg_int64_t _w);
+ogg_uint32_t oc_bexp32_q10(int _z);
+int oc_blog32_q10(ogg_uint32_t _w);
+
#endif