Ignore:
Timestamp:
Jul 26, 2006 5:04:54 PM (18 years ago)
Author:
bennylp
Message:
  • Bring speex codec up to date with their SVN trunk
  • Speex codec should work in FIXED_POINT mode when PJ_HAS_FLOATING_POINT is set to zero.
  • ulaw2linear will return zero if zero is given (this would make the VAD works better, and it also fixed click noise when call is established/hangup).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex/arch.h

    r278 r628  
    4242#define MAX16(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 16-bit value.   */ 
    4343#define ABS32(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 32-bit value.  */ 
     44#define MAX32(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 32-bit value.   */ 
    4445 
    4546#ifdef FIXED_POINT 
     
    4748typedef spx_int16_t spx_word16_t; 
    4849typedef spx_int32_t   spx_word32_t; 
    49 #ifdef _MSC_VER 
    50 typedef __int64      spx_word64_t; 
    51 #elif defined NO_LONGLONG 
    52 typedef double    spx_word64_t; 
    53 #else 
    54 typedef long long    spx_word64_t; 
    55 #endif 
    5650typedef spx_word32_t spx_mem_t; 
    5751typedef spx_word16_t spx_coef_t; 
     
    10498typedef float spx_word16_t; 
    10599typedef float spx_word32_t; 
    106 typedef float spx_word64_t; 
    107100 
    108101#define Q15ONE 1.0f 
     
    147140#define ADD32(a,b) ((a)+(b)) 
    148141#define SUB32(a,b) ((a)-(b)) 
    149 #define ADD64(a,b) ((a)+(b)) 
    150142#define MULT16_16_16(a,b)     ((a)*(b)) 
    151143#define MULT16_16(a,b)     ((spx_word32_t)(a)*(spx_word32_t)(b)) 
     
    162154#define MAC16_16_Q11(c,a,b)     ((c)+(a)*(b)) 
    163155#define MAC16_16_Q13(c,a,b)     ((c)+(a)*(b)) 
     156#define MAC16_16_P13(c,a,b)     ((c)+(a)*(b)) 
    164157#define MULT16_16_Q11_32(a,b)     ((a)*(b)) 
    165158#define MULT16_16_Q13(a,b)     ((a)*(b)) 
     
    167160#define MULT16_16_Q15(a,b)     ((a)*(b)) 
    168161#define MULT16_16_P15(a,b)     ((a)*(b)) 
     162#define MULT16_16_P13(a,b)     ((a)*(b)) 
     163#define MULT16_16_P14(a,b)     ((a)*(b)) 
    169164 
    170 #define DIV32_16(a,b)     ((a)/(b)) 
    171 #define DIV32(a,b)     ((a)/(b)) 
     165#define DIV32_16(a,b)     (((spx_word32_t)(a))/(spx_word16_t)(b)) 
     166#define PDIV32_16(a,b)     (((spx_word32_t)(a))/(spx_word16_t)(b)) 
     167#define DIV32(a,b)     (((spx_word32_t)(a))/(spx_word32_t)(b)) 
     168#define PDIV32(a,b)     (((spx_word32_t)(a))/(spx_word32_t)(b)) 
    172169 
    173170 
     
    175172 
    176173 
    177 #ifdef CONFIG_TI_C55X 
     174#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X) 
    178175 
    179176/* 2 on TI C5x DSP */ 
Note: See TracChangeset for help on using the changeset viewer.