FreeCalypso > hg > gsm-codec-lib
annotate libgsmefr/codec.h @ 183:452c1d5a6268
libgsmefr BFI w/o data: emit zero output after decoder reset
In real-life usage, each EFR decoder session will most likely begin
with lots of BFI frames before the first real frame arrives. However,
because the spec-defined home state of the decoder is speech rather
than CN, our regular logic for BFI w/o data would have to feed
pseudorandom noise to the decoder (in the "fixed codebook excitation
pulses" part), which is silly to do at the beginning of the decoder
session right out of reset. Therefore, let's check reset_flag_old,
and if we are still in the reset state, simply emit zero output.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 03 Jan 2023 00:12:18 +0000 |
parents | d80e9f12a1d1 |
children |
rev | line source |
---|---|
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
1 void Init_Coder_12k2 (struct EFR_encoder_state *st); |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 void Coder_12k2 ( |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
4 struct EFR_encoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 Word16 ana[], /* output : Analysis parameters */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 Word16 synth[] /* output : Local synthesis */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
9 void Init_Decoder_12k2 (struct EFR_decoder_state *st); |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 void Decoder_12k2 ( |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
12 struct EFR_decoder_state *st, |
94
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
13 Word16 bfi, /* input : Bad Frame Indication */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
14 const Word16 parm[], /* input : vector of synthesis parameters */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
15 Word16 synth[], /* output: synthesis speech */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
16 Word16 A_t[], /* output: decoded LP filter in 4 subframes */ |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 Word16 TAF, |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 Word16 SID_flag |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
21 void Init_Post_Filter (struct EFR_decoder_state *st); |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 void Post_Filter ( |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
24 struct EFR_decoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 Word16 *syn, /* in/out: synthesis speech (postfiltered is output) */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 Word16 *Az_4 /* input : interpolated LPC parameters in all subfr. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 void code_10i40_35bits ( |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 Word16 x[], /* (i) : target vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 Word16 cn[], /* (i) : residual after long term prediction */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 Word16 h[], /* (i) : impulse response of weighted synthesis |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 filter */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 Word16 cod[], /* (o) : algebraic (fixed) codebook excitation */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Word16 y[], /* (o) : filtered fixed codebook excitation */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 Word16 indx[] /* (o) : index of 10 pulses (sign + position) */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 void dec_10i40_35bits ( |
94
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
39 const Word16 index[],/* (i) : index of 10 pulses (sign+position) */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
40 Word16 cod[] /* (o) : algebraic (fixed) codebook excitation */ |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 ); |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
42 |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 Word16 Dec_lag6 ( /* output: return integer pitch lag */ |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
44 struct EFR_decoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 Word16 index, /* input : received pitch index */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 Word16 pit_min, /* input : minimum pitch lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 Word16 pit_max, /* input : maximum pitch lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 Word16 i_subfr, /* input : subframe flag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 Word16 L_frame_by2,/* input : speech frame size divided by 2 */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 Word16 *T0_frac, /* output: fractional part of pitch lag */ |
65
cb080ec1817e
libgsmefr: dec_lag6.c compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
64
diff
changeset
|
51 Word16 bfi, /* input : bad frame indicator */ |
cb080ec1817e
libgsmefr: dec_lag6.c compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
64
diff
changeset
|
52 Word16 *T0_min, /* var from one subframe to the next */ |
cb080ec1817e
libgsmefr: dec_lag6.c compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
64
diff
changeset
|
53 Word16 *T0_max /* ditto */ |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 Word16 d_gain_pitch ( /* out : quantized pitch gain */ |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
56 struct EFR_decoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 Word16 index, /* in : index of quantization */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 Word16 bfi, /* in : bad frame indicator (good = 0) */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 Word16 state, /* in : state of the state machine */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 Word16 prev_bf, /* Previous bf */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 Word16 rxdtx_ctrl |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 void d_gain_code ( |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
65 struct EFR_decoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 Word16 index, /* input : received quantization index */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 Word16 code[], /* input : innovation codevector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 Word16 lcode, /* input : codevector length */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 Word16 *gain_code, /* output: decoded innovation gain */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 Word16 bfi, /* input : bad frame indicator */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 Word16 state, /* in : state of the state machine */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 Word16 prev_bf, /* Previous bf */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 Word16 rxdtx_ctrl, |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 Word16 i_subfr, |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 Word16 rx_dtx_state |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 void D_plsf_5 ( |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
79 struct EFR_decoder_state *st, |
94
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
80 const Word16 *indice,/* input : quantization indices of 5 submatrices */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
81 Word16 *lsp1_q, /* output: quantized 1st LSP vector */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
82 Word16 *lsp2_q, /* output: quantized 2nd LSP vector */ |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
83 Word16 bfi, /* input : bad frame indicator (set to 1 if a bad |
d80e9f12a1d1
libgsmefr: decoder main function put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
65
diff
changeset
|
84 frame is received) */ |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 Word16 rxdtx_ctrl, |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 Word16 rx_dtx_state |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 ); |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
88 |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 Word16 Enc_lag6 ( /* output: Return index of encoding */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 Word16 T0, /* input : Pitch delay */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 Word16 *T0_frac, /* in/out: Fractional pitch delay */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 Word16 *T0_min, /* in/out: Minimum search delay */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 Word16 *T0_max, /* in/out: Maximum search delay */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 Word16 pit_min, /* input : Minimum pitch delay */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 Word16 pit_max, /* input : Maximum pitch delay */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 Word16 pit_flag /* input : Flag for 1st or 3rd subframe */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 Word16 q_gain_pitch ( /* Return index of quantization */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 Word16 *gain /* (i) : Pitch gain to quantize */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 Word16 q_gain_code ( /* Return quantization index */ |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
104 struct EFR_encoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 Word16 code[], /* (i) : fixed codebook excitation */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 Word16 lcode, /* (i) : codevector size */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 Word16 *gain, /* (i/o) : quantized fixed codebook gain */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 Word16 txdtx_ctrl, |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 Word16 i_subfr |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 Word16 G_pitch ( /* (o) : Gain of pitch lag saturated to 1.2 */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 Word16 xn[], /* (i) : Pitch target. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 Word16 y1[], /* (i) : Filtered adaptive codebook. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 Word16 L_subfr /* : Length of subframe. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 Word16 G_code ( /* out : Gain of innovation code. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 Word16 xn[], /* in : target vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 Word16 y2[] /* in : filtered inovation vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 Word16 Interpol_6 ( /* (o) : interpolated value */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 Word16 *x, /* (i) : input vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 Word16 frac /* (i) : fraction */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 void Int_lpc ( |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 Word16 lsp_old[], /* input: LSP vector at the 4th subfr. of past frame */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 Word16 lsp_mid[], /* input: LSP vector at the 2nd subfr. of |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 present frame */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 Word16 lsp_new[], /* input: LSP vector at the 4th subfr. of |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 present frame */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 Word16 Az[] /* output: interpolated LP parameters in all subfr. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 void Int_lpc2 ( |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 Word16 lsp_old[], /* input: LSP vector at the 4th subfr. of past frame */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 Word16 lsp_mid[], /* input: LSP vector at the 2nd subframe of |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 present frame */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 Word16 lsp_new[], /* input: LSP vector at the 4th subframe of |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 present frame */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 Word16 Az[] /* output:interpolated LP parameters |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 in subframes 1 and 3 */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 Word16 Pitch_fr6 ( /* (o) : pitch period. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 Word16 exc[], /* (i) : excitation buffer */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 Word16 xn[], /* (i) : target vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 Word16 h[], /* (i) : impulse response of synthesis and |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 weighting filters */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 Word16 L_subfr, /* (i) : Length of subframe */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 Word16 t0_min, /* (i) : minimum value in the searched range. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 Word16 t0_max, /* (i) : maximum value in the searched range. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 Word16 i_subfr, /* (i) : indicator for first subframe. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 Word16 *pit_frac /* (o) : chosen fraction. */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 Word16 Pitch_ol ( /* output: open loop pitch lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 Word16 signal[], /* input: signal used to compute the open loop pitch */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 /* signal[-pit_max] to signal[-1] should be known */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 Word16 pit_min, /* input : minimum pitch lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 Word16 pit_max, /* input : maximum pitch lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 Word16 L_frame /* input : length of frame to compute pitch */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 ); |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 void Pred_lt_6 ( |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 Word16 exc[], /* in/out: excitation buffer */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 Word16 T0, /* input : integer pitch lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 Word16 frac, /* input : fraction of lag */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 Word16 L_subfr /* input : subframe size */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 ); |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
167 |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 void Q_plsf_5 ( |
52
988fd7ff514f
libgsmefr: add state pointers to ETSI function prototypes
Mychaela Falconia <falcon@freecalypso.org>
parents:
39
diff
changeset
|
169 struct EFR_encoder_state *st, |
39
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 Word16 *lsp1, /* input : 1st LSP vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 Word16 *lsp2, /* input : 2nd LSP vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 Word16 *lsp1_q, /* output: quantized 1st LSP vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 Word16 *lsp2_q, /* output: quantized 2nd LSP vector */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 Word16 *indice, /* output: quantization indices of 5 matrices */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 Word16 txdtx_ctrl /* input : tx dtx control word */ |
36e1363ad885
libgsmefr: initial import of ETSI header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 ); |