shithub: opus

Download patch

ref: 3e4afc6fd2b03616db34098d5131f7f1bd3c0e32
parent: 9cca20aaafe487acc2da1912f77b35de70358640
author: Gregory Maxwell <[email protected]>
date: Wed Dec 14 10:54:07 EST 2011

Removes a number of macro definitions which are used nowhere in the codebase.

--- a/silk/MacroCount.h
+++ b/silk/MacroCount.h
@@ -710,7 +710,6 @@
 }
 
 #else
-#define exVarDefine
 #define varDefine
 #define silk_SaveCount()
 
--- a/silk/PLC.h
+++ b/silk/PLC.h
@@ -34,7 +34,6 @@
 #define V_PITCH_GAIN_START_MIN_Q14      11469               /* 0.7 in Q14               */
 #define V_PITCH_GAIN_START_MAX_Q14      15565               /* 0.95 in Q14              */
 #define MAX_PITCH_LAG_MS                18
-#define SA_THRES_Q8                     50
 #define RAND_BUF_SIZE                   128
 #define RAND_BUF_MASK                   ( RAND_BUF_SIZE - 1 )
 #define LOG2_INV_LPC_GAIN_HIGH_THRES    3                   /* 2^3 = 8 dB LPC gain      */
--- a/silk/SigProc_FIX.h
+++ b/silk/SigProc_FIX.h
@@ -483,8 +483,6 @@
 #define silk_RSHIFT(a, shift)               silk_RSHIFT32(a, shift)                         /* shift >= 0, shift < 32 */
 
 /* saturates before shifting */
-#define silk_LSHIFT_SAT16(a, shift)         (silk_LSHIFT16( silk_LIMIT( (a), silk_RSHIFT16( silk_int16_MIN, (shift) ), \
-                                                    silk_RSHIFT16( silk_int16_MAX, (shift) ) ), (shift) ))
 #define silk_LSHIFT_SAT32(a, shift)         (silk_LSHIFT32( silk_LIMIT( (a), silk_RSHIFT32( silk_int32_MIN, (shift) ), \
                                                     silk_RSHIFT32( silk_int32_MAX, (shift) ) ), (shift) ))
 
@@ -565,8 +563,6 @@
 #define silk_abs_int64(a)                   (((a) >  0)  ? (a) : -(a))
 
 #define silk_sign(a)                        ((a) > 0 ? 1 : ( (a) < 0 ? -1 : 0 ))
-
-#define silk_sqrt(a)                        (sqrt(a))
 
 /* PSEUDO-RANDOM GENERATOR                                                          */
 /* Make sure to store the result as the seed for the next call (also in between     */
--- a/silk/debug.h
+++ b/silk/debug.h
@@ -269,9 +269,6 @@
     }                                                               \
 }
 
-/* micro sec */
-#define silk_GETTIME(void)       time = (opus_int64) silk_GetHighResolutionTime();
-
 #else /* SILK_DEBUG */
 
 /* define macros as empty strings */
--- a/silk/define.h
+++ b/silk/define.h
@@ -179,11 +179,6 @@
 # define NSQ_LPC_BUF_LENGTH                     DECISION_DELAY
 #endif
 
-/***********************/
-/* High pass filtering */
-/***********************/
-#define HIGH_PASS_INPUT                         1
-
 /***************************/
 /* Voice activity detector */
 /***************************/
--- a/silk/float/SigProc_FLP.h
+++ b/silk/float/SigProc_FLP.h
@@ -152,9 +152,6 @@
 #define silk_max_float( a, b )                  (((a) > (b)) ? (a) :  (b))
 #define silk_abs_float( a )                     ((silk_float)fabs(a))
 
-#define silk_LIMIT_float( a, limit1, limit2 )   ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \
-                                                                     : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))))
-
 /* sigmoid function */
 static inline silk_float silk_sigmoid( silk_float x )
 {
--- a/silk/macros.h
+++ b/silk/macros.h
@@ -130,7 +130,6 @@
 #ifndef matrix_c_ptr
 #   define matrix_c_ptr(Matrix_base_adr, row, column, M)    *(Matrix_base_adr + ((row)+(M)*(column)))
 #endif
-#define matrix_c_adr(Matrix_base_adr, row, column, M)        (Matrix_base_adr + ((row)+(M)*(column)))
 
 #endif /* SILK_MACROS_H */
 
--- a/silk/pitch_est_defines.h
+++ b/silk/pitch_est_defines.h
@@ -45,7 +45,6 @@
 #define PE_MAX_FRAME_LENGTH         ( PE_MAX_FRAME_LENGTH_MS * PE_MAX_FS_KHZ )
 #define PE_MAX_FRAME_LENGTH_ST_1    ( PE_MAX_FRAME_LENGTH >> 2 )
 #define PE_MAX_FRAME_LENGTH_ST_2    ( PE_MAX_FRAME_LENGTH >> 1 )
-#define PE_MAX_SF_FRAME_LENGTH      ( PE_SUB_FRAME * PE_MAX_FS_KHZ )
 
 #define PE_MAX_LAG_MS               18           /* 18 ms -> 56 Hz */
 #define PE_MIN_LAG_MS               2            /* 2 ms -> 500 Hz */
@@ -58,9 +57,6 @@
 
 #define PE_NB_CBKS_STAGE2           3
 #define PE_NB_CBKS_STAGE2_EXT       11
-
-#define PE_CB_mn2                   1
-#define PE_CB_mx2                   2
 
 #define PE_NB_CBKS_STAGE3_MAX       34
 #define PE_NB_CBKS_STAGE3_MID       24
--- a/silk/typedef.h
+++ b/silk/typedef.h
@@ -39,8 +39,6 @@
 #include <stdint.h>
 #endif
 
-#define silk_int_ptr_size intptr_t
-
 #if silk_USE_DOUBLE_PRECISION_FLOATS
 # define silk_float      double
 # define silk_float_MAX  DBL_MAX
@@ -63,13 +61,7 @@
 #define silk_int16_MIN   ((opus_int16)0x8000)                 /* -2^15     = -32768 */
 #define silk_int8_MAX    0x7F                                 /*  2^7 - 1  =  127 */
 #define silk_int8_MIN    ((opus_int8)0x80)                    /* -2^7      = -128 */
-
-#define silk_uint32_MAX  0xFFFFFFFF  /* 2^32 - 1 = 4294967295 */
-#define silk_uint32_MIN  0x00000000
-#define silk_uint16_MAX  0xFFFF      /* 2^16 - 1 = 65535 */
-#define silk_uint16_MIN  0x0000
-#define silk_uint8_MAX   0xFF        /*  2^8 - 1 = 255 */
-#define silk_uint8_MIN   0x00
+#define silk_uint8_MAX   0xFF                                 /*  2^8 - 1 = 255 */
 
 #define silk_TRUE        1
 #define silk_FALSE       0