FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/d_plsf.c @ 343:3f574255c3aa
libtwamr: integrate d_plsf.c
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Fri, 19 Apr 2024 01:08:39 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 342:e42075184628 | 343:3f574255c3aa |
|---|---|
| 1 /* | |
| 2 ***************************************************************************** | |
| 3 * | |
| 4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001 | |
| 5 * R99 Version 3.3.0 | |
| 6 * REL-4 Version 4.1.0 | |
| 7 * | |
| 8 ***************************************************************************** | |
| 9 * | |
| 10 * File : d_plsf.c | |
| 11 * Purpose : common part (init, exit, reset) of LSF decoder | |
| 12 * module (rest in d_plsf_3.c and d_plsf_5.c) | |
| 13 * | |
| 14 ***************************************************************************** | |
| 15 */ | |
| 16 | |
| 17 | |
| 18 /* | |
| 19 ***************************************************************************** | |
| 20 * MODULE INCLUDE FILE AND VERSION ID | |
| 21 ***************************************************************************** | |
| 22 */ | |
| 23 #include "namespace.h" | |
| 24 #include "d_plsf.h" | |
| 25 | |
| 26 /* | |
| 27 ***************************************************************************** | |
| 28 * INCLUDE FILES | |
| 29 ***************************************************************************** | |
| 30 */ | |
| 31 #include "typedef.h" | |
| 32 #include "basic_op.h" | |
| 33 #include "no_count.h" | |
| 34 #include "cnst.h" | |
| 35 #include "memops.h" | |
| 36 #include "q_plsf5_tab.h" | |
| 37 | |
| 38 /* | |
| 39 *--------------------------------------------------* | |
| 40 * Constants (defined in cnst.h) * | |
| 41 *--------------------------------------------------* | |
| 42 * M : LPC order | |
| 43 *--------------------------------------------------* | |
| 44 */ | |
| 45 | |
| 46 /* | |
| 47 ***************************************************************************** | |
| 48 * PUBLIC PROGRAM CODE | |
| 49 ***************************************************************************** | |
| 50 */ | |
| 51 | |
| 52 /* | |
| 53 ************************************************************************** | |
| 54 * | |
| 55 * Function : D_plsf_reset | |
| 56 * Purpose : Resets state memory | |
| 57 * | |
| 58 ************************************************************************** | |
| 59 */ | |
| 60 void D_plsf_reset (D_plsfState *state) | |
| 61 { | |
| 62 Word16 i; | |
| 63 | |
| 64 for (i = 0; i < M; i++){ | |
| 65 state->past_r_q[i] = 0; /* Past quantized prediction error */ | |
| 66 } | |
| 67 | |
| 68 /* Past dequantized lsfs */ | |
| 69 Copy(mean_lsf, &state->past_lsf_q[0], M); | |
| 70 } |
