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

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

?? clinkprediction.cpp

?? 這是cdma2000的一個分組調度算法實例
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	for (i=0;i<m_iPacketSizeNum;i++)
	{
		tempEPS2CI=&m_pstRatePredictionTable[i];
		iEPSize=tempEPS2CI->iEncoderPacketSize;
	
	//find in the second level of the table
		for (j=tempEPS2CI->iRATE2CILength-1;j>=0;j--)
		{
			tempRATE2CI=&(tempEPS2CI->pstAddrOfRate2CI)[j];
			fCIdB=tempRATE2CI->fTargetC2I;
			iPacketLength=tempRATE2CI->iSlotNumPerSubPacket;
			for(k=0;k<4;k++)
			{
				if(iPacketLength==pow(2,k))
				{
					for(l=0;l<5;l++)
					{
						if(iChannelType==l+1)
						{
							fC2INeededdB=SPDCCHEbNt[k][l]-ProcessGain[k];
							fPowerMargindB=SPDCCHPowerMargin[k][l];
							m_fDeterminedErrorRate=float(SPDCCHErrorRate[k][l]);
							break;
						}
				
					}
				break;
				}
		
			}

			fSPDCCHSlotC2I=pow(10,(fC2INeededdB+fPowerMargindB)/10);
			fPDCHSlotC2I=pow(10,fC2IdB/10)-fSPDCCHSlotC2I;
			if(fPDCHSlotC2I<=0.0) continue;
			fPDCHSlotC2IdB=10*log10(fPDCHSlotC2I);
			if (fPDCHSlotC2IdB>=fCIdB)
			{
				bIsDataRateDetermined=true;
				break;
			}
			fLastCIdB=fCIdB;
		}
		if(bIsDataRateDetermined&&lDataQueueSize>=iEPSize) break;
		else tempRATE2CI=NULL;
	}
	if(tempRATE2CI) 
	{
		m_iDeterminedPacketSize=iEPSize;
	}
	else
	{
		tempEPS2CI=&m_pstRatePredictionTable[3];
		tempRATE2CI=&(tempEPS2CI->pstAddrOfRate2CI)[0];
		m_iDeterminedPacketSize=384;
		fSPDCCHSlotC2I=pow(10,(SPDCCHEbNt[3][iChannelType-1]-ProcessGain[3]+SPDCCHPowerMargin[3][iChannelType-1])/10);
	}
	m_fDeterminedSPDCHC2I=float(fSPDCCHSlotC2I);


	return tempRATE2CI;
}



