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

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

?? sp_enc.cpp

?? 實現了錄音,放音功能!在evc4.0下編譯功過,wince5.0下能正常錄音,放音,暫停錄放音!
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
*    a                 I: LPC coefficients                    [LP_ORDER+1]
*    fac               I: Spectral expansion factors.         [LP_ORDER+1]
*    a_exp             O: Spectral expanded LPC coefficients  [LP_ORDER+1]
*
* Function:
*    Spectral expansion of LP coefficients
*
* Returns:
*    void
*/
static void Weight_Ai( float a[], const float fac[], float a_exp[] )
{
	INT32 i;
	
	
	a_exp[0] = a[0];
	
	for ( i = 1; i <= LP_ORDER; i++ )
	{
		a_exp[i] = a[i] * fac[i - 1];
	}
	return;
}


/*
* Residu
*
*
* Parameters:
*    a                 I: prediction coefficients
*    x                 I: speech signal
*    y                 O: residual signal
*
* Function:
*    Computes the LTP residual signal.
*
* Returns:
*    void
*/
static void Residu( float a[], float x[], float y[] )
{
	float s;
	INT32 i;
	
	
	for ( i = 0; i < SUBFRM_SIZE; i += 4 )
	{
		s = x[i] * a[0];
		s += x[i - 1] *a[1];
		s += x[i - 2] * a[2];
		s += x[i - 3] * a[3];
		s += x[i - 4] * a[4];
		s += x[i - 5] * a[5];
		s += x[i - 6] * a[6];
		s += x[i - 7] * a[7];
		s += x[i - 8] * a[8];
		s += x[i - 9] * a[9];
		s += x[i - 10] * a[10];
		y[i] = s;
		s = x[i + 1] *a[0];
		s += x[i] * a[1];
		s += x[i - 1] *a[2];
		s += x[i - 2] * a[3];
		s += x[i - 3] * a[4];
		s += x[i - 4] * a[5];
		s += x[i - 5] * a[6];
		s += x[i - 6] * a[7];
		s += x[i - 7] * a[8];
		s += x[i - 8] * a[9];
		s += x[i - 9] * a[10];
		y[i + 1] = s;
		s = x[i + 2] * a[0];
		s += x[i + 1] *a[1];
		s += x[i] * a[2];
		s += x[i - 1] *a[3];
		s += x[i - 2] * a[4];
		s += x[i - 3] * a[5];
		s += x[i - 4] * a[6];
		s += x[i - 5] * a[7];
		s += x[i - 6] * a[8];
		s += x[i - 7] * a[9];
		s += x[i - 8] * a[10];
		y[i + 2] = s;
		s = x[i + 3] * a[0];
		s += x[i + 2] * a[1];
		s += x[i + 1] *a[2];
		s += x[i] * a[3];
		s += x[i - 1] *a[4];
		s += x[i - 2] * a[5];
		s += x[i - 3] * a[6];
		s += x[i - 4] * a[7];
		s += x[i - 5] * a[8];
		s += x[i - 6] * a[9];
		s += x[i - 7] * a[10];
		y[i + 3] = s;
	}
	return;
}


