Coverage Report

Created: 2025-12-14 06:54

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libsndfile/src/GSM610/gsm610_priv.h
Line
Count
Source
1
/*
2
 * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
3
 * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
4
 * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
5
 */
6
7
#ifndef PRIVATE_H
8
#define PRIVATE_H
9
10
#include <stdint.h>
11
12
/* Added by Erik de Castro Lopo */
13
#define USE_FLOAT_MUL
14
#define FAST
15
#define WAV49
16
17
#ifdef __cplusplus
18
#error "This code is not designed to be compiled with a C++ compiler."
19
#endif
20
/* Added by Erik de Castro Lopo */
21
22
struct gsm_state
23
{ int16_t     dp0 [280] ;
24
25
  int16_t     z1 ;      /* preprocessing.c, Offset_com. */
26
  int32_t   L_z2 ;      /*                  Offset_com. */
27
  int       mp ;      /*                  Preemphasis */
28
29
  int16_t     u [8] ;     /* short_term_aly_filter.c  */
30
  int16_t     LARpp [2][8] ;  /*                              */
31
  int16_t     j ;       /*                              */
32
33
  int16_t     ltp_cut ;   /* long_term.c, LTP crosscorr.  */
34
  int16_t     nrp ;       /* 40 */  /* long_term.c, synthesis */
35
  int16_t     v [9] ;     /* short_term.c, synthesis  */
36
  int16_t     msr ;     /* decoder.c, Postprocessing  */
37
38
  char      verbose ;   /* only used if !NDEBUG   */
39
  char      fast ;      /* only used if FAST    */
40
41
  char      wav_fmt ;   /* only used if WAV49 defined */
42
  unsigned char frame_index ; /*            odd/even chaining */
43
  unsigned char frame_chain ; /*   half-byte to carry forward */
44
45
  /* Moved here from code.c where it was defined as static */
46
  int16_t e [50] ;
47
} ;
48
49
typedef struct gsm_state GSM_STATE ;
50
51
67.1M
#define MIN_WORD  (-32767 - 1)
52
28.0M
#define MAX_WORD  32767
53
54
0
#define MIN_LONGWORD  (-2147483647 - 1)
55
0
#define MAX_LONGWORD  2147483647
56
57
/* Signed arithmetic shift right. */
58
static inline int16_t
59
SASR_W (int16_t x, int16_t by)
60
1.00M
{ if (x >= 0)
61
605k
    return x >> by ;
62
396k
  return ~ ((~x) >> by) ;
63
1.00M
} /* SASR_W */
Unexecuted instantiation: gsm_create.c:SASR_W
Unexecuted instantiation: gsm_decode.c:SASR_W
Unexecuted instantiation: gsm_encode.c:SASR_W
Unexecuted instantiation: gsm_option.c:SASR_W
Unexecuted instantiation: code.c:SASR_W
Unexecuted instantiation: decode.c:SASR_W
Unexecuted instantiation: long_term.c:SASR_W
Unexecuted instantiation: lpc.c:SASR_W
Unexecuted instantiation: preprocess.c:SASR_W
rpe.c:SASR_W
Line
Count
Source
60
24.4k
{ if (x >= 0)
61
24.4k
    return x >> by ;
62
0
  return ~ ((~x) >> by) ;
63
24.4k
} /* SASR_W */
short_term.c:SASR_W
Line
Count
Source
60
527k
{ if (x >= 0)
61
301k
    return x >> by ;
62
226k
  return ~ ((~x) >> by) ;
63
527k
} /* SASR_W */
Unexecuted instantiation: table.c:SASR_W
add.c:SASR_W
Line
Count
Source
60
450k
{ if (x >= 0)
61
280k
    return x >> by ;
62
170k
  return ~ ((~x) >> by) ;
63
450k
} /* SASR_W */
64
65
static inline int32_t
66
SASR_L (int32_t x, int16_t by)
67
0
{ if (x >= 0)
68
0
    return x >> by ;
69
0
  return ~ ((~x) >> by) ;
70
0
} /* SASR_L */
Unexecuted instantiation: gsm_create.c:SASR_L
Unexecuted instantiation: gsm_decode.c:SASR_L
Unexecuted instantiation: gsm_encode.c:SASR_L
Unexecuted instantiation: gsm_option.c:SASR_L
Unexecuted instantiation: code.c:SASR_L
Unexecuted instantiation: decode.c:SASR_L
Unexecuted instantiation: long_term.c:SASR_L
Unexecuted instantiation: lpc.c:SASR_L
Unexecuted instantiation: preprocess.c:SASR_L
Unexecuted instantiation: rpe.c:SASR_L
Unexecuted instantiation: short_term.c:SASR_L
Unexecuted instantiation: table.c:SASR_L
Unexecuted instantiation: add.c:SASR_L
71
72
/* Signed arithmetic shift left. */
73
static inline int16_t
74
SASL_W (int16_t x, int16_t by)
75
0
{ if (x >= 0)
76
0
    return x << by ;
77
0
  return - ((-x) << by) ;
78
0
} /* SASR_W */
Unexecuted instantiation: gsm_create.c:SASL_W
Unexecuted instantiation: gsm_decode.c:SASL_W
Unexecuted instantiation: gsm_encode.c:SASL_W
Unexecuted instantiation: gsm_option.c:SASL_W
Unexecuted instantiation: code.c:SASL_W
Unexecuted instantiation: decode.c:SASL_W
Unexecuted instantiation: long_term.c:SASL_W
Unexecuted instantiation: lpc.c:SASL_W
Unexecuted instantiation: preprocess.c:SASL_W
Unexecuted instantiation: rpe.c:SASL_W
Unexecuted instantiation: short_term.c:SASL_W
Unexecuted instantiation: table.c:SASL_W
Unexecuted instantiation: add.c:SASL_W
79
80
static inline int32_t
81
SASL_L (int32_t x, int16_t by)
82
0
{ if (x >= 0)
83
0
    return x << by ;
84
0
  return - ((-x) << by) ;
85
0
} /* SASR_L */
Unexecuted instantiation: gsm_create.c:SASL_L
Unexecuted instantiation: gsm_decode.c:SASL_L
Unexecuted instantiation: gsm_encode.c:SASL_L
Unexecuted instantiation: gsm_option.c:SASL_L
Unexecuted instantiation: code.c:SASL_L
Unexecuted instantiation: decode.c:SASL_L
Unexecuted instantiation: long_term.c:SASL_L
Unexecuted instantiation: lpc.c:SASL_L
Unexecuted instantiation: preprocess.c:SASL_L
Unexecuted instantiation: rpe.c:SASL_L
Unexecuted instantiation: short_term.c:SASL_L
Unexecuted instantiation: table.c:SASL_L
Unexecuted instantiation: add.c:SASL_L
86
87
/*
88
 *  Prototypes from add.c
89
 */
