Changeset 68 for libmpcdec/branches/zorg/src/math.h
- Timestamp:
- 10/06/06 17:14:05 (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
libmpcdec/branches/zorg/src/math.h
r63 r68 32 32 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 33 */ 34 35 34 /// \file math.h 36 35 /// Libmpcdec internal math routines. 36 #ifndef _MPCDEC_MATH_H_ 37 #define _MPCDEC_MATH_H_ 38 #ifdef WIN32 39 #pragma once 40 #endif 37 41 38 #ifndef _mpcdec_math_h_ 39 #define _mpcdec_math_h_ 42 #include <mpcdec/mpc_types.h> 40 43 41 //#define MPC_FIXED_POINT 44 #ifdef __cplusplus 45 extern "C" { 46 #endif 42 47 43 48 #define MPC_FIXED_POINT_SHIFT 16 44 49 50 45 51 #ifdef MPC_FIXED_POINT 46 52 47 48 53 #ifdef _WIN32_WCE 49 50 54 #include <cmnintrin.h> 51 52 55 #define MPC_HAVE_MULHIGH 53 54 56 #endif 55 56 57 57 58 #define MPC_FIXED_POINT_SCALE_SHIFT (MPC_FIXED_POINT_SHIFT + MPC_FIXED_POINT_FRACTPART) 58 59 #define MPC_FIXED_POINT_SCALE (1 << (MPC_FIXED_POINT_SCALE_SHIFT - 1)) 59 60 60 61 61 //in fixedpoint mode, results in decode output buffer are in -MPC_FIXED_POINT_SCALE ... MPC_FIXED_POINT_SCALE range 62 62 63 63 #define MPC_FIXED_POINT_FRACTPART 14 64 typedef mpc_int32_t MPC_SAMPLE_FORMAT;65 64 66 65 typedef mpc_int64_t MPC_SAMPLE_FORMAT_MULTIPLY; … … 119 118 //in floating-point mode, decoded samples are in -1...1 range 120 119 121 typedef float MPC_SAMPLE_FORMAT;122 123 120 #define MAKE_MPC_SAMPLE(X) ((MPC_SAMPLE_FORMAT)(X)) 124 121 #define MAKE_MPC_SAMPLE_EX(X,Y) ((MPC_SAMPLE_FORMAT)(X)) … … 141 138 #endif 142 139 143 #endif // _mpcdec_math_h_ 144 140 #ifdef __cplusplus 141 } 142 #endif 143 #endif
Note: See TracChangeset
for help on using the changeset viewer.