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

📄 irc2pc.c

📁 IP网络语音通讯软件源代码. 不可多得的语音源代码
💻 C
字号:
/******************************************************************
*
*       IRC2PC Version 48
*
******************************************************************
*
*   Convert Reflection Coefficients to Predictor Coeficients
*
* Inputs:
*  RC     - Reflection coefficients
*  ORDER  - Number of RC's
*  GPRIME - Excitation modification gain
* Outputs:
*  PC     - Predictor coefficients
*  *G2PASS - Excitation modification sharpening factor
*/

#include "config.ch"
#include "lpcdefs.h"
#include <math.h>

#ifdef PROTO
void irc2pc( float rc[MAXORD][11], float pc[], floatARG gprime,
    float *g2pass, int where )
#else
irc2pc( rc, pc, gprime, g2pass, where )
float rc[MAXORD][11], pc[], gprime, *g2pass;
int where;
#endif
{
int i,j;
float temp[MAXORD];

*g2pass = 1.;

for(i=0;i<ORDER;i++)    
        *g2pass = (float) (*g2pass*( 1. - rc[i][where]*rc[i][where] ));

*g2pass = (float) (gprime*sqrt(*g2pass));
pc[0] = rc[0][where];

for(i=1;i<ORDER;i++)    {
        for(j=0;j<i;j++)
                temp[j] = pc[j] - rc[i][where]*pc[i-j-1];
        
        for(j=0;j<i;j++)
                pc[j] = temp[j];
        
        pc[i] = rc[i][where];
}

}

⌨️ 快捷键说明

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