90
int16_t gsm_mult    (int16_t a, int16_t b) ;
91
int32_t gsm_L_mult  (int16_t a, int16_t b) ;
92
int16_t gsm_mult_r    (int16_t a, int16_t b) ;
93
94
int16_t gsm_div     (int16_t num, int16_t denum) ;
95
96
int16_t gsm_add     (int16_t a, int16_t b) ;
97
int32_t gsm_L_add   (int32_t a, int32_t b) ;
98
99
int16_t gsm_sub     (int16_t a, int16_t b) ;
100
int32_t gsm_L_sub   (int32_t a, int32_t b) ;
101
102
int16_t gsm_abs     (int16_t a) ;
103
104
int16_t gsm_norm    (int32_t a) ;
105
106
int32_t gsm_L_asl   (int32_t a, int n) ;
107
int16_t gsm_asl     (int16_t a, int n) ;
108
109
int32_t gsm_L_asr   (int32_t a, int n) ;
110
int16_t gsm_asr     (int16_t a, int n) ;
111
112
/*
113
 *  Inlined functions from add.h
114
 */
115
116
static inline int32_t
117
GSM_MULT_R (int16_t a, int16_t b)
118
3.13M
{ return (((int32_t) (a)) * ((int32_t) (b)) + 16384) >> 15 ;
119
3.13M
} /* GSM_MULT_R */
Unexecuted instantiation: gsm_create.c:GSM_MULT_R
Unexecuted instantiation: gsm_decode.c:GSM_MULT_R
Unexecuted instantiation: gsm_encode.c:GSM_MULT_R
Unexecuted instantiation: gsm_option.c:GSM_MULT_R
Unexecuted instantiation: code.c:GSM_MULT_R
decode.c:GSM_MULT_R
Line
Count
Source
118
1.31M
{ return (((int32_t) (a)) * ((int32_t) (b)) + 16384) >> 15 ;
119
1.31M
} /* GSM_MULT_R */
long_term.c:GSM_MULT_R
Line
Count
Source
118
1.31M
{ return (((int32_t) (a)) * ((int32_t) (b)) + 16384) >> 15 ;
119
1.31M
} /* GSM_MULT_R */
Unexecuted instantiation: lpc.c:GSM_MULT_R
Unexecuted instantiation: preprocess.c:GSM_MULT_R
rpe.c:GSM_MULT_R
Line
Count
Source
118
428k
{ return (((int32_t) (a)) * ((int32_t) (b)) + 16384) >> 15 ;
119
428k
} /* GSM_MULT_R */
short_term.c:GSM_MULT_R
Line
Count
Source
118
65.9k
{ return (((int32_t) (a)) * ((int32_t) (b)) + 16384) >> 15 ;
119
65.9k
} /* GSM_MULT_R */
Unexecuted instantiation: table.c:GSM_MULT_R
Unexecuted instantiation: add.c:GSM_MULT_R
120
121
static inline int32_t
122
GSM_MULT (int16_t a, int16_t b)
123
0
{ return (((int32_t) (a)) * ((int32_t) (b))) >> 15 ;
124
0
} /* GSM_MULT */
Unexecuted instantiation: gsm_create.c:GSM_MULT
Unexecuted instantiation: gsm_decode.c:GSM_MULT
Unexecuted instantiation: gsm_encode.c:GSM_MULT
Unexecuted instantiation: gsm_option.c:GSM_MULT
Unexecuted instantiation: code.c:GSM_MULT
Unexecuted instantiation: decode.c:GSM_MULT
Unexecuted instantiation: long_term.c:GSM_MULT
Unexecuted instantiation: lpc.c:GSM_MULT
Unexecuted instantiation: preprocess.c:GSM_MULT
Unexecuted instantiation: rpe.c:GSM_MULT
Unexecuted instantiation: short_term.c:GSM_MULT
Unexecuted instantiation: table.c:GSM_MULT
Unexecuted instantiation: add.c:GSM_MULT
125
126
static inline int32_t
127
GSM_L_MULT (int16_t a, int16_t b)
128
0
{ return ((int32_t) (a)) * ((int32_t) (b)) << 1 ;
129
0
} /* GSM_L_MULT */
Unexecuted instantiation: gsm_create.c:GSM_L_MULT
Unexecuted instantiation: gsm_decode.c:GSM_L_MULT
Unexecuted instantiation: gsm_encode.c:GSM_L_MULT
Unexecuted instantiation: gsm_option.c:GSM_L_MULT
Unexecuted instantiation: code.c:GSM_L_MULT
Unexecuted instantiation: decode.c:GSM_L_MULT
Unexecuted instantiation: long_term.c:GSM_L_MULT
Unexecuted instantiation: lpc.c:GSM_L_MULT
Unexecuted instantiation: preprocess.c:GSM_L_MULT
Unexecuted instantiation: rpe.c:GSM_L_MULT
Unexecuted instantiation: short_term.c:GSM_L_MULT
Unexecuted instantiation: table.c:GSM_L_MULT
Unexecuted instantiation: add.c:GSM_L_MULT
130
131
static inline int32_t
132
GSM_L_ADD (int32_t a, int32_t b)
133
0
{ uint32_t utmp ;
134
135
0
  if (a < 0 && b < 0)
136
0
  { utmp = (uint32_t) - ((a) + 1) + (uint32_t) - ((b) + 1) ;
137
0
    return (utmp >= (uint32_t) MAX_LONGWORD) ? MIN_LONGWORD : - (int32_t) utmp - 2 ;
138
0
    } ;
139
140
0
  if (a > 0 && b > 0)
141
0
  { utmp = (uint32_t) a + (uint32_t) b ;
142
0
    return (utmp >= (uint32_t) MAX_LONGWORD) ? MAX_LONGWORD : utmp ;
143
0
    } ;
144
145
0
  return a + b ;
146
0
} /* GSM_L_ADD */
Unexecuted instantiation: gsm_create.c:GSM_L_ADD
Unexecuted instantiation: gsm_decode.c:GSM_L_ADD
Unexecuted instantiation: gsm_encode.c:GSM_L_ADD
Unexecuted instantiation: gsm_option.c:GSM_L_ADD
Unexecuted instantiation: code.c:GSM_L_ADD
Unexecuted instantiation: decode.c:GSM_L_ADD
Unexecuted instantiation: long_term.c:GSM_L_ADD
Unexecuted instantiation: lpc.c:GSM_L_ADD
Unexecuted instantiation: preprocess.c:GSM_L_ADD
Unexecuted instantiation: rpe.c:GSM_L_ADD
Unexecuted instantiation: short_term.c:GSM_L_ADD
Unexecuted instantiation: table.c:GSM_L_ADD
Unexecuted instantiation: add.c:GSM_L_ADD
147
148
static inline int32_t
149
GSM_ADD (int16_t a, int16_t b)
150
15.4M
{ int32_t ltmp ;
151
152
15.4M
  ltmp = ((int32_t) a) + ((int32_t) b) ;
153
154
15.4M
  if (ltmp >= MAX_WORD)
155
1.33M
    return MAX_WORD ;
156
14.0M
  if (ltmp <= MIN_WORD)
157
320k
    return MIN_WORD ;
158
159
13.7M
  return ltmp ;
160
14.0M
} /* GSM_ADD */
Unexecuted instantiation: gsm_create.c:GSM_ADD
Unexecuted instantiation: gsm_decode.c:GSM_ADD
Unexecuted instantiation: gsm_encode.c:GSM_ADD
Unexecuted instantiation: gsm_option.c:GSM_ADD
Unexecuted instantiation: code.c:GSM_ADD
decode.c:GSM_ADD
Line
Count
Source
150
2.63M
{ int32_t ltmp ;
151
152
2.63M
  ltmp = ((int32_t) a) + ((int32_t) b) ;
153
154
2.63M
  if (ltmp >= MAX_WORD)
155
742k
    return MAX_WORD ;
156
1.89M
  if (ltmp <= MIN_WORD)
157
302k
    return MIN_WORD ;
158
159
1.59M
  return ltmp ;
160
1.89M
} /* GSM_ADD */
long_term.c:GSM_ADD
Line
Count
Source
150
1.31M
{ int32_t ltmp ;
151
152
1.31M
  ltmp = ((int32_t) a) + ((int32_t) b) ;
153
154
1.31M
  if (ltmp >= MAX_WORD)
155
163k
    return MAX_WORD ;
156
1.15M
  if (ltmp <= MIN_WORD)
157
3.03k
    return MIN_WORD ;
158
159
1.15M
  return ltmp ;
160
1.15M
} /* GSM_ADD */
Unexecuted instantiation: lpc.c:GSM_ADD
Unexecuted instantiation: preprocess.c:GSM_ADD
rpe.c:GSM_ADD
Line
Count
Source
150
428k
{ int32_t ltmp ;
151
152
428k
  ltmp = ((int32_t) a) + ((int32_t) b) ;
153
154
428k
  if (ltmp >= MAX_WORD)
155
0
    return MAX_WORD ;
156
428k
  if (ltmp <= MIN_WORD)
157
0
    return MIN_WORD ;
158
159
428k
  return ltmp ;
160
428k
} /* GSM_ADD */
short_term.c:GSM_ADD
Line
Count
Source
150
11.0M
{ int32_t ltmp ;
151
152
11.0M
  ltmp = ((int32_t) a) + ((int32_t) b) ;
153
154
11.0M
  if (ltmp >= MAX_WORD)
155
427k
    return MAX_WORD ;
156
10.6M
  if (ltmp <= MIN_WORD)
157
14.8k
    return MIN_WORD ;
158
159
10.5M
  return ltmp ;
160
10.6M
} /* GSM_ADD */
Unexecuted instantiation: table.c:GSM_ADD
Unexecuted instantiation: add.c:GSM_ADD
161
162
static inline int32_t
163
GSM_SUB (int16_t a, int16_t b)
164
10.6M
{ int32_t ltmp ;
165
166
10.6M
  ltmp = ((int32_t) a) - ((int32_t) b) ;
167
168
10.6M
  if (ltmp >= MAX_WORD)
169
606k
    ltmp = MAX_WORD ;
170
10.0M
  else if (ltmp <= MIN_WORD)
171
285k
    ltmp = MIN_WORD ;
172
173
10.6M
  return ltmp ;
174
10.6M
} /* GSM_SUB */
Unexecuted instantiation: gsm_create.c:GSM_SUB
Unexecuted instantiation: gsm_decode.c:GSM_SUB
Unexecuted instantiation: gsm_encode.c:GSM_SUB
Unexecuted instantiation: gsm_option.c:GSM_SUB
Unexecuted instantiation: code.c:GSM_SUB
Unexecuted instantiation: decode.c:GSM_SUB
Unexecuted instantiation: long_term.c:GSM_SUB
Unexecuted instantiation: lpc.c:GSM_SUB
Unexecuted instantiation: preprocess.c:GSM_SUB
Unexecuted instantiation: rpe.c:GSM_SUB
short_term.c:GSM_SUB
Line
Count
Source
164
10.6M
{ int32_t ltmp ;
165
166
10.6M
  ltmp = ((int32_t) a) - ((int32_t) b) ;
167
168
10.6M
  if (ltmp >= MAX_WORD)
169
606k
    ltmp = MAX_WORD ;
170
10.0M
  else if (ltmp <= MIN_WORD)
171
285k
    ltmp = MIN_WORD ;
172
173
10.6M
  return ltmp ;
174
10.6M
} /* GSM_SUB */
Unexecuted instantiation: table.c:GSM_SUB
Unexecuted instantiation: add.c:GSM_SUB
175
176
static inline int16_t
177
GSM_ABS (int16_t a)
178
0
{
179
0
  if (a > 0)
180
0
    return a ;
181
0
  if (a == MIN_WORD)
182
0
    return MAX_WORD ;
183
0
  return -a ;
184
0
} /* GSM_ADD */
Unexecuted instantiation: gsm_create.c:GSM_ABS
Unexecuted instantiation: gsm_decode.c:GSM_ABS
Unexecuted instantiation: gsm_encode.c:GSM_ABS
Unexecuted instantiation: gsm_option.c:GSM_ABS
Unexecuted instantiation: code.c:GSM_ABS
Unexecuted instantiation: decode.c:GSM_ABS
Unexecuted instantiation: long_term.c:GSM_ABS
Unexecuted instantiation: lpc.c:GSM_ABS
Unexecuted instantiation: preprocess.c:GSM_ABS
Unexecuted instantiation: rpe.c:GSM_ABS
Unexecuted instantiation: short_term.c:GSM_ABS
Unexecuted instantiation: table.c:GSM_ABS
Unexecuted instantiation: add.c:GSM_ABS
185
186
187
/*
188
 *  More prototypes from implementations..
189
 */
