blob: 3739018e5fca241993a0e0c372e96a5a31640b10
1 | /* |
2 | * =================================================================== |
3 | * TS 26.104 |
4 | * R99 V3.5.0 2003-03 |
5 | * REL-4 V4.4.0 2003-03 |
6 | * REL-5 V5.1.0 2003-03 |
7 | * 3GPP AMR Floating-point Speech Codec |
8 | * =================================================================== |
9 | * |
10 | */ |
11 | |
12 | /* |
13 | * sp_enc.h |
14 | * |
15 | * |
16 | * Project: |
17 | * AMR Floating-Point Codec |
18 | * |
19 | * Contains: |
20 | * Defines interface to AMR encoder |
21 | * |
22 | */ |
23 | #ifndef _SP_DEC_H_ |
24 | #define _SP_DEC_H_ |
25 | |
26 | /* |
27 | * definition of enumerated types |
28 | */ |
29 | |
30 | /* |
31 | * definition of modes for decoder |
32 | */ |
33 | enum Mode { MR475 = 0, |
34 | MR515, |
35 | MR59, |
36 | MR67, |
37 | MR74, |
38 | MR795, |
39 | MR102, |
40 | MR122, |
41 | MRDTX, |
42 | N_MODES /* number of (SPC) modes */ |
43 | }; |
44 | |
45 | /* Declaration recieved frame types */ |
46 | enum RXFrameType { RX_SPEECH_GOOD = 0, |
47 | RX_SPEECH_DEGRADED, |
48 | RX_ONSET, |
49 | RX_SPEECH_BAD, |
50 | RX_SID_FIRST, |
51 | RX_SID_UPDATE, |
52 | RX_SID_BAD, |
53 | RX_NO_DATA, |
54 | RX_N_FRAMETYPES /* number of frame types */ |
55 | }; |
56 | |
57 | /* |
58 | * Function prototypes |
59 | */ |
60 | |
61 | /* |
62 | * initialize one instance of the speech decoder |
63 | */ |
64 | void* Speech_Decode_Frame_init(); |
65 | |
66 | /* |
67 | * free status struct |
68 | */ |
69 | void Speech_Decode_Frame_exit(void **st); |
70 | |
71 | /* |
72 | * Decodes one frame from encoded parameters |
73 | */ |
74 | void Speech_Decode_Frame(void *st, enum Mode mode, short *serial, |
75 | enum RXFrameType frame_type, short *synth); |
76 | |
77 | /* |
78 | * reset speech decoder |
79 | */ |
80 | int Speech_Decode_Frame_reset(void **st); |
81 | |
82 | #endif |
83 | |
84 |