//////////////////////////////////////////////////////////////////////////
//
//	TITLE:	Getting BLER Function
//
//	PURPOSE:通過查BLER估計表,獲得相應的BLER數據,參數為分組長度,等效SNR的
//			均值和標準差,等效編碼速率
//
//	SAMPLE CALL:
//			CLinkPrediction* pLink;
//			float fBLER=pLink->GetBLER(1536, 10., 0.4, 0.033333);
//
//	INPUTS:	iPacketSize	 -- the length of the packet
//							should be given precisely and only these 4
//							values are legal:
//							3072, 1536, 768, 384
//			fMeanSNR	 -- the mean value of SNR
//			fStdSNR		 -- the standard deviation of SNR
//			fEncodingRate-- the encoder packet rate
//
//	OUTPUTS:
//			fBLER		--	the block error
//
//	CALLED BY FUNCTIONS:
//			CDataMs::PERPrediction()
//
//	CALLING FUNCTIONS:
//			CLinkPrediction::Interpolation()
//			CLinkPrediction::GetFourPoints()
//
//	AUTHOR:	Ouyang Hui
//
//	DATE:	01/04/04
//
//
//	MODIFICATIONS SINCE 01/04/04:
//			01/04/04	Add the interpolation algorithm
//
//			01/04/05	Modified the interpolation algorithm
//			Key points:
//			In the previous version, the function needs precise encoder
//			packet rate. If this condiction cannot be satisfied, the
//			would report an error and reject to return a value.
//			Of course, this is not reasonable, because actually the 
//			encoder packet rates are not subject to the eight points
//			in the list. So I modified the codes in this way:
//
//			1, When the input encoder packet rate cannot be found in the
//			list, the function finds the two nearest values that assure
//			the input value is between them. (Of course, if the input is
//			larger or smaller than all the values in the list, the two
//			values are both the largest or the smallest one in the list.)
//
//			2.Then we get the two SNR-to-BLER list according to the two
//			encoder packet rate values found in step 1. Then we get the
//			two BLER values in these two list independently using 2-D
//			interpolation method.
//
//			3.Get the final BLER value according to the two BLER values
//			found in step 2, using 1-D interpolation method.
//							
//		01/04/06	Ouyang Hui 
//			Modify the part getting the two nearest values described
//			in the first step of last section. This time the function
//			assures x1<=x<=x2 and y1<=y<=y2.
//
//		01/04/11 to 01/04/12	Ouyang Hui
//			Modify the part of interpolation. The function uses it with
//			four points. See the function CLinkPrediction::Interpolation().
//			Now the problem is HOW TO GET THESE FOUR POINTS. Since the 
//			algorithms are somewhat intricate. I move the job to a newly
//			added function CLinkPrediction::GetFourPoints(). Today, I test
//			this function and succeed. If you want to know more, please
//			see the comments of CLinkPrediction::GetFourPoints() and the
//			document on the test of this function. 
//
//////////////////////////////////////////////////////////////////////////
float CLinkPrediction::GetBLER(int iPacketSize, float fMeanSNR, 
							  float fStdSNR, float fEncodingRate)
{
	EPS2BLER1_TYPE* pEPS2BLER1;
	RATE2BLER1_TYPE* pRATE2BLER1[2];
//	SNR2BLER1_TYPE* pSNR2BLER1[2];
	int i;

	//find in the first level of the table
	for (i=0;i<m_iPacketSizeNum;i++)
	{
		pEPS2BLER1=&m_pstBLERPredictionTable[i];
		if (fabs(pEPS2BLER1->iEncoderPacketSize-iPacketSize)<1e-6) 
			break;
	}
	if (i==m_iPacketSizeNum)
	{
		cerr<<"Illegal encoder packet size of "<<iPacketSize<<endl
			<<"Can't find this kind of packet size in the table!"<<endl;
		return 1.0;
	}

	//find in the second level of the table
	//we can get two copies of the third level of the table
	for (i=0;i<pEPS2BLER1->iRATE2BLER1Length;i++)
	{
		pRATE2BLER1[1]=&(pEPS2BLER1->pstAddrOfRate2BLER)[i];
		if (fEncodingRate<pRATE2BLER1[1]->fEffectiveCodeRate)
			break;
		pRATE2BLER1[0]=pRATE2BLER1[1];
	}
	if (i==0)
		pRATE2BLER1[0]=pRATE2BLER1[1];
	
	float m0=pRATE2BLER1[0]->fEffectiveCodeRate;
	float m1=pRATE2BLER1[1]->fEffectiveCodeRate;
	float m =fEncodingRate;

	int j;

	float x1[2],x2[2],x3[2],x4[2],x[2];
	float y1[2],y2[2],y3[2],y4[2],y[2];
	float z1[2],z2[2],z3[3],z4[2],z[2];
	float zz;
	int iDoingTimes;

	if (pRATE2BLER1[0]==pRATE2BLER1[1])
		iDoingTimes=1;
	else
		iDoingTimes=2;

	//deal with the third level of the table
	for (j=0;j<iDoingTimes;j++)
	{
		x[j]=fMeanSNR;
		y[j]=fStdSNR;

		GetFourPoints(pRATE2BLER1[j],x[j],y[j],x1[j],y1[j],z1[j],
			x2[j],y2[j],z2[j],x3[j],y3[j],z3[j],x4[j],y4[j],z4[j]);

		z[j]=Interpolation(x1[j],x2[j],x3[j],x4[j],x[j],
			y1[j],y2[j],y3[j],y4[j],y[j],
			z1[j],z2[j],z3[j],z4[j]);
	}

	if (z[0]<1e-4)
		z[0]=-4;
	else
		z[0]=(float)log10(z[0]);

	if (iDoingTimes==1)
	{
		zz=z[0];
		
	}
	else
	{
		if (z[1]<1e-4)
			z[1]=-4;
		else
			z[1]=(float)log10(z[1]);
		if (m0==m1)
			zz=z[0];
		else
			zz=((m1-m)*z[0]+(m-m0)*z[1])/(m1-m0);
	}

	zz=(float)pow(10,zz);

	return zz;

}