190
void Gsm_Coder (
191
    struct gsm_state  * S,
192
    int16_t * s,    /* [0..159] samples   IN  */
193
    int16_t * LARc,   /* [0..7] LAR coefficients  OUT */
194
    int16_t * Nc,   /* [0..3] LTP lag   OUT   */
195
    int16_t * bc,   /* [0..3] coded LTP gain  OUT   */
196
    int16_t * Mc,   /* [0..3] RPE grid selection  OUT     */
197
    int16_t * xmaxc,  /* [0..3] Coded maximum amplitude OUT */
198
    int16_t * xMc) ;  /* [13*4] normalized RPE samples OUT  */
199
200
void Gsm_Long_Term_Predictor (    /* 4x for 160 samples */
201
    struct gsm_state * S,
202
    int16_t * d,  /* [0..39]   residual signal  IN  */
203
    int16_t * dp, /* [-120..-1] d'    IN  */
204
    int16_t * e,  /* [0..40]      OUT */
205
    int16_t * dpp,  /* [0..40]      OUT */
206
    int16_t * Nc, /* correlation lag    OUT */
207
    int16_t * bc) ; /* gain factor      OUT */
208
209
void Gsm_LPC_Analysis (
210
    struct gsm_state * S,
211
    int16_t * s,    /* 0..159 signals IN/OUT  */
212
    int16_t * LARc) ; /* 0..7   LARc's  OUT */
