view libgsmefr/bfi_nodata.c @ 112:035424a6ca83

libgsmefr: encoder main function put together
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 29 Nov 2022 07:05:59 +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);
}