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

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

?? long_ter.c

?? voice GSM 1.0 Codec
?? 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: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/long_term.c,v 1.6 1996/07/02 12:33:19 jutta 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一区二区三区免费野_久草精品视频
麻豆91在线播放免费| 国产精品午夜电影| 日本亚洲三级在线| 91精品国产品国语在线不卡| 亚洲成av人片在线| 欧美精品视频www在线观看 | 黄色精品一二区| 欧美成人免费网站| 精品夜夜嗨av一区二区三区| 日韩一区二区三区在线| 日韩电影免费在线看| 欧美男生操女生| 午夜不卡在线视频| 久久久久青草大香线综合精品| 美女爽到高潮91| 久久久久久久电影| 不卡一区二区三区四区| 亚洲综合激情网| 制服丝袜亚洲播放| 国产清纯白嫩初高生在线观看91 | 国产精品激情偷乱一区二区∴| 成人福利视频网站| 一区二区三区免费观看| 欧美日韩黄色一区二区| 精品一区二区三区在线观看| 国产欧美精品在线观看| jlzzjlzz欧美大全| 午夜国产精品一区| 2024国产精品视频| 成人免费视频一区| 亚洲自拍偷拍网站| 精品国产麻豆免费人成网站| 国产乱子伦一区二区三区国色天香 | 亚洲人成电影网站色mp4| 色婷婷精品久久二区二区蜜臀av| 亚洲成人免费影院| 精品国产免费久久| 成人国产精品免费网站| 亚洲一区二区黄色| 欧美一区二区福利视频| 国产精品一区二区在线看| 国产亚洲精品久| 欧美色男人天堂| 久久99日本精品| 亚洲日本乱码在线观看| 91天堂素人约啪| 奇米888四色在线精品| 国产精品乱子久久久久| 欧美视频三区在线播放| 国产裸体歌舞团一区二区| 亚洲乱码国产乱码精品精可以看| 日韩午夜av电影| 色综合网站在线| 国内精品不卡在线| 亚洲一区自拍偷拍| 国产午夜精品理论片a级大结局| 色8久久精品久久久久久蜜| 日本不卡高清视频| 亚洲天堂成人在线观看| 日韩欧美中文一区二区| 91农村精品一区二区在线| 蜜臀久久99精品久久久画质超高清| 国产无人区一区二区三区| 欧美丰满少妇xxxxx高潮对白| 成人午夜电影久久影院| 老司机一区二区| 蜜臀精品久久久久久蜜臀| 亚洲综合久久久久| 一区二区三区资源| 中文字幕一区二区三区在线不卡| 精品欧美乱码久久久久久| 欧美久久久久中文字幕| 色综合久久久久综合体桃花网| 国产成人在线视频播放| 日韩国产精品91| 午夜天堂影视香蕉久久| 亚洲最新视频在线观看| 中文字幕成人网| 久久久久国产精品人| 久久一区二区三区四区| 日韩免费看的电影| 欧美精品一区二区三区蜜桃| 欧美高清视频不卡网| 91精品久久久久久久99蜜桃 | 91美女精品福利| 成人黄动漫网站免费app| 国产精品自拍三区| 国产一区二区主播在线| 激情综合五月天| 日本视频中文字幕一区二区三区| 亚洲精品伦理在线| 亚洲欧美日韩精品久久久久| 自拍偷在线精品自拍偷无码专区| 久久精品夜夜夜夜久久| 精品人伦一区二区色婷婷| 日韩欧美一区电影| 欧美电影免费观看高清完整版在线观看| 欧美精品久久一区二区三区| 欧美亚洲另类激情小说| 91国偷自产一区二区使用方法| 99免费精品视频| 一本到三区不卡视频| 色噜噜狠狠色综合欧洲selulu| 色婷婷久久一区二区三区麻豆| 在线免费观看成人短视频| 欧美日韩精品一区二区三区四区 | 亚洲国产精品成人综合色在线婷婷 | 久久精品免费观看| 国产在线精品不卡| 床上的激情91.| 色综合天天综合网天天看片| 91亚洲大成网污www| 91免费小视频| 在线不卡a资源高清| 日韩欧美一级二级| 中文字幕 久热精品 视频在线| 国产精品久久久久四虎| 国产精品久久久久国产精品日日| 一区二区在线电影| 青椒成人免费视频| 国产成人午夜片在线观看高清观看| 成人免费看黄yyy456| 91久久久免费一区二区| 欧美高清你懂得| 久久夜色精品国产欧美乱极品| 久久精品人人做人人综合| 中文字幕亚洲综合久久菠萝蜜| 亚洲免费av高清| 毛片一区二区三区| 99这里只有精品| 7777精品伊人久久久大香线蕉超级流畅| 欧美不卡激情三级在线观看| 国产精品久久久久9999吃药| 亚洲aaa精品| 国产a区久久久| 欧美性生活久久| 久久久精品国产免大香伊| 亚洲精品日日夜夜| 国产乱人伦偷精品视频不卡 | 欧美日韩一区二区三区在线看| 色婷婷av久久久久久久| 欧美色综合网站| 中文字幕一区二区三区四区不卡| 日韩av中文字幕一区二区| 不卡的av网站| 欧美一区二区三区成人| 一区二区中文字幕在线| 男女性色大片免费观看一区二区| aa级大片欧美| 精品日产卡一卡二卡麻豆| 一区二区三区在线不卡| 国产精品一区二区男女羞羞无遮挡 | 亚洲三级久久久| 国产呦精品一区二区三区网站| 在线观看视频91| 亚洲欧洲三级电影| 韩国精品主播一区二区在线观看| 在线日韩国产精品| 日本一区二区综合亚洲| 日韩二区三区在线观看| 色婷婷av一区二区| 国产精品久久久久一区二区三区 | 成人精品国产福利| 欧美一级二级三级乱码| 亚洲天堂2014| 成人黄色小视频在线观看| 欧美本精品男人aⅴ天堂| 亚洲国产裸拍裸体视频在线观看乱了| 成人午夜av影视| 国产亚洲一区二区三区在线观看| 五月天久久比比资源色| 色老汉一区二区三区| 国产精品久久久久久久午夜片 | 麻豆中文一区二区| 777午夜精品免费视频| 亚洲成人一区二区| 欧美三级电影精品| 一区二区三区在线免费视频| 99天天综合性| 国产精品色呦呦| 福利视频网站一区二区三区| 精品久久一区二区三区| 久久精品国产秦先生| 欧美一区二区三区视频免费| 天堂在线亚洲视频| 欧美另类高清zo欧美| 亚洲成av人影院| 91精品综合久久久久久| 性做久久久久久久免费看| 在线欧美日韩国产| 午夜精品久久久久影视| 欧美在线短视频| 亚洲一区二区av电影| 3d成人h动漫网站入口| 奇米一区二区三区| 欧美一区二区在线视频| 麻豆视频观看网址久久| 欧美精品一区二区在线观看| 国产乱妇无码大片在线观看| 欧美xxxx老人做受|