213
214
void Gsm_Preprocess (
215
    struct gsm_state * S,
216
    int16_t * s, int16_t * so) ;
217
218
void Gsm_Encoding (
219
    struct gsm_state * S,
220
    int16_t * e,
221
    int16_t * ep,
222
    int16_t * xmaxc,
223
    int16_t * Mc,
224
    int16_t * xMc) ;
225
226
void Gsm_Short_Term_Analysis_Filter (
227
    struct gsm_state * S,
228
    int16_t * LARc, /* coded log area ratio [0..7]  IN  */
229
    int16_t * d) ;  /* st res. signal [0..159]  IN/OUT  */
230
231
void Gsm_Decoder (
232
    struct gsm_state * S,
233
    int16_t * LARcr,  /* [0..7]   IN  */
234
    int16_t * Ncr,    /* [0..3]     IN  */
235
    int16_t * bcr,    /* [0..3]   IN  */
236
    int16_t * Mcr,    /* [0..3]     IN  */
237
    int16_t * xmaxcr, /* [0..3]   IN  */
238
    int16_t * xMcr,   /* [0..13*4]    IN  */
239
    int16_t * s) ;    /* [0..159]   OUT   */
240
241
void Gsm_Decoding (
242
    struct gsm_state * S,
243
    int16_t   xmaxcr,
244
    int16_t Mcr,
245
    int16_t * xMcr,   /* [0..12]    IN  */
246
    int16_t * erp) ;  /* [0..39]    OUT   */