/*
* Syn_filt
*
*
* Parameters:
*    a                 I: prediction coefficients [LP_ORDER+1]
*    x                 I: input signal
*    y                 O: output signal
*    mem               B: memory associated with this filtering
*    update            I: 0=no update, 1=update of memory.
*
* Function:
*    Perform synthesis filtering through 1/A(z).
*
* Returns:
*    void
*/
static void Syn_filt( float a[], float x[], float y[], float mem[], INT16 update )
{
	double tmp[50];
	double sum;
	double *yy;
	INT32 i;
	
	
	/* Copy mem[] to yy[] */
	yy = tmp;
	
	for ( i = 0; i < LP_ORDER; i++ )
	{
		*yy++ = mem[i];
	}
	
	/* Do the filtering. */
	for ( i = 0; i < SUBFRM_SIZE; i = i + 4 ) 
	{
		sum = x[i] * a[0];
		sum -= a[1] * yy[ - 1];
		sum -= a[2] * yy[ - 2];
		sum -= a[3] * yy[ - 3];
		sum -= a[4] * yy[ - 4];
		sum -= a[5] * yy[ - 5];
		sum -= a[6] * yy[ - 6];
		sum -= a[7] * yy[ - 7];
		sum -= a[8] * yy[ - 8];
		sum -= a[9] * yy[ - 9];
		sum -= a[10] * yy[ - 10];
		*yy++ = sum;
		y[i] = ( float )yy[ - 1];
		sum = x[i + 1] *a[0];
		sum -= a[1] * yy[ - 1];
		sum -= a[2] * yy[ - 2];
		sum -= a[3] * yy[ - 3];
		sum -= a[4] * yy[ - 4];
		sum -= a[5] * yy[ - 5];
		sum -= a[6] * yy[ - 6];
		sum -= a[7] * yy[ - 7];
		sum -= a[8] * yy[ - 8];
		sum -= a[9] * yy[ - 9];
		sum -= a[10] * yy[ - 10];
		*yy++ = sum;
		y[i + 1] = ( float )yy[ - 1];
		sum = x[i + 2] * a[0];
		sum -= a[1] * yy[ - 1];
		sum -= a[2] * yy[ - 2];
		sum -= a[3] * yy[ - 3];
		sum -= a[4] * yy[ - 4];
		sum -= a[5] * yy[ - 5];
		sum -= a[6] * yy[ - 6];
		sum -= a[7] * yy[ - 7];
		sum -= a[8] * yy[ - 8];
		sum -= a[9] * yy[ - 9];
		sum -= a[10] * yy[ - 10];
		*yy++ = sum;
		y[i + 2] = ( float )yy[ - 1];
		sum = x[i + 3] * a[0];
		sum -= a[1] * yy[ - 1];
		sum -= a[2] * yy[ - 2];
		sum -= a[3] * yy[ - 3];
		sum -= a[4] * yy[ - 4];
		sum -= a[5] * yy[ - 5];
		sum -= a[6] * yy[ - 6];
		sum -= a[7] * yy[ - 7];
		sum -= a[8] * yy[ - 8];
		sum -= a[9] * yy[ - 9];
		sum -= a[10] * yy[ - 10];
		*yy++ = sum;
		y[i + 3] = ( float )yy[ - 1];
	}
	
	/* Update of memory if update==1 */
	if ( update != 0 ) 
	{
		for ( i = 0; i < LP_ORDER; i++ )
		{
			mem[i] = y[30 + i];
		}
	}
	return;
}


