FreeCalypso > hg > gsm-codec-lib
comparison libgsmhr1/dtx_dec.c @ 601:c7c03231002d
libgsmhr1: integrate main body of speech decoder
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 04 Dec 2025 12:49:19 +0000 |
| parents | 5809165fb140 |
| children |
comparison
equal
deleted
inserted
replaced
| 600:5a7d04bf26f5 | 601:c7c03231002d |
|---|---|
| 52 * This function is a fragment from original rxInterpR0Lpc(): | 52 * This function is a fragment from original rxInterpR0Lpc(): |
| 53 * init or update CN interpolation endpoints on CNIFIRSTSID | 53 * init or update CN interpolation endpoints on CNIFIRSTSID |
| 54 * or CNICONT. | 54 * or CNICONT. |
| 55 */ | 55 */ |
| 56 void Init_CN_interpolation(struct gsmhr_decoder_state *st, Shortword deco_mode, | 56 void Init_CN_interpolation(struct gsmhr_decoder_state *st, Shortword deco_mode, |
| 57 Shortword new_R0, const Shortword *pswNewKs) | 57 const Shortword *pswNewKs) |
| 58 { | 58 { |
| 59 st->swR0OldCN = st->swOldR0Dec; | 59 st->swR0OldCN = st->swOldR0Dec; |
| 60 st->swR0NewCN = new_R0; | |
| 61 if (deco_mode == CNIFIRSTSID) { | 60 if (deco_mode == CNIFIRSTSID) { |
| 62 rcToCorrDpL(ASHIFT, ASCALE, st->pswOldFrmKsDec, | 61 rcToCorrDpL(ASHIFT, ASCALE, st->pswOldFrmKsDec, |
| 63 st->pL_OldCorrSeq); | 62 st->pL_OldCorrSeq); |
| 64 } else { | 63 } else { |
| 65 memcpy(st->pL_OldCorrSeq, st->pL_CorrSeq, | 64 memcpy(st->pL_OldCorrSeq, st->pL_CorrSeq, |
| 70 | 69 |
| 71 /* | 70 /* |
| 72 * This function is a fragment from original rxInterpR0Lpc(): | 71 * This function is a fragment from original rxInterpR0Lpc(): |
| 73 * interpolate R0 for CN output. | 72 * interpolate R0 for CN output. |
| 74 */ | 73 */ |
| 75 Shortword CN_Interpolate_R0(struct gsmhr_decoder_state *st) | 74 Shortword CN_Interpolate_R0(struct gsmhr_decoder_state *st, Shortword new_R0) |
| 76 { | 75 { |
| 77 return linInterpSidShort(st->swR0NewCN, st->swR0OldCN, | 76 return linInterpSidShort(new_R0, st->swR0OldCN, st->swRxDTXState); |
| 78 st->swRxDTXState); | |
| 79 } | 77 } |
| 80 | 78 |
| 81 /* | 79 /* |
| 82 * This function is a fragment from original rxInterpR0Lpc(): | 80 * This function is a fragment from original rxInterpR0Lpc(): |
| 83 * interpolate LPC for CN output. | 81 * interpolate LPC for CN output. |