247
248
void Gsm_Long_Term_Synthesis_Filtering (
249
    struct gsm_state* S,
250
    int16_t Ncr,
251
    int16_t bcr,
252
    int16_t * erp,    /* [0..39]      IN  */
253
    int16_t * drp) ;  /* [-120..-1] IN, [0..40] OUT   */
254
255
void Gsm_RPE_Decoding (
256
  /*-struct gsm_state *S,-*/
257
    int16_t xmaxcr,
258
    int16_t Mcr,
259
    int16_t * xMcr, /* [0..12], 3 bits             IN      */
260
    int16_t * erp) ;  /* [0..39]                     OUT     */
261
262
void Gsm_RPE_Encoding (
263
    /*-struct gsm_state * S,-*/
264
    int16_t * e,      /* -5..-1][0..39][40..44     IN/OUT  */
265
    int16_t * xmaxc,    /*                              OUT */
266
    int16_t * Mc,     /*                              OUT */
267
    int16_t * xMc) ;    /* [0..12]                      OUT */
268
269
void Gsm_Short_Term_Synthesis_Filter (
270
    struct gsm_state * S,
271
    int16_t * LARcr,  /* log area ratios [0..7]  IN */
272
    int16_t * drp,    /* received d [0...39]     IN */
273
    int16_t * s) ;    /* signal   s [0..159]    OUT */