/*
* pre_big
*
*
* Parameters:
*    mode              I: AMR mode
*    gamma1            I: spectral exp. factor 1
*    gamma1_12k2       I: spectral exp. factor 1 for modes above MR795
*    gamma2            I: spectral exp. factor 2
*    A_t               I: A(z) unquantized, for 4 subframes
*    frame_offset      I: frameoffset, 1st or second big_sbf
*    speech            I: speech
*    mem_w             B: synthesis filter memory state
*    wsp               O: weighted speech
*
* Function:
*    Big subframe (2 subframes) preprocessing
*
*    Open-loop pitch analysis is performed in order to simplify the pitch
*    analysis and confine the closed-loop pitch search to a small number of
*    lags around the open-loop estimated lags.
*    Open-loop pitch estimation is based on the weighted speech signal Sw(n)
*    which is obtained by filtering the input speech signal through
*    the weighting filter
*
*    W(z) = A(z/g1) / A(z/g2)
*
*    That is, in a subframe of size L, the weighted speech is given by:
*
*                    10                           10
*    Sw(n) = S(n) + SUM[a(i) * g1(i) * S(n-i)] - SUM[a(i) * g2(i) * Sw(n-i)],
*                   i=1                          i=1
*    n = 0, ..., L-1
*
* Returns:
*    void
*/
static INT32 pre_big( enum Mode mode, const float gamma1[], const float gamma1_12k2[],
					  const float gamma2[], float A_t[], INT16 frame_offset,
					  float speech[], float mem_w[], float wsp[] )
{
	float Ap1[LP_ORDER_PLUS], Ap2[LP_ORDER_PLUS];
	INT32 offset, i;
	
	
	/* A(z) with spectral expansion */
	const float *g1;
	
	
	g1 = gamma1_12k2;
	
	if ( mode <= MR795 )
	{
		g1 = gamma1;
	}
	offset = 0;
	
	if ( frame_offset > 0 ) 
	{
		offset = LP_ORDER_PLUS << 1;
	}
	
	/* process two subframes (which form the "big" subframe) */
	for ( i = 0; i < 2; i++ ) 
	{
		/* a(i) * g1(i) */
		Weight_Ai( &A_t[offset], g1, Ap1 );
		
		/* a(i) * g2(i) */
		Weight_Ai( &A_t[offset], gamma2, Ap2 );
		
		/*
		*       10
		*  S(n) + SUM[a(i) * g1(i) * S(n-i)]
		*       i=1
		*/
		Residu( Ap1, &speech[frame_offset], &wsp[frame_offset] );
		
		/*
		*          10                            10
		*  S(n) + SUM[a(i) * g1(i) * S(n-i)]    SUM[a(i) * g2(i) * Sn(n-i)]
		*         i=1                           i=1
		*/
		Syn_filt( Ap2, &wsp[frame_offset], &wsp[frame_offset], mem_w, 1 );
		offset += LP_ORDER_PLUS;
		frame_offset += SUBFRM_SIZE;
	}
	return 0;
}


/*
* comp_corr
*
*
* Parameters:
*    sig               I: signal
*    L_frame           I: length of frame to compute pitch
*    lag_max           I: maximum lag
*    lag_min           I: minimum lag
*    corr              O: correlation of selected lag
*
* Function:
*    Calculate all correlations in a given delay range.
*
* Returns:
*    void
*/
static void comp_corr( float sig[], INT32 L_frame, INT32 lag_max, 
					  INT32 lag_min, float corr[] )
{
	INT32 i, j;
	float *p, *p1;
	float T0;
	
	
	for ( i = lag_max; i >= lag_min; i-- ) 
	{
		p = sig;
		p1 = &sig[ - i];
		T0 = 0.0F;
		
		for ( j = 0; j < L_frame; j = j + 40, p += 40, p1 += 40 ) 
		{
			T0 += p[0] * p1[0] + p[1] * p1[1] + p[2] * p1[2] + p[3] * p1[3];
			T0 += p[4] * p1[4] + p[5] * p1[5] + p[6] * p1[6] + p[7] * p1[7];
			T0 += p[8] * p1[8] + p[9] * p1[9] + p[10] * p1[10] + p[11] * p1[11];
			T0 += p[12] * p1[12] + p[13] * p1[13] + p[14] * p1[14] + p[15] * p1[15];
			T0 += p[16] * p1[16] + p[17] * p1[17] + p[18] * p1[18] + p[19] * p1[19];
			T0 += p[20] * p1[20] + p[21] * p1[21] + p[22] * p1[22] + p[23] * p1[23];
			T0 += p[24] * p1[24] + p[25] * p1[25] + p[26] * p1[26] + p[27] * p1[27];
			T0 += p[28] * p1[28] + p[29] * p1[29] + p[30] * p1[30] + p[31] * p1[31];
			T0 += p[32] * p1[32] + p[33] * p1[33] + p[34] * p1[34] + p[35] * p1[35];
			T0 += p[36] * p1[36] + p[37] * p1[37] + p[38] * p1[38] + p[39] * p1[39];
		}
		corr[ - i] = T0;
	}
	return;
}


