view libgsmhr1/paramval_cod.c @ 602:72cdae602d6e

libgsmhr1/dec_func.c: rm unused static functions In the original code, sp_dec.c held two kinds of functions: those needed only as part of the decoder, and those used by both decoder and encoder engines. In this library, we have moved the latter class of functions to dec_func.c module. Almost all static functions from the original sp_dec.c, with the exception of aToRc(), are needed only on sp_dec.c side of the new divide - remove them from dec_func.c, where they became dead code.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Dec 2025 18:58:22 +0000
parents 03a40ac2e931
children
line wrap: on
line source

/*
 * The function implemented in this module examines a frame of 20 int16_t words
 * that corresponds to GSM-HR encoder output format, and checks if the unused
 * upper bits of each int16_t word are cleared as they should be.
 * This function should be used when reading from ETSI-format *.cod files,
 * to guard against reading garbage or wrong endian.
 */

#include <stdint.h>
#include "tw_gsmhr.h"

int gsmhr_check_encoder_params(const int16_t *params)
{
	if (params[18] & 0xFFFE)
		return -1;
	if (params[19] & 0xFFFE)
		return -1;
	return gsmhr_check_common_params(params);
}