diff options
author | Zentaro Kavanagh <illiminable@xiph.org> | 2006-04-21 18:32:44 +0000 |
---|---|---|
committer | Zentaro Kavanagh <illiminable@xiph.org> | 2006-04-21 18:32:44 +0000 |
commit | 33d07d9f01d19eadaa3ccc3255e64f8818457e52 (patch) | |
tree | d516ed80bb10bfde333ce6b70533aac9deb41d8b /misc.h | |
parent | 99ef5101f31f961c1cdf8f5133133bacf21f7e79 (diff) | |
download | tremor-33d07d9f01d19eadaa3ccc3255e64f8818457e52.tar.gz |
* Use the provided STIN macros so it builds on win32
* Add VS2005 project files
git-svn-id: https://svn.xiph.org/trunk/Tremor@11211 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -51,17 +51,17 @@ union magic { }; #endif -static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { +STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { union magic magic; magic.whole = (ogg_int64_t)x * y; return magic.halves.hi; } -static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { +STIN ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { return MULT32(x,y)<<1; } -static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { +STIN ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { union magic magic; magic.whole = (ogg_int64_t)x * y; return ((ogg_uint32_t)(magic.halves.lo)>>15) | ((magic.halves.hi)<<17); @@ -83,15 +83,15 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { * tables in this case. */ -static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { +STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { return (x >> 9) * y; /* y preshifted >>23 */ } -static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { +STIN ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { return (x >> 8) * y; /* y preshifted >>23 */ } -static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { +STIN ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { return (x >> 6) * y; /* y preshifted >>9 */ } @@ -128,7 +128,7 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { #else -static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, +STIN void XPROD32(ogg_int32_t a, ogg_int32_t b, ogg_int32_t t, ogg_int32_t v, ogg_int32_t *x, ogg_int32_t *y) { @@ -136,7 +136,7 @@ static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, *y = MULT32(b, t) - MULT32(a, v); } -static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, +STIN void XPROD31(ogg_int32_t a, ogg_int32_t b, ogg_int32_t t, ogg_int32_t v, ogg_int32_t *x, ogg_int32_t *y) { @@ -144,7 +144,7 @@ static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, *y = MULT31(b, t) - MULT31(a, v); } -static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, +STIN void XNPROD31(ogg_int32_t a, ogg_int32_t b, ogg_int32_t t, ogg_int32_t v, ogg_int32_t *x, ogg_int32_t *y) { @@ -159,7 +159,7 @@ static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, #ifndef _V_CLIP_MATH #define _V_CLIP_MATH -static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) { +STIN ogg_int32_t CLIP_TO_15(ogg_int32_t x) { int ret=x; ret-= ((x<=32767)-1)&(x-32767); ret-= ((x>=-32768)-1)&(x+32768); @@ -168,7 +168,7 @@ static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) { #endif -static inline ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap, +STIN ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap, ogg_int32_t b,ogg_int32_t bp, ogg_int32_t *p){ if(a && b){ @@ -185,7 +185,7 @@ static inline ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap, int _ilog(unsigned int); -static inline ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap, +STIN ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap, ogg_int32_t i, ogg_int32_t *p){ @@ -193,7 +193,7 @@ static inline ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap, return VFLOAT_MULT(a,ap,i<<-ip,ip,p); } -static inline ogg_int32_t VFLOAT_ADD(ogg_int32_t a,ogg_int32_t ap, +STIN ogg_int32_t VFLOAT_ADD(ogg_int32_t a,ogg_int32_t ap, ogg_int32_t b,ogg_int32_t bp, ogg_int32_t *p){ |