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

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

?? long_term.c

?? GSM模塊函數GSM模塊函數GSM模塊函數GSM模塊函數GSM模塊函數GSM模塊函數GSM模塊函數GSM模塊函數
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. *//* $Header: /cvsroot/linphone/linphone/gsmlib/long_term.c,v 1.1.1.1 2001/11/19 19:50:11 smorlat Exp $ */#include <stdio.h>#include <assert.h>#include "private.h"#include "gsm.h"#include "proto.h"/* *  4.2.11 .. 4.2.12 LONG TERM PREDICTOR (LTP) SECTION *//* * This module computes the LTP gain (bc) and the LTP lag (Nc) * for the long term analysis filter.   This is done by calculating a * maximum of the cross-correlation function between the current * sub-segment short term residual signal d[0..39] (output of * the short term analysis filter; for simplification the index * of this array begins at 0 and ends at 39 for each sub-segment of the * RPE-LTP analysis) and the previous reconstructed short term * residual signal dp[ -120 .. -1 ].  A dynamic scaling must be * performed to avoid overflow. */ /* The next procedure exists in six versions.  First two integer  * version (if USE_FLOAT_MUL is not defined); then four floating  * point versions, twice with proper scaling (USE_FLOAT_MUL defined),  * once without (USE_FLOAT_MUL and FAST defined, and fast run-time  * option used).  Every pair has first a Cut version (see the -C  * option to toast or the LTP_CUT option to gsm_option()), then the  * uncut one.  (For a detailed explanation of why this is altogether  * a bad idea, see Henry Spencer and Geoff Collyer, ``#ifdef Considered  * Harmful''.)  */#ifndef  USE_FLOAT_MUL#ifdef	LTP_CUTstatic void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),	struct gsm_state * st,	register word	* d,		/* [0..39]	IN	*/	register word	* dp,		/* [-120..-1]	IN	*/	word		* bc_out,	/* 		OUT	*/	word		* Nc_out	/* 		OUT	*/){	register int  	k, lambda;	word		Nc, bc;	word		wt[40];	longword	L_result;	longword	L_max, L_power;	word		R, S, dmax, scal, best_k;	word		ltp_cut;	register word	temp, wt_k;	/*  Search of the optimum scaling of d[0..39].	 */	dmax = 0;	for (k = 0; k <= 39; k++) {		temp = d[k];		temp = GSM_ABS( temp );		if (temp > dmax) {			dmax = temp;			best_k = k;		}	}	temp = 0;	if (dmax == 0) scal = 0;	else {		assert(dmax > 0);		temp = gsm_norm( (longword)dmax << 16 );	}	if (temp > 6) scal = 0;	else scal = 6 - temp;	assert(scal >= 0);	/* Search for the maximum cross-correlation and coding of the LTP lag	 */	L_max = 0;	Nc    = 40;	/* index for the maximum cross-correlation */	wt_k  = SASR(d[best_k], scal);	for (lambda = 40; lambda <= 120; lambda++) {		L_result = (longword)wt_k * dp[best_k - lambda];		if (L_result > L_max) {			Nc    = lambda;			L_max = L_result;		}	}	*Nc_out = Nc;	L_max <<= 1;	/*  Rescaling of L_max	 */	assert(scal <= 100 && scal >= -100);	L_max = L_max >> (6 - scal);	/* sub(6, scal) */	assert( Nc <= 120 && Nc >= 40);	/*   Compute the power of the reconstructed short term residual	 *   signal dp[..]	 */	L_power = 0;	for (k = 0; k <= 39; k++) {		register longword L_temp;		L_temp   = SASR( dp[k - Nc], 3 );		L_power += L_temp * L_temp;	}	L_power <<= 1;	/* from L_MULT */	/*  Normalization of L_max and L_power	 */	if (L_max <= 0)  {		*bc_out = 0;		return;	}	if (L_max >= L_power) {		*bc_out = 3;		return;	}	temp = gsm_norm( L_power );	R = SASR( L_max   << temp, 16 );	S = SASR( L_power << temp, 16 );	/*  Coding of the LTP gain	 */	/*  Table 4.3a must be used to obtain the level DLB[i] for the	 *  quantization of the LTP gain b to get the coded version bc.	 */	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;	*bc_out = bc;}#endif 	/* LTP_CUT */static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),	register word	* d,		/* [0..39]	IN	*/	register word	* dp,		/* [-120..-1]	IN	*/	word		* bc_out,	/* 		OUT	*/	word		* Nc_out	/* 		OUT	*/){	register int  	k, lambda;	word		Nc, bc;	word		wt[40];	longword	L_max, L_power;	word		R, S, dmax, scal;	register word	temp;	/*  Search of the optimum scaling of d[0..39].	 */	dmax = 0;	for (k = 0; k <= 39; k++) {		temp = d[k];		temp = GSM_ABS( temp );		if (temp > dmax) dmax = temp;	}	temp = 0;	if (dmax == 0) scal = 0;	else {		assert(dmax > 0);		temp = gsm_norm( (longword)dmax << 16 );	}	if (temp > 6) scal = 0;	else scal = 6 - temp;	assert(scal >= 0);	/*  Initialization of a working array wt	 */	for (k = 0; k <= 39; k++) wt[k] = SASR( d[k], scal );	/* Search for the maximum cross-correlation and coding of the LTP lag	 */	L_max = 0;	Nc    = 40;	/* index for the maximum cross-correlation */	for (lambda = 40; lambda <= 120; lambda++) {# undef STEP#		define STEP(k) 	(longword)wt[k] * dp[k - lambda]		register longword L_result;		L_result  = STEP(0)  ; L_result += STEP(1) ;		L_result += STEP(2)  ; L_result += STEP(3) ;		L_result += STEP(4)  ; L_result += STEP(5)  ;		L_result += STEP(6)  ; L_result += STEP(7)  ;		L_result += STEP(8)  ; L_result += STEP(9)  ;		L_result += STEP(10) ; L_result += STEP(11) ;		L_result += STEP(12) ; L_result += STEP(13) ;		L_result += STEP(14) ; L_result += STEP(15) ;		L_result += STEP(16) ; L_result += STEP(17) ;		L_result += STEP(18) ; L_result += STEP(19) ;		L_result += STEP(20) ; L_result += STEP(21) ;		L_result += STEP(22) ; L_result += STEP(23) ;		L_result += STEP(24) ; L_result += STEP(25) ;		L_result += STEP(26) ; L_result += STEP(27) ;		L_result += STEP(28) ; L_result += STEP(29) ;		L_result += STEP(30) ; L_result += STEP(31) ;		L_result += STEP(32) ; L_result += STEP(33) ;		L_result += STEP(34) ; L_result += STEP(35) ;		L_result += STEP(36) ; L_result += STEP(37) ;		L_result += STEP(38) ; L_result += STEP(39) ;		if (L_result > L_max) {			Nc    = lambda;			L_max = L_result;		}	}	*Nc_out = Nc;	L_max <<= 1;	/*  Rescaling of L_max	 */	assert(scal <= 100 && scal >=  -100);	L_max = L_max >> (6 - scal);	/* sub(6, scal) */	assert( Nc <= 120 && Nc >= 40);	/*   Compute the power of the reconstructed short term residual	 *   signal dp[..]	 */	L_power = 0;	for (k = 0; k <= 39; k++) {		register longword L_temp;		L_temp   = SASR( dp[k - Nc], 3 );		L_power += L_temp * L_temp;	}	L_power <<= 1;	/* from L_MULT */	/*  Normalization of L_max and L_power	 */	if (L_max <= 0)  {		*bc_out = 0;		return;	}	if (L_max >= L_power) {		*bc_out = 3;		return;	}	temp = gsm_norm( L_power );	R = SASR( L_max   << temp, 16 );	S = SASR( L_power << temp, 16 );	/*  Coding of the LTP gain	 */	/*  Table 4.3a must be used to obtain the level DLB[i] for the	 *  quantization of the LTP gain b to get the coded version bc.	 */	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;	*bc_out = bc;}#else	/* USE_FLOAT_MUL */#ifdef	LTP_CUTstatic void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),	struct gsm_state * st,		/*              IN 	*/	register word	* d,		/* [0..39]	IN	*/	register word	* dp,		/* [-120..-1]	IN	*/	word		* bc_out,	/* 		OUT	*/	word		* Nc_out	/* 		OUT	*/){	register int  	k, lambda;	word		Nc, bc;	word		ltp_cut;	float		wt_float[40];	float		dp_float_base[120], * dp_float = dp_float_base + 120;	longword	L_max, L_power;	word		R, S, dmax, scal;	register word	temp;	/*  Search of the optimum scaling of d[0..39].	 */	dmax = 0;	for (k = 0; k <= 39; k++) {		temp = d[k];		temp = GSM_ABS( temp );		if (temp > dmax) dmax = temp;	}	temp = 0;	if (dmax == 0) scal = 0;	else {		assert(dmax > 0);		temp = gsm_norm( (longword)dmax << 16 );	}	if (temp > 6) scal = 0;	else scal = 6 - temp;	assert(scal >= 0);	ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100; 	/*  Initialization of a working array wt	 */	for (k = 0; k < 40; k++) {		register word w = SASR( d[k], scal );		if (w < 0 ? w > -ltp_cut : w < ltp_cut) {			wt_float[k] = 0.0;		}		else {			wt_float[k] =  w;		}	}	for (k = -120; k <  0; k++) dp_float[k] =  dp[k];	/* Search for the maximum cross-correlation and coding of the LTP lag	 */	L_max = 0;	Nc    = 40;	/* index for the maximum cross-correlation */	for (lambda = 40; lambda <= 120; lambda += 9) {		/*  Calculate L_result for l = lambda .. lambda + 9.		 */		register float *lp = dp_float - lambda;		register float	W;		register float	a = lp[-8], b = lp[-7], c = lp[-6],				d = lp[-5], e = lp[-4], f = lp[-3],				g = lp[-2], h = lp[-1];		register float  E; 		register float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,				S5 = 0, S6 = 0, S7 = 0, S8 = 0;#		undef STEP#		define	STEP(K, a, b, c, d, e, f, g, h) \			if ((W = wt_float[K]) != 0.0) {	\			E = W * a; S8 += E;		\			E = W * b; S7 += E;		\			E = W * c; S6 += E;		\			E = W * d; S5 += E;		\			E = W * e; S4 += E;		\			E = W * f; S3 += E;		\			E = W * g; S2 += E;		\			E = W * h; S1 += E;		\			a  = lp[K];			\			E = W * a; S0 += E; } else (a = lp[K])#		define	STEP_A(K)	STEP(K, a, b, c, d, e, f, g, h)#		define	STEP_B(K)	STEP(K, b, c, d, e, f, g, h, a)#		define	STEP_C(K)	STEP(K, c, d, e, f, g, h, a, b)#		define	STEP_D(K)	STEP(K, d, e, f, g, h, a, b, c)#		define	STEP_E(K)	STEP(K, e, f, g, h, a, b, c, d)#		define	STEP_F(K)	STEP(K, f, g, h, a, b, c, d, e)#		define	STEP_G(K)	STEP(K, g, h, a, b, c, d, e, f)#		define	STEP_H(K)	STEP(K, h, a, b, c, d, e, f, g)		STEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);		STEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);		STEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);		STEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);		STEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);		STEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);		STEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);		STEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);		STEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);		STEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);		if (S0 > L_max) { L_max = S0; Nc = lambda;     }		if (S1 > L_max) { L_max = S1; Nc = lambda + 1; }		if (S2 > L_max) { L_max = S2; Nc = lambda + 2; }		if (S3 > L_max) { L_max = S3; Nc = lambda + 3; }		if (S4 > L_max) { L_max = S4; Nc = lambda + 4; }		if (S5 > L_max) { L_max = S5; Nc = lambda + 5; }		if (S6 > L_max) { L_max = S6; Nc = lambda + 6; }		if (S7 > L_max) { L_max = S7; Nc = lambda + 7; }		if (S8 > L_max) { L_max = S8; Nc = lambda + 8; }	}	*Nc_out = Nc;	L_max <<= 1;	/*  Rescaling of L_max	 */	assert(scal <= 100 && scal >=  -100);	L_max = L_max >> (6 - scal);	/* sub(6, scal) */	assert( Nc <= 120 && Nc >= 40);	/*   Compute the power of the reconstructed short term residual	 *   signal dp[..]	 */	L_power = 0;	for (k = 0; k <= 39; k++) {		register longword L_temp;		L_temp   = SASR( dp[k - Nc], 3 );		L_power += L_temp * L_temp;	}	L_power <<= 1;	/* from L_MULT */	/*  Normalization of L_max and L_power	 */	if (L_max <= 0)  {		*bc_out = 0;		return;	}	if (L_max >= L_power) {		*bc_out = 3;		return;	}	temp = gsm_norm( L_power );	R = SASR( L_max   << temp, 16 );	S = SASR( L_power << temp, 16 );	/*  Coding of the LTP gain	 */	/*  Table 4.3a must be used to obtain the level DLB[i] for the	 *  quantization of the LTP gain b to get the coded version bc.	 */	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;	*bc_out = bc;}#endif /* LTP_CUT */static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),	register word	* d,		/* [0..39]	IN	*/	register word	* dp,		/* [-120..-1]	IN	*/	word		* bc_out,	/* 		OUT	*/	word		* Nc_out	/* 		OUT	*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区四区| 亚洲私人黄色宅男| 国产精品视频免费| 天天操天天色综合| k8久久久一区二区三区 | 99久久久精品| 555夜色666亚洲国产免| √…a在线天堂一区| 久久精品国产999大香线蕉| 91久久奴性调教| 中文字幕精品综合| 国产真实乱偷精品视频免| 欧美人与禽zozo性伦| 亚洲少妇最新在线视频| 国产成人午夜精品影院观看视频| 欧美三级电影一区| 国产日韩精品一区二区三区 | 69久久夜色精品国产69蝌蚪网| 午夜av电影一区| 在线视频国内一区二区| 国产欧美一区二区精品忘忧草| 日韩国产在线一| 精品视频免费看| 亚洲成人动漫一区| 欧美日韩久久久| 亚洲成人免费视频| 欧美日韩免费一区二区三区视频| 亚洲免费成人av| 在线观看国产日韩| 一区二区三区产品免费精品久久75| av在线播放成人| 一区视频在线播放| 色综合天天做天天爱| 国产精品久久777777| 成人ar影院免费观看视频| 国产精品网站在线| 不卡一区中文字幕| 亚洲丝袜精品丝袜在线| 色狠狠综合天天综合综合| 一区二区三区在线视频免费观看| 91在线精品一区二区| 亚洲欧美另类久久久精品 | 欧美在线免费播放| 亚洲国产一区二区三区青草影视| 欧美亚一区二区| 午夜欧美一区二区三区在线播放| 欧美日韩国产影片| 美女诱惑一区二区| 久久精品欧美一区二区三区麻豆| 国产成人啪免费观看软件| 日韩一区欧美一区| 欧美日韩精品三区| 精品一区二区在线观看| 欧美高清一级片在线观看| 色综合视频一区二区三区高清| 一区二区三区在线不卡| 欧美日韩色综合| 国精产品一区一区三区mba视频 | 日韩极品在线观看| 精品国产精品网麻豆系列| 成人在线视频一区| 亚洲一级二级三级| 日韩精品中文字幕在线不卡尤物| 国产精品1区2区3区在线观看| 国产精品久久久久9999吃药| 欧美午夜视频网站| 国产一区二区三区四区五区美女 | 成人a区在线观看| 视频在线观看91| 中文乱码免费一区二区| 欧美日韩国产综合草草| 国产一区福利在线| 亚洲精品一卡二卡| 久久久久国产精品免费免费搜索| 9l国产精品久久久久麻豆| 亚洲成av人片| 国产精品久久三| 欧美videossexotv100| 色先锋资源久久综合| 国产一级精品在线| 午夜精品福利一区二区三区蜜桃| 久久久综合精品| 宅男在线国产精品| 色综合亚洲欧洲| 国产一区中文字幕| 日本午夜一区二区| 亚洲综合男人的天堂| 国产日产精品一区| 日韩精品中午字幕| 欧美一区三区二区| 在线观看不卡视频| 色八戒一区二区三区| 国产在线精品一区二区不卡了| 亚洲网友自拍偷拍| 日韩一区有码在线| 中文一区一区三区高中清不卡| 欧美一三区三区四区免费在线看| 欧美在线看片a免费观看| 成人手机电影网| 国产经典欧美精品| 国产一区欧美日韩| 国产美女久久久久| 精品中文字幕一区二区小辣椒| 日韩中文字幕亚洲一区二区va在线 | 91亚洲国产成人精品一区二区三| 精品亚洲成a人| 美女高潮久久久| 美女脱光内衣内裤视频久久影院| 五月婷婷久久丁香| 日本不卡视频在线| 美女在线观看视频一区二区| 美女一区二区在线观看| 久久精品国产99国产| 久88久久88久久久| 久久99精品久久久久久| 美腿丝袜一区二区三区| 久久精品久久精品| 国产乱码一区二区三区| 国产精品一区二区久久不卡 | 99精品国产99久久久久久白柏| 国产成人av电影| 福利一区福利二区| caoporm超碰国产精品| 北条麻妃一区二区三区| 99精品视频免费在线观看| 99久久久精品| 欧美日韩精品免费| 在线不卡a资源高清| 欧美岛国在线观看| www成人在线观看| 中文字幕一区二区三中文字幕 | 国产亚洲综合色| 国产精品每日更新| 一区二区三区蜜桃网| 性久久久久久久| 韩国av一区二区三区| 成人sese在线| 欧美精品乱码久久久久久| 久久综合久久鬼色| 依依成人精品视频| 麻豆高清免费国产一区| 国产福利一区在线观看| 91免费视频观看| 欧美不卡视频一区| 中文字幕欧美一区| 婷婷成人综合网| 成人午夜免费av| 欧美日韩在线直播| 亚洲国产精品精华液2区45| 一区二区三区四区高清精品免费观看| 日韩高清中文字幕一区| 国产在线精品一区二区三区不卡 | 亚洲免费在线观看视频| 天天色综合成人网| 成人黄色一级视频| 日韩一区二区不卡| 最新不卡av在线| 精一区二区三区| 欧美亚洲一区二区在线| 欧美精品一区二区三区很污很色的 | 日本一区二区三区国色天香 | 日韩一二在线观看| 亚洲天堂a在线| 国产在线不卡一区| 欧美日本一区二区三区四区| 国产亚洲精久久久久久| 青青青爽久久午夜综合久久午夜| 高清不卡一区二区| 欧美草草影院在线视频| 亚洲黄色av一区| 国产v日产∨综合v精品视频| 欧美日韩国产小视频在线观看| 欧美激情一区二区| 老司机精品视频导航| 欧美视频自拍偷拍| 日韩久久一区二区| 国产精品自拍一区| 日韩视频中午一区| 性做久久久久久免费观看 | 成人精品视频网站| 久久亚洲影视婷婷| 免费精品99久久国产综合精品| 欧美在线不卡视频| 亚洲乱码日产精品bd| 国产精品18久久久| 久久久久久免费毛片精品| 麻豆精品在线播放| 91精品国产乱码久久蜜臀| 首页国产欧美久久| 欧美日韩精品一区二区三区 | 亚洲欧美在线高清| 国产69精品久久久久777| 精品欧美乱码久久久久久| 日韩精品一卡二卡三卡四卡无卡| 欧美性xxxxx极品少妇| 亚洲一区二区不卡免费| 91久久国产最好的精华液| 亚洲欧美另类久久久精品2019| 色综合久久天天| 一区二区三区在线观看国产|