/*
* vad_tone_detection
*
*
* Parameters:
*    st->tone          B: flags indicating presence of a tone
*    T0                I: autocorrelation maxima
*    t1                I: energy
*
* Function:
*    Set tone flag if pitch gain is high.
*    This is used to detect signaling tones and other signals
*    with high pitch gain.
*
* Returns:
*    void
*/
//#ifndef VAD2
static void vad_tone_detection( vadState *st, float T0, float t1 )
{
	if ( ( t1 > 0 ) && ( T0 > t1 * TONE_THR ) ) {
		st->tone = st->tone | 0x00004000;
	}
}
//#endif

/*
* Lag_max
*
*
* Parameters:
*    vadSt          B: vad structure
*    corr           I: correlation vector
*    sig            I: signal
*    L_frame        I: length of frame to compute pitch
*    lag_max        I: maximum lag
*    lag_min        I: minimum lag
*    cor_max        O: maximum correlation
*    dtx            I: dtx on/off
*
* Function:
*    Compute the open loop pitch lag.
*
* Returns:
*    p_max             lag found
*/
/*
#ifdef VAD2
static INT16 Lag_max( float corr[], float sig[], INT16 L_frame,
INT32 lag_max, INT32 lag_min, float *cor_max,
INT32 dtx, float *rmax, float *r0 )
#else
*/
static INT16 Lag_max( vadState *vadSt, float corr[], float sig[], INT16 L_frame,
					  INT32 lag_max, INT32 lag_min, float *cor_max, INT32 dtx )
					  //#endif
{
	float max, T0;
	float *p;
	INT32 i, j, p_max;
	
	
	max = -FLT_MAX;
	p_max = lag_max;
	
	for ( i = lag_max, j = ( PIT_MAX - lag_max - 1 ); i >= lag_min; i--, j-- )
	{
		if ( corr[ - i] >= max ) 
		{
			max = corr[ - i];
			p_max = i;
		}
	}
	
	/* compute energy for normalization */
	T0 = 0.0F;
	p = &sig[ - p_max];
	
	for ( i = 0; i < L_frame; i++, p++ ) 
	{
		T0 += *p * *p;
	}
	
	if ( dtx ) 
	{
	/*
	#ifdef VAD2
	*rmax = max;
	*r0 = T0;
	#else
		*/
		/* check tone */
		vad_tone_detection( vadSt, max, T0 );
		//#endif
	}
	
	if ( T0 > 0.0F )
		T0 = 1.0F / ( float )sqrt( T0 );
	else
		T0 = 0.0F;
	
	/* max = max/sqrt(energy) */
	max *= T0;
	*cor_max = max;
	return( ( INT16 )p_max );
}


/*
* hp_max
*
*
* Parameters:
*    corr           I: correlation vector
*    sig            I: signal
*    L_frame        I: length of frame to compute pitch
*    lag_max        I: maximum lag
*    lag_min        I: minimum lag
*    cor_hp_max     O: max high-pass filtered correlation
*
* Function:
*    Find the maximum correlation of scal_sig[] in a given delay range.
*
*    The correlation is given by
*       cor[t] = <scal_sig[n],scal_sig[n-t]>,  t=lag_min,...,lag_max
*    The functions outputs the maximum correlation after normalization
*    and the corresponding lag.
*
* Returns:
*    void
*/
//#ifndef VAD2
static void hp_max( float corr[], float sig[], INT32 L_frame, 
				   INT32 lag_max, INT32 lag_min, float *cor_hp_max )
{
	float T0, t1, max;
	float *p, *p1;
	INT32 i;
	
	
	max = -FLT_MAX;
	T0 = 0;
	
	for ( i = lag_max - 1; i > lag_min; i-- ) {
		/* high-pass filtering */
		T0 = ( ( corr[ - i] * 2 ) - corr[ - i-1] )-corr[ - i + 1];
		T0 = ( float )fabs( T0 );
		
		if ( T0 >= max ) {
			max = T0;
		}
	}
	
	/* compute energy */
	p = sig;
	p1 = &sig[0];
	T0 = 0;
	
	for ( i = 0; i < L_frame; i++, p++, p1++ ) {
		T0 += *p * *p1;
	}
	p = sig;
	p1 = &sig[ - 1];
	t1 = 0;
	
	for ( i = 0; i < L_frame; i++, p++, p1++ ) {
		t1 += *p * *p1;
	}
	
	/* high-pass filtering */
	T0 = T0 - t1;
	T0 = ( float )fabs( T0 );
	
	/* max/T0 */
	if ( T0 != 0 ) {
		*cor_hp_max = max / T0;
	}
	else {
		*cor_hp_max = 0;
	}
}
//#endif

