FreeCalypso > hg > gsm-codec-lib
view libgsmhr1/paramval_dec.c @ 586:b21ea4ab586d
libgsmhr1: update for TW-TS-002 version 1.2.0
The component of libgsmhr1 being changed is RTP input functions;
the change is accepting FT=1 (invalid SID) frames both with and
without payload data bits.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 10 Mar 2025 02:03:31 +0000 |
parents | 67b13a6a63c9 |
children |
line wrap: on
line source
/* * The function implemented in this module examines a frame of 22 int16_t words * that corresponds to GSM-HR decoder input 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 *.dec files, * to guard against reading garbage or wrong endian. */ #include <stdint.h> #include "tw_gsmhr.h" int gsmhr_check_decoder_params(const int16_t *params) { if (params[18] < 0 || params[18] > 2) /* BFI */ return -1; if (params[19] < 0 || params[19] > 1) /* UFI */ return -1; if (params[20] < 0 || params[20] > 2) /* SID */ return -1; if (params[21] < 0 || params[21] > 1) /* TAF */ return -1; return gsmhr_check_common_params(params); }