annotate libgsmfr2/tw_gsmfr.h @ 556:18aca50d68df default tip

doc/Calypso-TCH-downlink: update for FR1 BFI-with-data
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 11 Oct 2024 01:54:00 +0000
parents 3a617e4e9b27
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file is the external public interface to libgsmfr2:
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * Themyscira Wireless implementation of GSM FRv1 speech codec
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * that includes not only the core transcoding functions of GSM 06.10,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * but also Rx DTX functions (substitution and muting per GSM 06.11,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * comfort noise per GSM 06.12, overall Rx DTX control per GSM 06.31)
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * in the decoder direction and the optional homing frame mechanism.
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 *
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 * This header file should be installed in some system include directory
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 * such that it can be included by C sources as <tw_gsmfr.h>.
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 #ifndef __THEMWI_GSMFR_H
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #define __THEMWI_GSMFR_H
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #include <stdint.h>
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #define GSMFR_RTP_FRAME_LEN 33
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #define GSMFR_NUM_PARAMS 76
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 /*
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 * GSM 06.10 encoder & decoder portion of the library
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 *
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 * This part is peculiar in that the same state structure is used for
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 * both the encoder and the decoder - however, each given instance
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 * of this state structure must be used for only one of the two.
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 struct gsmfr_0610_state; /* opaque to external users */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 struct gsmfr_0610_state *gsmfr_0610_create(void);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 /* use standard free() call to free it afterward */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 /* reset state to initial */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 void gsmfr_0610_reset(struct gsmfr_0610_state *state);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 /* interface structure for passing frames of codec parameters */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 struct gsmfr_param_frame {
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 int16_t LARc[8];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 int16_t Nc[4];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 int16_t bc[4];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 int16_t Mc[4];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 int16_t xmaxc[4];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 int16_t xMc[4][13];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 };
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 /* encoder public functions */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 void gsmfr_0610_encode_params(struct gsmfr_0610_state *st, const int16_t *pcm,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 struct gsmfr_param_frame *param);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 void gsmfr_0610_encode_frame(struct gsmfr_0610_state *st, const int16_t *pcm,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 uint8_t *frame);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 void gsmfr_0610_encoder_homing(struct gsmfr_0610_state *st, const int16_t *pcm);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 /* decoder public functions */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 void gsmfr_0610_decode_params(struct gsmfr_0610_state *st,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 const struct gsmfr_param_frame *param,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 int16_t *pcm);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 void gsmfr_0610_decode_frame(struct gsmfr_0610_state *st, const uint8_t *frame,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 int16_t *pcm);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 /* conversion between RTP packed format and struct gsmfr_param_frame */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 void gsmfr_pack_frame(const struct gsmfr_param_frame *param, uint8_t *frame);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 void gsmfr_unpack_frame(const uint8_t *frame, struct gsmfr_param_frame *param);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
259
bebae251e5ee libgsmfr2: implement gsmfr_pack_from_array()
Mychaela Falconia <falcon@freecalypso.org>
parents: 256
diff changeset
69 /* similar conversions with a linear array of params */
bebae251e5ee libgsmfr2: implement gsmfr_pack_from_array()
Mychaela Falconia <falcon@freecalypso.org>
parents: 256
diff changeset
70
bebae251e5ee libgsmfr2: implement gsmfr_pack_from_array()
Mychaela Falconia <falcon@freecalypso.org>
parents: 256
diff changeset
71 void gsmfr_pack_from_array(const int16_t *params, uint8_t *frame);
bebae251e5ee libgsmfr2: implement gsmfr_pack_from_array()
Mychaela Falconia <falcon@freecalypso.org>
parents: 256
diff changeset
72 void gsmfr_unpack_to_array(const uint8_t *frame, int16_t *params);
bebae251e5ee libgsmfr2: implement gsmfr_pack_from_array()
Mychaela Falconia <falcon@freecalypso.org>
parents: 256
diff changeset
73
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 /* Rx DTX handler preprocessor portion of the library */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 struct gsmfr_preproc_state; /* opaque to external users */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 struct gsmfr_preproc_state *gsmfr_preproc_create(void);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 /* use standard free() call to free it afterward */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /* reset state to initial */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 void gsmfr_preproc_reset(struct gsmfr_preproc_state *state);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 /* main processing functions */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 void gsmfr_preproc_good_frame(struct gsmfr_preproc_state *state,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 uint8_t *frame);
525
c95e89367321 libgsmfr2: add gsmfr_preproc_good_frame_hm()
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
87 void gsmfr_preproc_good_frame_hm(struct gsmfr_preproc_state *state,
c95e89367321 libgsmfr2: add gsmfr_preproc_good_frame_hm()
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
88 uint8_t *frame);
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 void gsmfr_preproc_bfi(struct gsmfr_preproc_state *state, int taf,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 uint8_t *frame_out);
526
405a84110997 libgsmfr2: add gsmfr_preproc_bfi_bits()
Mychaela Falconia <falcon@freecalypso.org>
parents: 525
diff changeset
91 void gsmfr_preproc_bfi_bits(struct gsmfr_preproc_state *state,
405a84110997 libgsmfr2: add gsmfr_preproc_bfi_bits()
Mychaela Falconia <falcon@freecalypso.org>
parents: 525
diff changeset
92 const uint8_t *bad_frame, int taf,
405a84110997 libgsmfr2: add gsmfr_preproc_bfi_bits()
Mychaela Falconia <falcon@freecalypso.org>
parents: 525
diff changeset
93 uint8_t *frame_out);
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 /* utility function */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 int gsmfr_preproc_sid_classify(const uint8_t *frame);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /* utility datum */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 extern const uint8_t gsmfr_preproc_silence_frame[GSMFR_RTP_FRAME_LEN];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 /*
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 * Full GSM-FR decoder: Rx DTX handler followed by 06.10 decoder,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 * plus the decoder homing function.
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 struct gsmfr_fulldec_state; /* opaque to external users */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 struct gsmfr_fulldec_state *gsmfr_fulldec_create(void);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 /* use standard free() call to free it afterward */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 /* reset state to initial */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 void gsmfr_fulldec_reset(struct gsmfr_fulldec_state *state);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 /* main processing functions */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 void gsmfr_fulldec_good_frame(struct gsmfr_fulldec_state *state,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 const uint8_t *frame, int16_t *pcm);
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 void gsmfr_fulldec_bfi(struct gsmfr_fulldec_state *state, int taf,
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 int16_t *pcm);
527
f3246d109e2d libgsmfr2: add gsmfr_fulldec_bfi_bits()
Mychaela Falconia <falcon@freecalypso.org>
parents: 526
diff changeset
119 void gsmfr_fulldec_bfi_bits(struct gsmfr_fulldec_state *state,
f3246d109e2d libgsmfr2: add gsmfr_fulldec_bfi_bits()
Mychaela Falconia <falcon@freecalypso.org>
parents: 526
diff changeset
120 const uint8_t *bad_frame, int taf, int16_t *pcm);
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
528
f681fb758041 libgsmfr2: add gsmfr_fulldec_rtp_in()
Mychaela Falconia <falcon@freecalypso.org>
parents: 527
diff changeset
122 /* handling of TW-TS-001 RTP input */
f681fb758041 libgsmfr2: add gsmfr_fulldec_rtp_in()
Mychaela Falconia <falcon@freecalypso.org>
parents: 527
diff changeset
123 int gsmfr_fulldec_rtp_in(struct gsmfr_fulldec_state *state,
f681fb758041 libgsmfr2: add gsmfr_fulldec_rtp_in()
Mychaela Falconia <falcon@freecalypso.org>
parents: 527
diff changeset
124 const uint8_t *rtp_pl, unsigned rtp_pl_len,
f681fb758041 libgsmfr2: add gsmfr_fulldec_rtp_in()
Mychaela Falconia <falcon@freecalypso.org>
parents: 527
diff changeset
125 int16_t *pcm);
f681fb758041 libgsmfr2: add gsmfr_fulldec_rtp_in()
Mychaela Falconia <falcon@freecalypso.org>
parents: 527
diff changeset
126
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 /* utility datum */
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 extern const uint8_t gsmfr_decoder_homing_frame[GSMFR_RTP_FRAME_LEN];
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
529
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
130 /* TFO transform API based on the preprocessor part of the library */
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
131
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
132 int gsmfr_tfo_xfrm_main(struct gsmfr_preproc_state *state,
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
133 const uint8_t *rtp_in, unsigned rtp_in_len,
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
134 uint8_t *frame_out);
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
135 int gsmfr_tfo_xfrm_dtxd(struct gsmfr_preproc_state *state, uint8_t *frame_out);
79cd992de3ad libgsmfr2: API definitions for TFO transform
Mychaela Falconia <falcon@freecalypso.org>
parents: 528
diff changeset
136
533
3a617e4e9b27 libgsmfr2: add const words with struct sizes
Mychaela Falconia <falcon@freecalypso.org>
parents: 529
diff changeset
137 /* sizes of state structures, to support alternative malloc schemes */
3a617e4e9b27 libgsmfr2: add const words with struct sizes
Mychaela Falconia <falcon@freecalypso.org>
parents: 529
diff changeset
138
3a617e4e9b27 libgsmfr2: add const words with struct sizes
Mychaela Falconia <falcon@freecalypso.org>
parents: 529
diff changeset
139 extern const unsigned gsmfr_0610_state_size;
3a617e4e9b27 libgsmfr2: add const words with struct sizes
Mychaela Falconia <falcon@freecalypso.org>
parents: 529
diff changeset
140 extern const unsigned gsmfr_preproc_state_size;
3a617e4e9b27 libgsmfr2: add const words with struct sizes
Mychaela Falconia <falcon@freecalypso.org>
parents: 529
diff changeset
141 extern const unsigned gsmfr_fulldec_state_size;
3a617e4e9b27 libgsmfr2: add const words with struct sizes
Mychaela Falconia <falcon@freecalypso.org>
parents: 529
diff changeset
142
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #endif /* include guard */