14 #ifndef __iLBC_ILBCDEFINE_H
15 #define __iLBC_ILBCDEFINE_H
19 #define BLOCKL_20MS 160
20 #define BLOCKL_30MS 240
21 #define BLOCKL_MAX 240
35 #define STATE_SHORT_LEN_30MS 58
36 #define STATE_SHORT_LEN_20MS 57
40 #define LPC_FILTERORDER 10
41 #define LPC_CHIRP_SYNTDENUM (float)0.9025
42 #define LPC_CHIRP_WEIGHTDENUM (float)0.4222
43 #define LPC_LOOKBACK 60
47 #define LPC_ASYMDIFF 20
48 #define LPC_BW (float)60.0
49 #define LPC_WN (float)1.0001
51 #define LSF_NUMBER_OF_STEPS 4
52 #define LPC_HALFORDER (LPC_FILTERORDER/2)
59 #define CB_FILTERLEN 2*4
60 #define CB_HALFFILTERLEN 4
61 #define CB_RESRANGE 34
62 #define CB_MAXGAIN (float)1.3
67 #define ENH_BLOCKL_HALF (ENH_BLOCKL/2)
74 #define ENH_OVERHANG 2
78 #define ENH_VECTL (ENH_BLOCKL+2*ENH_FL0)
84 #define ENH_CORRDIM (2*ENH_SLOP+1)
85 #define ENH_NBLOCKS (BLOCKL_MAX/ENH_BLOCKL)
86 #define ENH_NBLOCKS_EXTRA 5
87 #define ENH_NBLOCKS_TOT 8
89 #define ENH_BUFL (ENH_NBLOCKS_TOT)*ENH_BLOCKL
90 #define ENH_ALPHA0 (float)0.05
94 #define FILTERORDER_DS 7
100 #define NO_OF_BYTES_20MS 38
101 #define NO_OF_BYTES_30MS 50
102 #define NO_OF_WORDS_20MS 19
103 #define NO_OF_WORDS_30MS 25
106 #define ULP_CLASSES 3
110 #define FLOAT_MAX (float)1.0e37
111 #define EPS (float)2.220446049250313e-016
112 #define PI (float)3.14159265358979323846
113 #define MIN_SAMPLE -32768
114 #define MAX_SAMPLE 32767
115 #define TWO_PI (float)6.283185307
116 #define PI2 (float)0.159154943
120 int lsf_bits[6][ULP_CLASSES+2];
121 int start_bits[ULP_CLASSES+2];
122 int startfirst_bits[ULP_CLASSES+2];
123 int scale_bits[ULP_CLASSES+2];
124 int state_bits[ULP_CLASSES+2];
125 int extra_cb_index[CB_NSTAGES][ULP_CLASSES+2];
126 int extra_cb_gain[CB_NSTAGES][ULP_CLASSES+2];
127 int cb_index[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
128 int cb_gain[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
146 int no_of_bytes, no_of_words;
152 float anaMem[LPC_FILTERORDER];
155 float lsfold[LPC_FILTERORDER];
156 float lsfdeqold[LPC_FILTERORDER];
159 float lpc_buffer[LPC_LOOKBACK + BLOCKL_MAX];
176 int no_of_bytes, no_of_words;
182 float syntMem[LPC_FILTERORDER];
190 float lsfdeqold[LPC_FILTERORDER];
196 int prevLag, consPLICount, prevPLI, prev_enh_pl;
197 float prevLpc[LPC_FILTERORDER+1];
198 float prevResidual[NSUB_MAX*SUBL];
203 float old_syntdenum[(LPC_FILTERORDER + 1)*NSUB_MAX];
210 float enh_buf[ENH_BUFL];
211 float enh_period[ENH_NBLOCKS_TOT];