⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d_plsf.c

📁 Trolltech公司发布的图形界面操作系统。可在qt-embedded-2.3.10平台上编译为嵌入式图形界面操作系统。
💻 C
字号:
/********************************************************************************      GSM AMR-NB speech codec   R98   Version 7.6.0   December 12, 2001*                                R99   Version 3.3.0                *                                REL-4 Version 4.1.0                ********************************************************************************      File             : d_plsf.c*      Purpose          : common part (init, exit, reset) of LSF decoder*                         module (rest in d_plsf_3.c and d_plsf_5.c)*******************************************************************************/  /*******************************************************************************                         MODULE INCLUDE FILE AND VERSION ID******************************************************************************/#include "d_plsf.h"const char d_plsf_id[] = "@(#)$Id $" d_plsf_h; /*******************************************************************************                         INCLUDE FILES******************************************************************************/#include <stdlib.h>#include <stdio.h>#include "typedef.h"#include "basic_op.h"#include "count.h"#include "cnst.h"#include "copy.h"#include "q_plsf_5.tab"/**--------------------------------------------------** Constants (defined in cnst.h)                    **--------------------------------------------------**  M                    : LPC order*--------------------------------------------------**/ /*******************************************************************************                         PUBLIC PROGRAM CODE******************************************************************************//*****************************************************************************  Function    : D_plsf_init*  Purpose     : Allocates and initializes state memory****************************************************************************/int D_plsf_init (D_plsfState **state){  D_plsfState* s;   if (state == (D_plsfState **) NULL){      fprintf(stderr, "D_plsf_init: invalid parameter\n");      return -1;  }  *state = NULL;   /* allocate memory */  if ((s= (D_plsfState *) malloc(sizeof(D_plsfState))) == NULL){      fprintf(stderr, "D_plsf_init: can not malloc state structure\n");      return -1;  }    D_plsf_reset(s);  *state = s;    return 0;} /*****************************************************************************  Function    : D_plsf_reset*  Purpose     : Resets state memory****************************************************************************/int D_plsf_reset (D_plsfState *state){  Word16 i;    if (state == (D_plsfState *) NULL){      fprintf(stderr, "D_plsf_reset: invalid parameter\n");      return -1;  }    for (i = 0; i < M; i++){      state->past_r_q[i] = 0;             /* Past quantized prediction error */  }    /* Past dequantized lsfs */  Copy(mean_lsf, &state->past_lsf_q[0], M);  return 0;} /*****************************************************************************  Function    : D_plsf_exit*  Purpose     : The memory used for state memory is freed****************************************************************************/void D_plsf_exit (D_plsfState **state){  if (state == NULL || *state == NULL)      return;   /* deallocate memory */  free(*state);  *state = NULL;    return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -