FreeCalypso > hg > gsm-codec-lib
view libgsmefr/reorder.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 | 0faf23a9286f |
children |
line wrap: on
line source
/************************************************************************* * * FUNCTION: Reorder_lsf() * * PURPOSE: To make sure that the LSFs are properly ordered and to keep a * certain minimum distance between adjacent LSFs. * * The LSFs are in the frequency range 0-0.5 and represented in Q15 * *************************************************************************/ #include "gsm_efr.h" #include "typedef.h" #include "namespace.h" #include "basic_op.h" #include "no_count.h" #include "sig_proc.h" void Reorder_lsf ( Word16 *lsf, /* (i/o) : vector of LSFs (range: 0<=val<=0.5) */ Word16 min_dist, /* (i) : minimum required distance */ Word16 n /* (i) : LPC order */ ) { Word16 i; Word16 lsf_min; lsf_min = min_dist; move16 (); for (i = 0; i < n; i++) { test (); if (lsf[i] < lsf_min) { lsf[i] = lsf_min; move16 (); } lsf_min = add (lsf[i], min_dist); } }