///////////////////////////////////////////////////////////////////////////////
//
//	PURPOSE:Given a point (x,y), get the four adjacent points (x1,y1), (x2,y2)
//			(x3,y3), (x4,y4), and the values at these four points: z1, z2, z3,
//			and z4. Be sure that x1<=x<=x2, y1<=y<=y3, x1=x3, x2=x4, y1=y2,
//			and y3=y4. (Of course, when (x,y) is outside the boudary of the 
//			points in the list, the first two condiction cannot be satisfied.
//			Then the four points should be the closest ones to (x,y) at the
//			boundary). To employ this function correctly, the order and the 
//			values of the inputted list should be very strict. So the function
//			of initialization should include checking the table of EPS-to-
//			BLER.
//
//	INPUTS: A point of (x,y)
//
//	OUTPUTS:Four points of (x1,y1), (x2,y2), (x3,y3), (x4,y4) and the values
//			at these four points of z1, z2, z3, z4.
//
//	CALLED BY FUNCTIONS:
//			CLinkPrediction::GetBLER()
//
//	ALGORITHMS:
//			This function seems very simple to implement, but actually the
//			algorithms are very intricate. This is due to the following
//			two reasoms:
//			1. The order of the inputted list. Although the points are 2-D
//          points, the list is organized in one-dimension. For example, if
//			there are 9 points from (1,1) to (9,9), the organization in the 
//			list should be:
//				(1,1,xx)
//				(1,2,xx)
//				(1,3,xx)
//				(2,1,xx)
//				......
//				(9,9,xx).
//			And it needs special treatment while scanning from (1,3) to (2,1).
//			2. While the x- or y-coordinate or the inputted point (x,y) is
//			outside the range of all the points in the list, the expected
//			four points would shrink to one or two points. And it is very
//			difficult to determine the points.
//
//			The algorithms can be described as two steps:
//			1. Find (x1,y1,z1) and (x4,y4,z4). Mark their indexes in the list.
//			2. The points (x1,y1) and (x3,y3) are adjacent or the same, so are
//			(x2,y2) and (x4,y4). And when (x1,y1) is at the boundary, (x4,y4)
//			is at the same boudary. So when (x1,y1) and (x4,y4) determined in
//			step 1 are correct, it is easy to determine (x2,y2,z2) and
//			(x3,y3,z3).
//			So the key point is in step one. There are nine cases shuld be
//			considered, and eight of them are the cases while (x,y) is
//			outside the boudary. To know more, please read the reference
//			documents written by Ouyang Hui.
//
//	AUTHOR:	Ouyang Hui
//
//	DATE:	01/04/12
//
//	MODIFICATIONS SINCE 01/04/12:
//
///////////////////////////////////////////////////////////////////////////////
void CLinkPrediction::GetFourPoints(
				RATE2BLER1_TYPE* pRATE2BLER1,float x,float y,
				float& x1,float& y1,float& z1,
				float& x2,float& y2,float& z2,
				float& x3,float& y3,float& z3,
				float& x4,float& y4,float& z4)
{
	SNR2BLER1_TYPE* pSNR2BLER1;
	int i,iIndex1,iIndex2;
	float xx,yy;
	float xMax,yMax,xMin,yMin;

	xMax=(pRATE2BLER1->pstAddrOfSNR2BLER)
		[pRATE2BLER1->iSNR2BLER1Length-1].fMeanSNR;
	yMax=(pRATE2BLER1->pstAddrOfSNR2BLER)
		[pRATE2BLER1->iSNR2BLER1Length-1].fStdSNR;
	xMin=(pRATE2BLER1->pstAddrOfSNR2BLER)[0].fMeanSNR;
	yMin=(pRATE2BLER1->pstAddrOfSNR2BLER)[0].fStdSNR;

	for (i=0;i<pRATE2BLER1->iSNR2BLER1Length;i++)
	{
		pSNR2BLER1=&((pRATE2BLER1->pstAddrOfSNR2BLER)[i]);
		xx=pSNR2BLER1->fMeanSNR;
		yy=pSNR2BLER1->fStdSNR;
		iIndex2=i;

		if ((x<=xx)&&(y<=yy))
			break;	//satisfy the condiction
					//(x,y) is in the region #9
				
		if ((x<=xx)&&(y>=yMax)&&(fabs(yy-yMax)<m_fTollerance))
			break;	//(x,y) is in the region #6 or #7

		if ((x>=xMax)&&(fabs(xx-xMax)<m_fTollerance)&&(y<=yy))
			break;	//(x,y) is in the region #3 or #4

	//if all (xx,yy) cannot satisfy any of the above condictions,
	//then (x,y) is in the region #5.
	}
	x2=x4=xx;
	y3=y4=yy;
	z4=pSNR2BLER1->fBLER;
	

	for (i=pRATE2BLER1->iSNR2BLER1Length-1;i>=0;i--)
	{
		pSNR2BLER1=&((pRATE2BLER1->pstAddrOfSNR2BLER)[i]);
		xx=pSNR2BLER1->fMeanSNR;
		yy=pSNR2BLER1->fStdSNR;
		iIndex1=i;

		if ((x>=xx)&&(y>=yy))
			break;	//satisfy the condiction
					//(x,y) is in the region #9
		
		if ((x>=xx)&&(y<=yMin)&&(fabs(yy-yMin)<m_fTollerance))
			break;	//(x,y) is in the region #2 or #3

		if ((x<=xMin)&&(fabs(xx-xMin)<m_fTollerance)&&(y>=yy))
			break;	//(x,y) is in the region #7 or #8
		
	//if all (xx,yy) cannot satisfy any of the above condictions,
	//then (x,y) is in the region #1
	}
	x1=x3=xx;
	y1=y2=yy;
	z1=pSNR2BLER1->fBLER;

	if (fabs(x1-x2)<m_fTollerance)
	{
		z2=z1;
		z3=z4;
	}
	else
	{
		if (fabs(y1-y3)<m_fTollerance)
		{
			z2=z4;
			z3=z1;
		}
		else
		{
			z3=(pRATE2BLER1->pstAddrOfSNR2BLER)[iIndex2-1].fBLER;
			z2=(pRATE2BLER1->pstAddrOfSNR2BLER)[iIndex1+1].fBLER;
		}
	}
}

