FreeCalypso > hg > gsm-codec-lib
view libgsmhr1/tfo.c @ 600:5a7d04bf26f5
libgsmhr1: integrate signal-level err_conc code
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 04 Dec 2025 10:24:06 +0000 |
| parents | 7d0e565aa1ae |
| children | 54f0f1b74c25 |
line wrap: on
line source
/* * In this module we implement the TFO transform for HRv1. Our implementation * of this transform is a wrapper around our RxFE block that was specifically * designed to be usable both for the full decoder and for TFO. */ #include <stddef.h> #include <stdint.h> #include <string.h> #include "tw_gsmhr.h" #include "namespace.h" #include "rxfe.h" void gsmhr_tfo_xfrm(struct gsmhr_rxfe_state *st, int dtxd, const int16_t *ul, int16_t *dl) { rxfe_main(st, ul, dl, dtxd, NULL, NULL, dl + 19); if (dtxd) { dl[18] = 0; /* VAD=0 dummy setting */ if (!dl[19]) /* turn CN into re-emission of SID */ gsmhr_set_sid_cw_params(dl); } else { /* sans-DTX: VAD=1 SP=1 always */ dl[18] = 1; dl[19] = 1; } /* homing logic */ if (!ul[18] && !memcmp(ul, gsmhr_dhf_params, sizeof(int16_t) * GSMHR_NUM_PARAMS)) gsmhr_rxfe_reset(st); }