274
275
void Gsm_Update_of_reconstructed_short_time_residual_signal (
276
    int16_t * dpp,    /* [0...39] IN  */
277
    int16_t * ep,   /* [0...39] IN  */
278
    int16_t * dp) ;   /* [-120...-1]  IN/OUT  */
279
280
/*
281
 *  Tables from table.c
282
 */
283
#ifndef GSM_TABLE_C
284
285
extern int16_t gsm_A [8], gsm_B [8], gsm_MIC [8], gsm_MAC [8] ;
286
extern int16_t gsm_INVA [8] ;
287
extern int16_t gsm_DLB [4], gsm_QLB [4] ;
288
extern int16_t gsm_H [11] ;
289
extern int16_t gsm_NRFAC [8] ;
290
extern int16_t gsm_FAC [8] ;
291
292
#endif  /* GSM_TABLE_C */
293
294
295
#if __GNUC__
296
#define ALWAYS_INLINE   __attribute__ ((always_inline))
297
#elif defined _MSC_VER
298
#define ALWAYS_INLINE   __forceinline
299
#else
300
#define ALWAYS_INLINE
301
#endif
302
303
304
static inline int32_t ALWAYS_INLINE
305
arith_shift_left (int32_t x, int shift)
306
494k
{ return (int32_t) (((uint32_t) x) << shift) ;
307
494k
} /* arith_shift_left */
Unexecuted instantiation: gsm_create.c:arith_shift_left
Unexecuted instantiation: gsm_decode.c:arith_shift_left
Unexecuted instantiation: gsm_encode.c:arith_shift_left
Unexecuted instantiation: gsm_option.c:arith_shift_left
Unexecuted instantiation: code.c:arith_shift_left
Unexecuted instantiation: decode.c:arith_shift_left
Unexecuted instantiation: long_term.c:arith_shift_left
Unexecuted instantiation: lpc.c:arith_shift_left
Unexecuted instantiation: preprocess.c:arith_shift_left
rpe.c:arith_shift_left
Line
Count
Source
306
428k
{ return (int32_t) (((uint32_t) x) << shift) ;
307
428k
} /* arith_shift_left */
short_term.c:arith_shift_left
Line
Count
Source
306
65.9k
{ return (int32_t) (((uint32_t) x) << shift) ;
307
65.9k
} /* arith_shift_left */
Unexecuted instantiation: table.c:arith_shift_left
Unexecuted instantiation: add.c:arith_shift_left
308
309
static inline int32_t ALWAYS_INLINE
310
arith_shift_right (int32_t x, int shift)
311
0
{ if (x >= 0)
312
0
    return x << shift ;
313
0
  return ~ ((~x) << shift) ;
314
0
} /* arith_shift_right */
Unexecuted instantiation: gsm_create.c:arith_shift_right
Unexecuted instantiation: gsm_decode.c:arith_shift_right
Unexecuted instantiation: gsm_encode.c:arith_shift_right
Unexecuted instantiation: gsm_option.c:arith_shift_right
Unexecuted instantiation: code.c:arith_shift_right
Unexecuted instantiation: decode.c:arith_shift_right
Unexecuted instantiation: long_term.c:arith_shift_right
Unexecuted instantiation: lpc.c:arith_shift_right
Unexecuted instantiation: preprocess.c:arith_shift_right
Unexecuted instantiation: rpe.c:arith_shift_right
Unexecuted instantiation: short_term.c:arith_shift_right
Unexecuted instantiation: table.c:arith_shift_right
Unexecuted instantiation: add.c:arith_shift_right
315
316
317
/*
318
 *  Debugging
319
 */
320
#ifdef NDEBUG
321
322
# define  gsm_debug_int16_ts(a, b, c, d)    /* nil */
323
# define  gsm_debug_int32_ts(a, b, c, d)    /* nil */
324
# define  gsm_debug_int16_t(a, b)     /* nil */
325
# define  gsm_debug_int32_t(a, b)   /* nil */
326
327
#else /* !NDEBUG => DEBUG */
328
329
  void gsm_debug_int16_ts   (char * name, int, int, int16_t *) ;
330
  void gsm_debug_int32_ts (char * name, int, int, int32_t *) ;
331
  void gsm_debug_int32_t    (char * name, int32_t) ;
332
  void gsm_debug_int16_t      (char * name, int16_t) ;
333
334
#endif /* !NDEBUG */
335
336
#endif  /* PRIVATE_H */
337