////////////////////////////////////////////////////////////////////////////

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线视频网址| 中文字幕一区二区三区不卡| 欧美草草影院在线视频| 国产婷婷精品av在线| 日韩激情视频网站| 一本色道a无线码一区v| 国产清纯在线一区二区www| 亚洲国产一区二区在线播放| 成人午夜激情在线| 日韩一级精品视频在线观看| 亚洲精品视频免费看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美在线视频你懂得| 中文字幕欧美日本乱码一线二线| 日韩精品一级二级| 欧洲亚洲精品在线| 亚洲私人影院在线观看| 国产精品 日产精品 欧美精品| 欧美精品1区2区3区| 一区二区三区在线视频免费| 成人av网在线| 国产精品久久二区二区| 国产成人在线电影| 国产欧美精品一区二区三区四区| 麻豆国产欧美一区二区三区| 欧美男生操女生| 亚洲成人激情综合网| 欧美中文字幕亚洲一区二区va在线 | 久久久久久麻豆| 久久99国产精品尤物| 日韩欧美视频在线| 久久66热re国产| 欧美zozozo| 极品少妇xxxx精品少妇| 欧美精品一区二| 高清视频一区二区| 中文字幕av资源一区| 国产不卡在线播放| 国产精品久久久久影院亚瑟 | 欧美在线免费观看亚洲| 亚洲三级在线免费| 欧美午夜电影一区| 日韩中文字幕亚洲一区二区va在线| 欧美日韩精品专区| 日本vs亚洲vs韩国一区三区二区 | 欧美日韩一区二区三区视频| 亚洲高清不卡在线观看| 欧美精品 国产精品| 麻豆91精品视频| 国产亚洲成av人在线观看导航| 国产精品资源在线看| 欧美经典一区二区三区| www.欧美色图| 午夜视频一区二区| 精品国产在天天线2019| 大白屁股一区二区视频| 一区二区三区国产| 欧美一级欧美三级在线观看| 国产成人亚洲综合a∨婷婷| 国产精品第四页| 欧美精品久久天天躁| 国产综合一区二区| 亚洲美女在线一区| 欧美一区二区久久久| 国产69精品久久久久777| 亚洲一区在线观看免费观看电影高清 | 麻豆一区二区在线| 国产精品久久久久久久浪潮网站| 欧美在线一区二区三区| 国产一区二区三区黄视频| 亚洲天堂精品视频| 日韩三级av在线播放| 成人性生交大片免费看在线播放| 亚洲精品乱码久久久久久黑人 | 毛片一区二区三区| 亚洲人成网站在线| 欧美大胆人体bbbb| 91蝌蚪porny| 九色porny丨国产精品| 一区二区三区视频在线看| 久久久久久久久蜜桃| 日本精品一区二区三区四区的功能| 老司机午夜精品| 亚洲福利视频一区| 国产精品电影院| 精品粉嫩aⅴ一区二区三区四区| 色哟哟精品一区| 国产99久久久久| 青青青伊人色综合久久| 亚洲欧美另类久久久精品 | 亚洲柠檬福利资源导航| 久久综合九色综合97婷婷女人| 在线精品亚洲一区二区不卡| 成人午夜激情视频| 国产精品一区二区x88av| 日本欧美一区二区三区乱码| 夜夜嗨av一区二区三区四季av | 亚洲成人福利片| 亚洲色图欧洲色图婷婷| 国产精品网站在线| 国产三级三级三级精品8ⅰ区| 制服丝袜中文字幕一区| 欧美网站大全在线观看| 91在线观看下载| 成人禁用看黄a在线| 精品一区免费av| 久久精品国产77777蜜臀| 日韩精品成人一区二区三区| 午夜精品久久久久| 亚洲国产精品欧美一二99| 亚洲综合无码一区二区| 一个色综合av| 亚洲午夜电影在线| 亚洲国产成人va在线观看天堂 | 亚洲欧洲综合另类| 国产精品国产自产拍高清av王其| 精品国产一区二区国模嫣然| 国产精品久久久久桃色tv| 国产婷婷色一区二区三区在线| 久久综合九色综合久久久精品综合 | 国产aⅴ综合色| 韩国三级在线一区| 国产九色sp调教91| 国产白丝网站精品污在线入口| 国产毛片一区二区| 成人av资源站| 日本高清视频一区二区| 欧洲亚洲精品在线| 日韩一卡二卡三卡国产欧美| 精品国产乱码久久久久久浪潮| 久久嫩草精品久久久精品一| 国产欧美1区2区3区| 亚洲欧美日韩国产一区二区三区| 亚洲国产aⅴ成人精品无吗| 日韩av成人高清| 国产精品资源站在线| 91看片淫黄大片一级| 欧美一区二区三区四区高清| 国产亚洲福利社区一区| 亚洲免费大片在线观看| 蜜芽一区二区三区| 国产成人精品亚洲777人妖| 97精品电影院| 日韩一区二区三区av| 久久久久国产精品麻豆| 一区二区高清视频在线观看| 人人超碰91尤物精品国产| 成人一区二区三区视频| 欧美日韩www| 日本一区二区三区久久久久久久久不| 尤物av一区二区| 麻豆一区二区在线| 91蜜桃视频在线| 欧美一二区视频| 亚洲人成在线播放网站岛国| 日产国产高清一区二区三区| 成人一级片网址| 91精品福利在线一区二区三区| 久久蜜臀精品av| 三级一区在线视频先锋 | 国内精品国产成人| 色婷婷精品大在线视频| 久久综合九色欧美综合狠狠| 亚洲午夜精品网| 国产成人高清视频| 欧美精品第1页| 亚洲欧美激情插| 韩国一区二区三区| 欧美精品久久一区| 亚洲六月丁香色婷婷综合久久| 精品一区二区三区不卡| 91免费精品国自产拍在线不卡| 精品国产乱码久久久久久老虎| 亚洲一区视频在线| av电影在线观看不卡| 久久综合丝袜日本网| 青草国产精品久久久久久| 欧洲精品在线观看| 国产精品国产a级| 国产精品99久久久| 国产午夜精品一区二区三区四区| 奇米影视一区二区三区小说| 欧美吞精做爰啪啪高潮| 最新日韩在线视频| 国产福利一区二区| 国产亚洲福利社区一区| 激情综合色综合久久| 日韩一二三区不卡| 丝袜美腿成人在线| 欧美片在线播放| 天堂精品中文字幕在线| 欧美日韩高清一区二区三区| 亚洲综合偷拍欧美一区色| 91久久精品一区二区三| 一二三四区精品视频| 欧美视频日韩视频| 午夜精品福利一区二区三区蜜桃| 欧美写真视频网站| 亚洲综合另类小说| 欧美日韩一区二区三区不卡|