FreeCalypso > hg > gsm-codec-lib
comparison libgsmefr/codec.h @ 52:988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 25 Nov 2022 08:22:41 +0000 |
parents | 36e1363ad885 |
children | 1cc2968f883f |
comparison
equal
deleted
inserted
replaced
51:722959d9410f | 52:988fd7ff514f |
---|---|
1 void Init_Coder_12k2 (void); | 1 void Init_Coder_12k2 (struct EFR_encoder_state *st); |
2 | 2 |
3 void Coder_12k2 ( | 3 void Coder_12k2 ( |
4 struct EFR_encoder_state *st, | |
4 Word16 ana[], /* output : Analysis parameters */ | 5 Word16 ana[], /* output : Analysis parameters */ |
5 Word16 synth[] /* output : Local synthesis */ | 6 Word16 synth[] /* output : Local synthesis */ |
6 ); | 7 ); |
7 | 8 |
8 void Init_Decoder_12k2 (void); | 9 void Init_Decoder_12k2 (struct EFR_decoder_state *st); |
9 | 10 |
10 void Decoder_12k2 ( | 11 void Decoder_12k2 ( |
12 struct EFR_decoder_state *st, | |
11 Word16 parm[], /* input : vector of synthesis parameters | 13 Word16 parm[], /* input : vector of synthesis parameters |
12 parm[0] = bad frame indicator (bfi) */ | 14 parm[0] = bad frame indicator (bfi) */ |
13 Word16 synth[], /* output: synthesis speech */ | 15 Word16 synth[], /* output: synthesis speech */ |
14 Word16 A_t[], /* output: decoded LP filter in 4 subframes */ | 16 Word16 A_t[], /* output: decoded LP filter in 4 subframes */ |
15 Word16 TAF, | 17 Word16 TAF, |
16 Word16 SID_flag | 18 Word16 SID_flag |
17 ); | 19 ); |
18 | 20 |
19 void Init_Post_Filter (void); | 21 void Init_Post_Filter (struct EFR_decoder_state *st); |
20 | 22 |
21 void Post_Filter ( | 23 void Post_Filter ( |
24 struct EFR_decoder_state *st, | |
22 Word16 *syn, /* in/out: synthesis speech (postfiltered is output) */ | 25 Word16 *syn, /* in/out: synthesis speech (postfiltered is output) */ |
23 Word16 *Az_4 /* input : interpolated LPC parameters in all subfr. */ | 26 Word16 *Az_4 /* input : interpolated LPC parameters in all subfr. */ |
24 ); | 27 ); |
25 | 28 |
26 void code_10i40_35bits ( | 29 void code_10i40_35bits ( |
34 ); | 37 ); |
35 void dec_10i40_35bits ( | 38 void dec_10i40_35bits ( |
36 Word16 index[], /* (i) : index of 10 pulses (sign+position) */ | 39 Word16 index[], /* (i) : index of 10 pulses (sign+position) */ |
37 Word16 cod[] /* (o) : algebraic (fixed) codebook excitation */ | 40 Word16 cod[] /* (o) : algebraic (fixed) codebook excitation */ |
38 ); | 41 ); |
42 | |
39 Word16 Dec_lag6 ( /* output: return integer pitch lag */ | 43 Word16 Dec_lag6 ( /* output: return integer pitch lag */ |
44 struct EFR_decoder_state *st, | |
40 Word16 index, /* input : received pitch index */ | 45 Word16 index, /* input : received pitch index */ |
41 Word16 pit_min, /* input : minimum pitch lag */ | 46 Word16 pit_min, /* input : minimum pitch lag */ |
42 Word16 pit_max, /* input : maximum pitch lag */ | 47 Word16 pit_max, /* input : maximum pitch lag */ |
43 Word16 i_subfr, /* input : subframe flag */ | 48 Word16 i_subfr, /* input : subframe flag */ |
44 Word16 L_frame_by2,/* input : speech frame size divided by 2 */ | 49 Word16 L_frame_by2,/* input : speech frame size divided by 2 */ |
45 Word16 *T0_frac, /* output: fractional part of pitch lag */ | 50 Word16 *T0_frac, /* output: fractional part of pitch lag */ |
46 Word16 bfi /* input : bad frame indicator */ | 51 Word16 bfi /* input : bad frame indicator */ |
47 ); | 52 ); |
48 Word16 d_gain_pitch ( /* out : quantized pitch gain */ | 53 Word16 d_gain_pitch ( /* out : quantized pitch gain */ |
54 struct EFR_decoder_state *st, | |
49 Word16 index, /* in : index of quantization */ | 55 Word16 index, /* in : index of quantization */ |
50 Word16 bfi, /* in : bad frame indicator (good = 0) */ | 56 Word16 bfi, /* in : bad frame indicator (good = 0) */ |
51 Word16 state, /* in : state of the state machine */ | 57 Word16 state, /* in : state of the state machine */ |
52 Word16 prev_bf, /* Previous bf */ | 58 Word16 prev_bf, /* Previous bf */ |
53 Word16 rxdtx_ctrl | 59 Word16 rxdtx_ctrl |
54 | 60 |
55 ); | 61 ); |
56 void d_gain_code ( | 62 void d_gain_code ( |
63 struct EFR_decoder_state *st, | |
57 Word16 index, /* input : received quantization index */ | 64 Word16 index, /* input : received quantization index */ |
58 Word16 code[], /* input : innovation codevector */ | 65 Word16 code[], /* input : innovation codevector */ |
59 Word16 lcode, /* input : codevector length */ | 66 Word16 lcode, /* input : codevector length */ |
60 Word16 *gain_code, /* output: decoded innovation gain */ | 67 Word16 *gain_code, /* output: decoded innovation gain */ |
61 Word16 bfi, /* input : bad frame indicator */ | 68 Word16 bfi, /* input : bad frame indicator */ |
65 Word16 i_subfr, | 72 Word16 i_subfr, |
66 Word16 rx_dtx_state | 73 Word16 rx_dtx_state |
67 | 74 |
68 ); | 75 ); |
69 void D_plsf_5 ( | 76 void D_plsf_5 ( |
77 struct EFR_decoder_state *st, | |
70 Word16 *indice, /* input : quantization indices of 5 submatrices */ | 78 Word16 *indice, /* input : quantization indices of 5 submatrices */ |
71 Word16 *lsp1_q, /* output: quantized 1st LSP vector */ | 79 Word16 *lsp1_q, /* output: quantized 1st LSP vector */ |
72 Word16 *lsp2_q, /* output: quantized 2nd LSP vector */ | 80 Word16 *lsp2_q, /* output: quantized 2nd LSP vector */ |
73 Word16 bfi, /* input : bad frame indicator (set to 1 if a bad | 81 Word16 bfi, /* input : bad frame indicator (set to 1 if a bad |
74 frame is received) */ | 82 frame is received) */ |
75 Word16 rxdtx_ctrl, | 83 Word16 rxdtx_ctrl, |
76 Word16 rx_dtx_state | 84 Word16 rx_dtx_state |
77 ); | 85 ); |
86 | |
78 Word16 Enc_lag6 ( /* output: Return index of encoding */ | 87 Word16 Enc_lag6 ( /* output: Return index of encoding */ |
79 Word16 T0, /* input : Pitch delay */ | 88 Word16 T0, /* input : Pitch delay */ |
80 Word16 *T0_frac, /* in/out: Fractional pitch delay */ | 89 Word16 *T0_frac, /* in/out: Fractional pitch delay */ |
81 Word16 *T0_min, /* in/out: Minimum search delay */ | 90 Word16 *T0_min, /* in/out: Minimum search delay */ |
82 Word16 *T0_max, /* in/out: Maximum search delay */ | 91 Word16 *T0_max, /* in/out: Maximum search delay */ |
88 Word16 q_gain_pitch ( /* Return index of quantization */ | 97 Word16 q_gain_pitch ( /* Return index of quantization */ |
89 Word16 *gain /* (i) : Pitch gain to quantize */ | 98 Word16 *gain /* (i) : Pitch gain to quantize */ |
90 ); | 99 ); |
91 | 100 |
92 Word16 q_gain_code ( /* Return quantization index */ | 101 Word16 q_gain_code ( /* Return quantization index */ |
102 struct EFR_encoder_state *st, | |
93 Word16 code[], /* (i) : fixed codebook excitation */ | 103 Word16 code[], /* (i) : fixed codebook excitation */ |
94 Word16 lcode, /* (i) : codevector size */ | 104 Word16 lcode, /* (i) : codevector size */ |
95 Word16 *gain, /* (i/o) : quantized fixed codebook gain */ | 105 Word16 *gain, /* (i/o) : quantized fixed codebook gain */ |
96 Word16 txdtx_ctrl, | 106 Word16 txdtx_ctrl, |
97 Word16 i_subfr | 107 Word16 i_subfr |
150 Word16 exc[], /* in/out: excitation buffer */ | 160 Word16 exc[], /* in/out: excitation buffer */ |
151 Word16 T0, /* input : integer pitch lag */ | 161 Word16 T0, /* input : integer pitch lag */ |
152 Word16 frac, /* input : fraction of lag */ | 162 Word16 frac, /* input : fraction of lag */ |
153 Word16 L_subfr /* input : subframe size */ | 163 Word16 L_subfr /* input : subframe size */ |
154 ); | 164 ); |
165 | |
155 void Q_plsf_5 ( | 166 void Q_plsf_5 ( |
167 struct EFR_encoder_state *st, | |
156 Word16 *lsp1, /* input : 1st LSP vector */ | 168 Word16 *lsp1, /* input : 1st LSP vector */ |
157 Word16 *lsp2, /* input : 2nd LSP vector */ | 169 Word16 *lsp2, /* input : 2nd LSP vector */ |
158 Word16 *lsp1_q, /* output: quantized 1st LSP vector */ | 170 Word16 *lsp1_q, /* output: quantized 1st LSP vector */ |
159 Word16 *lsp2_q, /* output: quantized 2nd LSP vector */ | 171 Word16 *lsp2_q, /* output: quantized 2nd LSP vector */ |
160 Word16 *indice, /* output: quantization indices of 5 matrices */ | 172 Word16 *indice, /* output: quantization indices of 5 matrices */ |