/*
* vad_tone_detection_update
*
*
* Parameters:
*    st->tone          B: flags indicating presence of a tone
*    one_lag_per_frame I: 1 open-loop lag is calculated per each frame
*
* Function:
*    Update the tone flag register.
*
* Returns:
*    void
*/
//#ifndef VAD2
static void vad_tone_detection_update( vadState *st, INT16 one_lag_per_frame )
{
	/* Shift tone flags right by one bit */
	st->tone = st->tone >> 1;
	
	/*
    * If open-loop lag is calculated only once in each frame,
    * do extra update and assume that the other tone flag
    * of the frame is one.
    */
	if ( one_lag_per_frame != 0 ) {
		st->tone = st->tone >> 1;
		st->tone = st->tone | 0x00002000;
	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
风流少妇一区二区| 成人激情开心网| 日本不卡高清视频| 欧美精品亚洲一区二区在线播放| 天天亚洲美女在线视频| 日韩av一区二区在线影视| 亚洲第一综合色| 精品入口麻豆88视频| 亚洲美女一区二区三区| 激情综合网av| 欧美日韩一级视频| 亚洲欧美偷拍另类a∨色屁股| 麻豆精品视频在线观看视频| 精品乱人伦小说| 午夜日韩在线电影| 色欧美乱欧美15图片| 中文字幕免费观看一区| 日韩中文字幕区一区有砖一区 | 日韩欧美国产综合| 一区二区三区久久| 不卡视频一二三| 中文字幕第一区第二区| 国产精品一色哟哟哟| 26uuu国产电影一区二区| 亚洲6080在线| 色综合天天综合在线视频| 亚洲国产精品成人综合色在线婷婷| 美女脱光内衣内裤视频久久影院| 欧美丰满美乳xxx高潮www| 欧美无砖专区一中文字| 国产精品自拍一区| 日本欧美一区二区三区乱码| 亚洲激情综合网| 中文字幕中文字幕在线一区 | 成人一二三区视频| 美女任你摸久久| 亚洲午夜视频在线观看| 国产精品进线69影院| 国产欧美一区二区精品婷婷| 一区二区三区中文免费| 日韩毛片视频在线看| 美日韩一区二区| 一区二区三区免费看视频| 美女在线视频一区| 青青草精品视频| 中文字幕亚洲欧美在线不卡| 777奇米四色成人影色区| 日本在线不卡视频| **性色生活片久久毛片| 亚洲人成7777| 国产激情91久久精品导航| 中文字幕在线不卡一区| jiyouzz国产精品久久| 69p69国产精品| 美女视频黄频大全不卡视频在线播放| 精品国产一区久久| 国产不卡在线播放| 亚洲精品视频在线观看网站| 91精品国产91久久久久久一区二区| 美女视频黄 久久| 中文字幕欧美国产| 在线视频国产一区| 久久国产精品99久久久久久老狼 | 九九**精品视频免费播放| 欧美成人一区二区| 成人理论电影网| 亚洲国产成人高清精品| 久久久另类综合| 欧洲亚洲精品在线| 国产一区二区三区免费播放| 亚洲青青青在线视频| 精品国内二区三区| 色伊人久久综合中文字幕| 狠狠久久亚洲欧美| 亚洲国产日韩av| 国产欧美精品一区| 欧美一区二区三区免费在线看 | 国产v日产∨综合v精品视频| 亚洲一二三专区| 国产日韩欧美麻豆| 欧美日韩精品一区二区天天拍小说| 粉嫩嫩av羞羞动漫久久久| 偷偷要91色婷婷| 最新日韩av在线| 国产午夜精品一区二区三区四区 | 国内精品第一页| 亚洲午夜免费视频| 欧美激情综合网| 日韩一区二区三区免费观看 | eeuss鲁片一区二区三区在线观看| 婷婷综合久久一区二区三区| 亚洲美女一区二区三区| 国产日韩v精品一区二区| 日韩免费看网站| 欧美高清hd18日本| 在线观看av不卡| 97成人超碰视| 成人av动漫在线| 岛国精品一区二区| 精一区二区三区| 韩国精品在线观看| 日本不卡的三区四区五区| 亚洲成人黄色影院| 亚洲成人资源在线| 亚洲国产wwwccc36天堂| 亚洲一区视频在线| 夜夜精品浪潮av一区二区三区| 亚洲女与黑人做爰| 亚洲精品高清在线观看| 亚洲女人的天堂| 亚洲精品欧美激情| 亚洲精品写真福利| 国产一区二区免费看| 麻豆成人久久精品二区三区小说| 日韩精品亚洲专区| 日韩高清欧美激情| 日韩av电影免费观看高清完整版| 日韩成人av影视| 久久精品国产在热久久| 韩国在线一区二区| 精品一区二区三区免费视频| 黄色资源网久久资源365| 国产乱码字幕精品高清av| 国产成人自拍网| a4yy欧美一区二区三区| 91香蕉视频在线| 欧美日韩激情一区| 欧美一级理论性理论a| 麻豆传媒一区二区三区| 一区二区日韩电影| 亚洲精品福利视频网站| 亚洲一区视频在线观看视频| 国产精品成人在线观看| 中文无字幕一区二区三区| 91精品久久久久久久91蜜桃| 在线播放欧美女士性生活| 欧美日韩三级一区| 亚洲精品在线免费观看视频| 日韩欧美国产午夜精品| 精品福利视频一区二区三区| 久久奇米777| 亚洲日本免费电影| 亚洲国产精品久久人人爱蜜臀| 亚洲午夜一区二区| 蜜臀av在线播放一区二区三区| 免费不卡在线视频| 美女视频网站黄色亚洲| 成人免费一区二区三区在线观看| 国产精品一二三区| 色婷婷综合久久久久中文一区二区 | 91福利国产精品| 欧美日韩三级一区二区| 久久er99热精品一区二区| 国产精品美女www爽爽爽| 色综合久久中文综合久久97 | 欧美精彩视频一区二区三区| 亚洲精品v日韩精品| 久久激情五月激情| 欧美情侣在线播放| 亚洲国产精品成人综合色在线婷婷| 亚洲一区二区视频在线观看| 精品一区二区三区视频在线观看| 一本到一区二区三区| 久久女同精品一区二区| 亚洲成年人影院| 成人av片在线观看| 精品播放一区二区| 亚洲综合久久久久| 不卡的av电影在线观看| 日韩欧美国产一区二区在线播放| 亚洲六月丁香色婷婷综合久久| 国产一区二区三区在线观看免费| 欧美视频一区二区三区在线观看| 亚洲国产成人私人影院tom| 蜜臀久久99精品久久久画质超高清 | 亚洲另类在线制服丝袜| 国产精品一区二区男女羞羞无遮挡| 欧美性xxxxx极品少妇| 亚洲色图清纯唯美| 国产综合色产在线精品| 欧美一级夜夜爽| 亚洲成av人片在线观看| 一本久道久久综合中文字幕| 国产精品毛片a∨一区二区三区| 另类欧美日韩国产在线| 欧美日韩二区三区| 一个色在线综合| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产精品色哟哟网站| 国产乱码精品一区二区三区忘忧草 | 韩国一区二区视频| 欧美不卡一区二区三区四区| 日韩综合小视频| 欧美伊人久久久久久久久影院| 亚洲美女视频一区| 色综合天天综合网天天看片| 亚洲日本青草视频在线怡红院| 91丨porny丨户外露出| 国产精品福利一区| 色哟哟精品一区|