annotate libgsmefr/bfi_nodata.c @ 99:7152cc7d1ca3

libgsmefr: implement EFR_decode_bfi_nodata()
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 26 Nov 2022 21:51:52 +0000
parents
children eefef9f6d533
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
99
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * In the expected usage mode of our libgsmefr decoder as part of "soft TRAU"
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * uplink implementation, there will be times when the radio subsystem tells
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * us that a frame has been lost, but we don't have any errored bits to feed
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * to the decoder as ETSI canon calls for. We could of course call
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * EFR_decode_frame() with a dummy frame of all zeros and BFI=1, but the
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * EFR_decode_bfi_nodata() function provided in this module accomplishes
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 * the same effect more efficiently.
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 */
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #include <string.h>
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include "gsm_efr.h"
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 void EFR_decode_bfi_nodata(struct EFR_decoder_state *st, int taf,
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 int16_t *pcm_out)
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 {
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 int16_t params[EFR_NUM_PARAMS];
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 memset(params, 0, sizeof(int16_t) * EFR_NUM_PARAMS);
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 EFR_decode_params(st, params, 1, 0, taf, pcm_out);
7152cc7d1ca3 libgsmefr: implement EFR_decode_bfi_nodata()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 }