- Timestamp:
- Jul 26, 2006 5:04:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/speex/fixed_generic.h
r278 r628 36 36 #define FIXED_GENERIC_H 37 37 38 #define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*( 1<<(bits))))39 #define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*( 1<<(bits))))38 #define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits)))) 39 #define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits)))) 40 40 41 41 #define NEG16(x) (-(x)) 42 42 #define NEG32(x) (-(x)) 43 #define EXTRACT16(x) ((spx_word16_t) x)44 #define EXTEND32(x) ((spx_word32_t) x)43 #define EXTRACT16(x) ((spx_word16_t)(x)) 44 #define EXTEND32(x) ((spx_word32_t)(x)) 45 45 #define SHR16(a,shift) ((a) >> (shift)) 46 46 #define SHL16(a,shift) ((a) << (shift)) … … 62 62 #define ADD32(a,b) ((spx_word32_t)(a)+(spx_word32_t)(b)) 63 63 #define SUB32(a,b) ((spx_word32_t)(a)-(spx_word32_t)(b)) 64 #define ADD64(a,b) ((spx_word64_t)(a)+(spx_word64_t)(b))65 64 66 65 … … 85 84 #define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11))) 86 85 #define MAC16_16_Q13(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),13))) 86 #define MAC16_16_P13(c,a,b) (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13))) 87 87 88 88 #define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11)) … … 98 98 99 99 #define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b)))) 100 #define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b)))) 100 101 #define DIV32(a,b) (((spx_word32_t)(a))/((spx_word32_t)(b))) 102 #define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b))) 101 103 102 104 #endif
Note: See TracChangeset
for help on using the changeset viewer.