FreeCalypso > hg > gsm-codec-lib
annotate libgsmfrp/bad_frame.c @ 257:77b7b7b7b384
top Makefile: add libgsmfr2 and libtwamr
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 12 Apr 2024 21:50:28 +0000 |
parents | 6ac547f0b903 |
children |
rev | line source |
---|---|
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
2 * In this module we implement our handling of BFI frame gaps |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
3 * and invalid SID frames. |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdint.h> |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <string.h> |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "gsm_fr_preproc.h" |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "internal.h" |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 static int reduce_xmaxc(gsm_byte *frame) |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 { |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 int mute_flag = 1; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 unsigned sub, xmaxc; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 for (sub = 0; sub < 4; sub++) { |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 xmaxc = ((frame[sub*7+6] & 0x1F) << 1) | (frame[sub*7+7] >> 7); |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 if (xmaxc > 4) { |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 xmaxc -= 4; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 mute_flag = 0; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 } else |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 xmaxc = 0; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 frame[sub*7+6] &= 0xE0; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 frame[sub*7+6] |= xmaxc >> 1; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 frame[sub*7+7] &= 0x7F; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 frame[sub*7+7] |= (xmaxc & 1) << 7; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 } |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 return mute_flag; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 } |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
109
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
31 static void random_grid_pos(struct gsmfr_preproc_state *st, gsm_byte *frame) |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
32 { |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
33 unsigned sub, Mc; |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
34 |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
35 for (sub = 0; sub < 4; sub++) { |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
36 Mc = gsmfr_preproc_prng(st, 2); |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
37 frame[sub*7+6] &= 0x9F; |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
38 frame[sub*7+6] |= Mc << 5; |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
39 } |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
40 } |
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
41 |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
42 static int reduce_xmaxc_sid(struct gsmfr_preproc_state *st) |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
43 { |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
44 if (st->sid_xmaxc > 4) { |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
45 st->sid_xmaxc -= 4; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
46 return 0; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
47 } else { |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
48 st->sid_xmaxc = 0; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
49 return 1; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
50 } |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
51 } |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
52 |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 void gsmfr_preproc_bfi(struct gsmfr_preproc_state *st, int taf, gsm_byte *frame) |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 { |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 int mute; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 switch (st->rx_state) { |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 case NO_DATA: |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 memcpy(frame, &gsmfr_preproc_silence_frame, sizeof(gsm_frame)); |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 return; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 case SPEECH: |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 memcpy(frame, &st->speech_frame, sizeof(gsm_frame)); |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 st->rx_state = SPEECH_MUTING; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 return; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 case SPEECH_MUTING: |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 mute = reduce_xmaxc(st->speech_frame); |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 memcpy(frame, &st->speech_frame, sizeof(gsm_frame)); |
109
2361a7d8c1eb
libgsmfrp: randomize grid position params when muting speech,
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
68 random_grid_pos(st, frame); |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 if (mute) |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 st->rx_state = NO_DATA; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 return; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 case COMFORT_NOISE: |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 if (taf) |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 st->rx_state = LOST_SID; |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
75 gsmfr_preproc_gen_cn(st, frame); |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 return; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 case LOST_SID: |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
78 if (taf) { |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
79 st->rx_state = CN_MUTING; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
80 reduce_xmaxc_sid(st); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
81 } |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 gsmfr_preproc_gen_cn(st, frame); |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
83 return; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
84 case CN_MUTING: |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
85 if (reduce_xmaxc_sid(st)) { |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 st->rx_state = NO_DATA; |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
87 memcpy(frame, &gsmfr_preproc_silence_frame, |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
88 sizeof(gsm_frame)); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
89 } else |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
90 gsmfr_preproc_gen_cn(st, frame); |
6
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 return; |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 } |
b2255a5d0519
libgsmfrp: implement BFI handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 } |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
94 |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
95 void gsmfr_preproc_invalid_sid(struct gsmfr_preproc_state *st, gsm_byte *frame) |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
96 { |
248
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
97 int mute; |
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
98 |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
99 switch (st->rx_state) { |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
100 case NO_DATA: |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
101 memcpy(frame, &gsmfr_preproc_silence_frame, sizeof(gsm_frame)); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
102 return; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
103 case SPEECH: |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
104 /* |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
105 * Make CN out of the last good speech frame, following the |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
106 * "NOTE" at the end of section 6.1.2 in TS 46.031. |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
107 */ |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
108 st->rx_state = COMFORT_NOISE; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
109 memcpy(st->sid_prefix, &st->speech_frame, 5); |
248
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
110 st->sid_xmaxc = gsmfr_preproc_xmaxc_mean(st->speech_frame); |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
111 gsmfr_preproc_gen_cn(st, frame); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
112 return; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
113 case SPEECH_MUTING: |
248
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
114 /* ignore invalid SID in this state and act as if we got BFI */ |
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
115 mute = reduce_xmaxc(st->speech_frame); |
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
116 memcpy(frame, &st->speech_frame, sizeof(gsm_frame)); |
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
117 random_grid_pos(st, frame); |
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
118 if (mute) |
6ac547f0b903
libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
242
diff
changeset
|
119 st->rx_state = NO_DATA; |
242
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
120 return; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
121 case COMFORT_NOISE: |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
122 case LOST_SID: |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
123 st->rx_state = COMFORT_NOISE; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
124 gsmfr_preproc_gen_cn(st, frame); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
125 return; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
126 case CN_MUTING: |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
127 if (reduce_xmaxc_sid(st)) { |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
128 st->rx_state = NO_DATA; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
129 memcpy(frame, &gsmfr_preproc_silence_frame, |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
130 sizeof(gsm_frame)); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
131 } else |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
132 gsmfr_preproc_gen_cn(st, frame); |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
133 return; |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
134 } |
f081a6850fb5
libgsmfrp: new refined implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
109
diff
changeset
|
135 } |