亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lsp.cpp

?? KphoneSI (kpsi) is a SIP (Session Initiation Protocol) user agent for Linux, with which you can in
?? CPP
字號:
/*---------------------------------------------------------------------------*\Original copyright	FILE........: AKSLSPD.C	TYPE........: Turbo C	COMPANY.....: Voicetronix	AUTHOR......: David Rowe	DATE CREATED: 24/2/93Modified by Jean-Marc Valin   This file contains functions for converting Linear Prediction   Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the   LSP coefficients are not in radians format but in the x domain of the   unit circle.   Speex License:   Redistribution and use in source and binary forms, with or without   modification, are permitted provided that the following conditions   are met:      - Redistributions of source code must retain the above copyright   notice, this list of conditions and the following disclaimer.      - Redistributions in binary form must reproduce the above copyright   notice, this list of conditions and the following disclaimer in the   documentation and/or other materials provided with the distribution.      - Neither the name of the Xiph.org Foundation nor the names of its   contributors may be used to endorse or promote products derived from   this software without specific prior written permission.      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/#include <math.h>#include "lsp.h"#include "stack_alloc.h"#ifndef M_PI#define M_PI           3.14159265358979323846  /* pi */#endif#ifndef NULL#define NULL 0#endif/*---------------------------------------------------------------------------*\	FUNCTION....: cheb_poly_eva()	AUTHOR......: David Rowe	DATE CREATED: 24/2/93    This function evaluates a series of Chebyshev polynomials\*---------------------------------------------------------------------------*/static float cheb_poly_eva(float *coef,float x,int m,char *stack)/*  float coef[]  	coefficients of the polynomial to be evaluated 	*//*  float x   		the point where polynomial is to be evaluated 	*//*  int m 		order of the polynomial 			*/{    int i;    float *T,sum;    int m2=m>>1;    /* Allocate memory for Chebyshev series formulation */    T=PUSH(stack, m2+1, float);    /* Initialise values */    T[0]=1;    T[1]=x;    /* Evaluate Chebyshev series formulation using iterative approach  */    /* Evaluate polynomial and return value also free memory space */    sum = coef[m2] + coef[m2-1]*x;    x *= 2;    for(i=2;i<=m2;i++)    {       T[i] = x*T[i-1] - T[i-2];       sum += coef[m2-i] * T[i];    }        return sum;}/*---------------------------------------------------------------------------*\	FUNCTION....: lpc_to_lsp()	AUTHOR......: David Rowe	DATE CREATED: 24/2/93    This function converts LPC coefficients to LSP    coefficients.\*---------------------------------------------------------------------------*/int lpc_to_lsp (float *a,int lpcrdr,float *freq,int nb,float delta, char *stack)/*  float *a 		     	lpc coefficients			*//*  int lpcrdr			order of LPC coefficients (10) 		*//*  float *freq 	      	LSP frequencies in the x domain       	*//*  int nb			number of sub-intervals (4) 		*//*  float delta			grid spacing interval (0.02) 		*/{    float psuml,psumr,psumm,temp_xr,xl,xr,xm=0;    float temp_psumr/*,temp_qsumr*/;    int i,j,m,flag,k;    float *Q;                 	/* ptrs for memory allocation 		*/    float *P;    float *px;                	/* ptrs of respective P'(z) & Q'(z)	*/    float *qx;    float *p;    float *q;    float *pt;                	/* ptr used for cheb_poly_eval()				whether P' or Q' 			*/    int roots=0;              	/* DR 8/2/94: number of roots found 	*/    flag = 1;                	/*  program is searching for a root when,				1 else has found one 			*/    m = lpcrdr/2;            	/* order of P'(z) & Q'(z) polynomials 	*/    /* Allocate memory space for polynomials */    Q = PUSH(stack, (m+1), float);    P = PUSH(stack, (m+1), float);    /* determine P'(z)'s and Q'(z)'s coefficients where      P'(z) = P(z)/(1 + z^(-1)) and Q'(z) = Q(z)/(1-z^(-1)) */    px = P;                      /* initialise ptrs 			*/    qx = Q;    p = px;    q = qx;    *px++ = 1.0;    *qx++ = 1.0;    for(i=1;i<=m;i++){	*px++ = a[i]+a[lpcrdr+1-i]-*p++;	*qx++ = a[i]-a[lpcrdr+1-i]+*q++;    }    px = P;    qx = Q;    for(i=0;i<m;i++){	*px = 2**px;	*qx = 2**qx;	 px++;	 qx++;    }    px = P;             	/* re-initialise ptrs 			*/    qx = Q;    /* Search for a zero in P'(z) polynomial first and then alternate to Q'(z).    Keep alternating between the two polynomials as each zero is found 	*/    xr = 0;             	/* initialise xr to zero 		*/    xl = 1.0;               	/* start at point xl = 1 		*/    for(j=0;j<lpcrdr;j++){	if(j%2)            	/* determines whether P' or Q' is eval. */	    pt = qx;	else	    pt = px;	psuml = cheb_poly_eva(pt,xl,lpcrdr,stack);	/* evals poly. at xl 	*/	flag = 1;	while(flag && (xr >= -1.0)){           float dd;           /* Modified by JMV to provide smaller steps around x=+-1 */           dd=(delta*(1-.9*xl*xl));           if (fabs(psuml)<.2)              dd *= .5;           xr = xl - dd;                        	/* interval spacing 	*/	    psumr = cheb_poly_eva(pt,xr,lpcrdr,stack);/* poly(xl-delta_x) 	*/	    temp_psumr = psumr;	    temp_xr = xr;    /* if no sign change increment xr and re-evaluate poly(xr). Repeat til    sign change.    if a sign change has occurred the interval is bisected and then    checked again for a sign change which determines in which    interval the zero lies in.    If there is no sign change between poly(xm) and poly(xl) set interval    between xm and xr else set interval between xl and xr and repeat till    root is located within the specified limits 			*/	    if((psumr*psuml)<0.0){		roots++;		psumm=psuml;		for(k=0;k<=nb;k++){		    xm = (xl+xr)/2;        	/* bisect the interval 	*/		    psumm=cheb_poly_eva(pt,xm,lpcrdr,stack);		    if(psumm*psuml>0.){			psuml=psumm;			xl=xm;		    }		    else{			psumr=psumm;			xr=xm;		    }		}	       /* once zero is found, reset initial interval to xr 	*/	       freq[j] = (xm);	       xl = xm;	       flag = 0;       		/* reset flag for next search 	*/	    }	    else{		psuml=temp_psumr;		xl=temp_xr;	    }	}    }    return(roots);}/*---------------------------------------------------------------------------*\	FUNCTION....: lsp_to_lpc()	AUTHOR......: David Rowe	DATE CREATED: 24/2/93    lsp_to_lpc: This function converts LSP coefficients to LPC    coefficients.\*---------------------------------------------------------------------------*/void lsp_to_lpc(float *freq,float *ak,int lpcrdr, char *stack)/*  float *freq 	array of LSP frequencies in the x domain	*//*  float *ak 		array of LPC coefficients 			*//*  int lpcrdr  	order of LPC coefficients 			*/{    int i,j;    float xout1,xout2,xin1,xin2;    float *Wp;    float *pw,*n1,*n2,*n3,*n4=NULL;    int m = lpcrdr/2;    Wp = PUSH(stack, 4*m+2, float);    pw = Wp;    /* initialise contents of array */    for(i=0;i<=4*m+1;i++){       	/* set contents of buffer to 0 */	*pw++ = 0.0;    }    /* Set pointers up */    pw = Wp;    xin1 = 1.0;    xin2 = 1.0;    /* reconstruct P(z) and Q(z) by  cascading second order      polynomials in form 1 - 2xz(-1) +z(-2), where x is the      LSP coefficient */    for(j=0;j<=lpcrdr;j++){       int i2=0;	for(i=0;i<m;i++,i2+=2){	    n1 = pw+(i*4);	    n2 = n1 + 1;	    n3 = n2 + 1;	    n4 = n3 + 1;	    xout1 = xin1 - 2*(freq[i2]) * *n1 + *n2;	    xout2 = xin2 - 2*(freq[i2+1]) * *n3 + *n4;	    *n2 = *n1;	    *n4 = *n3;	    *n1 = xin1;	    *n3 = xin2;	    xin1 = xout1;	    xin2 = xout2;	}	xout1 = xin1 + *(n4+1);	xout2 = xin2 - *(n4+2);	ak[j] = (xout1 + xout2)*0.5;	*(n4+1) = xin1;	*(n4+2) = xin2;	xin1 = 0.0;	xin2 = 0.0;    }}/*Added by JMV  Makes sure the LSPs are stable*/void lsp_enforce_margin(float *lsp, int len, float margin){   int i;   if (lsp[0]<margin)      lsp[0]=margin;   if (lsp[len-1]>M_PI-margin)      lsp[len-1]=M_PI-margin;   for (i=1;i<len-1;i++)   {      if (lsp[i]<lsp[i-1]+margin)         lsp[i]=lsp[i-1]+margin;      if (lsp[i]>lsp[i+1]-margin)         lsp[i]= .5* (lsp[i] + lsp[i+1]-margin);   }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区三区| 黄色精品一二区| 狠狠色丁香婷综合久久| av爱爱亚洲一区| 亚洲精品一线二线三线| 美女国产一区二区| 色悠久久久久综合欧美99| 久久久久久免费| 日韩精品乱码av一区二区| 91麻豆福利精品推荐| 久久久久久久久99精品| 五月天亚洲精品| 色综合久久久久网| 中文字幕在线观看不卡| 国产在线视频一区二区| 91精品国产91久久久久久最新毛片 | 欧美一区二区久久| 亚洲视频一区在线观看| 成人高清av在线| 国产人成亚洲第一网站在线播放| 麻豆国产欧美一区二区三区| 884aa四虎影成人精品一区| 一区二区三区不卡视频在线观看| 成人免费高清在线| 国产日韩v精品一区二区| 精东粉嫩av免费一区二区三区| 欧美丰满高潮xxxx喷水动漫| 亚洲成人综合网站| 欧美日韩精品免费| 午夜欧美大尺度福利影院在线看| 欧美综合一区二区| 亚洲黄色免费网站| 在线精品视频免费观看| 亚洲综合色在线| 欧美日韩在线播放| 天天色天天操综合| 欧美一区二区三区小说| 另类专区欧美蜜桃臀第一页| 日韩欧美一区二区三区在线| 美女视频免费一区| 精品福利一区二区三区免费视频| 韩日av一区二区| 欧美国产精品一区二区| 99在线精品免费| 亚洲国产另类av| 中文字幕日韩精品一区| 91视频www| 无码av免费一区二区三区试看| 91精选在线观看| 久久99这里只有精品| 国产校园另类小说区| 成人黄色在线看| 亚洲一级二级在线| 欧美电影免费观看高清完整版在线| 国产一区三区三区| 亚洲男人的天堂在线观看| 欧美日韩国产天堂| 狠狠色丁香久久婷婷综| 亚洲色欲色欲www| 这里只有精品电影| 国产不卡在线播放| 亚洲午夜羞羞片| 国产午夜亚洲精品不卡| 色天天综合久久久久综合片| 久久精品国产一区二区| 国产精品麻豆久久久| 欧美日韩大陆在线| 国产99久久久国产精品潘金| 亚洲444eee在线观看| 久久久久久免费网| 欧美精品在欧美一区二区少妇 | 亚洲黄色免费网站| 精品国产伦一区二区三区观看方式 | 色噜噜狠狠色综合欧洲selulu | 亚洲二区视频在线| 国产亚洲欧美在线| 欧美久久久久中文字幕| 国产成人免费在线观看不卡| 亚洲va韩国va欧美va| 国产精品少妇自拍| 精品免费国产一区二区三区四区| 91色视频在线| 国产99久久久久| 美女视频一区二区三区| 亚洲一区免费在线观看| 亚洲韩国一区二区三区| 国产亚洲制服色| 7878成人国产在线观看| 色综合久久久网| 国产成人精品三级| 精品影院一区二区久久久| 亚洲国产视频在线| 亚洲欧美另类久久久精品| 久久青草国产手机看片福利盒子| 欧美精品一级二级| 在线中文字幕一区| 99免费精品视频| 成人综合婷婷国产精品久久蜜臀 | 亚洲一二三区不卡| 亚洲欧洲av在线| 中文字幕av免费专区久久| 精品美女一区二区| 欧美zozozo| 欧美电影免费观看高清完整版 | 久久天天做天天爱综合色| 欧美放荡的少妇| 精品污污网站免费看| 色狠狠综合天天综合综合| 99免费精品在线观看| 高清视频一区二区| 丰满放荡岳乱妇91ww| 国产精品一二二区| 风间由美中文字幕在线看视频国产欧美| 免费久久精品视频| 日本中文在线一区| 日本不卡一二三区黄网| 美日韩黄色大片| 老司机午夜精品99久久| 激情文学综合网| 国内精品免费在线观看| 国产毛片精品视频| 国产成人综合在线| 波多野结衣中文字幕一区二区三区| 国产成人亚洲精品青草天美| 国产91精品免费| 99久久精品情趣| 欧洲另类一二三四区| 欧美日韩一区二区三区四区五区| 欧美日韩国产一区二区三区地区| 欧美另类高清zo欧美| 精品噜噜噜噜久久久久久久久试看 | 久久精品99国产国产精| 精一区二区三区| 国产黄色精品视频| 97久久精品人人爽人人爽蜜臀| 91福利资源站| 日韩欧美一卡二卡| 国产欧美一区二区精品性色| 亚洲少妇中出一区| 婷婷成人激情在线网| 九色|91porny| 99国产精品99久久久久久| 欧美三级视频在线| 久久一夜天堂av一区二区三区 | 午夜精品一区二区三区三上悠亚| 青青草原综合久久大伊人精品 | 99视频热这里只有精品免费| 欧美日韩小视频| 欧美精品一区二区三| 日韩伦理av电影| 美女一区二区久久| 97超碰欧美中文字幕| 欧美一区二区久久| 中文字幕综合网| 日本免费新一区视频| 成人一级片在线观看| 欧美疯狂做受xxxx富婆| 国产欧美日韩麻豆91| 无码av免费一区二区三区试看 | 欧美二区三区的天堂| 国产欧美精品国产国产专区| 亚洲国产精品一区二区久久恐怖片 | 七七婷婷婷婷精品国产| av一区二区不卡| 日韩一区二区电影在线| 亚洲欧洲日韩在线| 老司机午夜精品99久久| 欧洲在线/亚洲| 欧美韩日一区二区三区四区| 日韩av电影天堂| 91免费看片在线观看| 久久免费看少妇高潮| 三级欧美在线一区| 色8久久精品久久久久久蜜| 久久综合九色综合97婷婷| 亚洲成人av在线电影| 色综合色综合色综合 | 亚洲天堂精品视频| 国产美女一区二区三区| 日韩一二三区视频| 亚洲成人福利片| 一本色道综合亚洲| 国产精品污www在线观看| 韩国毛片一区二区三区| 日韩一区二区三区免费看| 亚洲第一激情av| 欧亚洲嫩模精品一区三区| 亚洲视频图片小说| 99麻豆久久久国产精品免费优播| 国产日韩欧美麻豆| 在线播放中文字幕一区| 亚洲免费观看在线观看| 97精品久久久久中文字幕| 中文字幕精品三区| 成人综合激情网| 国产精品色呦呦| 色综合天天天天做夜夜夜夜做| ㊣最新国产の精品bt伙计久久| 成人av在线资源网站| 国产精品国产精品国产专区不蜜 |