view libgsmefr/enc_wrap.c @ 282:9ee8ad3d4d30

frtest: rm gsmfr-hand-test and gsmfr-max-out utils These hack programs were never properly documented and were written only as part of a debug chase, in pursuit of a bug that ultimately turned out to be in our then-hacky patch to osmo-bts-sysmo, before beginning of proper patches in Osmocom. These hack programs need to be dropped from the present sw package because they depend on old libgsm, and we are eliminating that dependency.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Apr 2024 05:44:47 +0000
parents 269d341db403
children
line wrap: on
line source

/*
 * This module contains our EFR_encode_frame() function, which is the primary
 * (most common, most useful) interface to our EFR encoder.
 */

#include "gsm_efr.h"

void EFR_encode_frame(struct EFR_encoder_state *st, const int16_t *pcm_in,
		      uint8_t *frame, int *sp_out, int *vad_out)
{
	int16_t params[EFR_NUM_PARAMS];
	int sp;

	EFR_encode_params(st, pcm_in, params, &sp, vad_out);
	EFR_params2frame(params, frame);
	if (!sp)
		EFR_insert_sid_codeword(frame);
	if (sp_out)
		*sp_out = sp;
}