view libgsmefr/bfi_nodata.c @ 122:b33f2168fdec

doc/EFR-rationale article written
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 10 Dec 2022 08:51:01 +0000
parents 7152cc7d1ca3
children eefef9f6d533
line wrap: on
line source

/*
 * In the expected usage mode of our libgsmefr decoder as part of "soft TRAU"
 * uplink implementation, there will be times when the radio subsystem tells
 * us that a frame has been lost, but we don't have any errored bits to feed
 * to the decoder as ETSI canon calls for.  We could of course call
 * EFR_decode_frame() with a dummy frame of all zeros and BFI=1, but the
 * EFR_decode_bfi_nodata() function provided in this module accomplishes
 * the same effect more efficiently.
 */

#include <string.h>
#include "gsm_efr.h"

void EFR_decode_bfi_nodata(struct EFR_decoder_state *st, int taf,
			   int16_t *pcm_out)
{
	int16_t params[EFR_NUM_PARAMS];

	memset(params, 0, sizeof(int16_t) * EFR_NUM_PARAMS);
	EFR_decode_params(st, params, 1, 0, taf, pcm_out);
}