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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? bch3.c

?? 通信類(lèi)程序
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
 * by the generator polynomial g(x). */{	register int    i, j;	register int    feedback;	for (i = 0; i < length - k; i++)		bb[i] = 0;	for (i = k - 1; i >= 0; i--) {		feedback = data[i] ^ bb[length - k - 1];		if (feedback != 0) {			for (j = length - k - 1; j > 0; j--)				if (g[j] != 0)					bb[j] = bb[j - 1] ^ feedback;				else					bb[j] = bb[j - 1];			bb[0] = g[0] && feedback;		} else {			for (j = length - k - 1; j > 0; j--)				bb[j] = bb[j - 1];			bb[0] = 0;		}	}}void decode_bch()/* * Simon Rockliff's implementation of Berlekamp's algorithm. * * Assume we have received bits in recd[i], i=0..(n-1). * * Compute the 2*t syndromes by substituting alpha^i into rec(X) and * evaluating, storing the syndromes in s[i], i=1..2t (leave s[0] zero) . * Then we use the Berlekamp algorithm to find the error location polynomial * elp[i]. * * If the degree of the elp is >t, then we cannot correct all the errors, and * we have detected an uncorrectable error pattern. We output the information * bits uncorrected. * * If the degree of elp is <=t, we substitute alpha^i , i=1..n into the elp * to get the roots, hence the inverse roots, the error location numbers. * This step is usually called "Chien's search". * * If the number of errors located is not equal the degree of the elp, then * the decoder assumes that there are more than t errors and cannot correct * them, only detect them. We output the information bits uncorrected. */{	register int    i, j, u, q, t2, count = 0, syn_error = 0;	int             elp[1026][1024], d[1026], l[1026], u_lu[1026], s[1025];	int             root[200], loc[200], err[1024], reg[201];	t2 = 2 * t;	/* first form the syndromes */	printf("S(x) = ");	for (i = 1; i <= t2; i++) {		s[i] = 0;		for (j = 0; j < length; j++)			if (recd[j] != 0)				s[i] ^= alpha_to[(i * j) % n];		if (s[i] != 0)			syn_error = 1; /* set error flag if non-zero syndrome *//* * Note:    If the code is used only for ERROR DETECTION, then *          exit program here indicating the presence of errors. */		/* convert syndrome from polynomial form to index form  */		s[i] = index_of[s[i]];		printf("%3d ", s[i]);	}	printf("\n");	if (syn_error) {	/* if there are errors, try to correct them */		/*		 * Compute the error location polynomial via the Berlekamp		 * iterative algorithm. Following the terminology of Lin and		 * Costello's book :   d[u] is the 'mu'th discrepancy, where		 * u='mu'+1 and 'mu' (the Greek letter!) is the step number		 * ranging from -1 to 2*t (see L&C),  l[u] is the degree of		 * the elp at that step, and u_l[u] is the difference between		 * the step number and the degree of the elp. 		 */		/* initialise table entries */		d[0] = 0;			/* index form */		d[1] = s[1];		/* index form */		elp[0][0] = 0;		/* index form */		elp[1][0] = 1;		/* polynomial form */		for (i = 1; i < t2; i++) {			elp[0][i] = -1;	/* index form */			elp[1][i] = 0;	/* polynomial form */		}		l[0] = 0;		l[1] = 0;		u_lu[0] = -1;		u_lu[1] = 0;		u = 0; 		do {			u++;			if (d[u] == -1) {				l[u + 1] = l[u];				for (i = 0; i <= l[u]; i++) {					elp[u + 1][i] = elp[u][i];					elp[u][i] = index_of[elp[u][i]];				}			} else				/*				 * search for words with greatest u_lu[q] for				 * which d[q]!=0 				 */			{				q = u - 1;				while ((d[q] == -1) && (q > 0))					q--;				/* have found first non-zero d[q]  */				if (q > 0) {				  j = q;				  do {				    j--;				    if ((d[j] != -1) && (u_lu[q] < u_lu[j]))				      q = j;				  } while (j > 0);				} 				/*				 * have now found q such that d[u]!=0 and				 * u_lu[q] is maximum 				 */				/* store degree of new elp polynomial */				if (l[u] > l[q] + u - q)					l[u + 1] = l[u];				else					l[u + 1] = l[q] + u - q; 				/* form new elp(x) */				for (i = 0; i < t2; i++)					elp[u + 1][i] = 0;				for (i = 0; i <= l[q]; i++)					if (elp[q][i] != -1)						elp[u + 1][i + u - q] =                                    alpha_to[(d[u] + n - d[q] + elp[q][i]) % n];				for (i = 0; i <= l[u]; i++) {					elp[u + 1][i] ^= elp[u][i];					elp[u][i] = index_of[elp[u][i]];				}			}			u_lu[u + 1] = u - l[u + 1]; 			/* form (u+1)th discrepancy */			if (u < t2) {				/* no discrepancy computed on last iteration */			  if (s[u + 1] != -1)			    d[u + 1] = alpha_to[s[u + 1]];			  else			    d[u + 1] = 0;			    for (i = 1; i <= l[u + 1]; i++)			      if ((s[u + 1 - i] != -1) && (elp[u + 1][i] != 0))			        d[u + 1] ^= alpha_to[(s[u + 1 - i] 			                      + index_of[elp[u + 1][i]]) % n];			  /* put d[u+1] into index form */			  d[u + 1] = index_of[d[u + 1]];				}		} while ((u < t2) && (l[u + 1] <= t)); 		u++;		if (l[u] <= t) {/* Can correct errors */			/* put elp into index form */			for (i = 0; i <= l[u]; i++)				elp[u][i] = index_of[elp[u][i]];			printf("sigma(x) = ");			for (i = 0; i <= l[u]; i++)				printf("%3d ", elp[u][i]);			printf("\n");			printf("Roots: ");			/* Chien search: find roots of the error location polynomial */			for (i = 1; i <= l[u]; i++)				reg[i] = elp[u][i];			count = 0;			for (i = 1; i <= n; i++) {				q = 1;				for (j = 1; j <= l[u]; j++)					if (reg[j] != -1) {						reg[j] = (reg[j] + j) % n;						q ^= alpha_to[reg[j]];					}				if (!q) {	/* store root and error						 * location number indices */					root[count] = i;					loc[count] = n - i;					count++;					printf("%3d ", n - i);				}			}			printf("\n");			if (count == l[u])				/* no. roots = degree of elp hence <= t errors */				for (i = 0; i < l[u]; i++)					recd[loc[i]] ^= 1;			else	/* elp has degree >t hence cannot solve */				printf("Incomplete decoding: errors detected\n");		}	}}main(){	int             i;	read_p();               /* Read m */	generate_gf();          /* Construct the Galois Field GF(2**m) */	gen_poly();             /* Compute the generator polynomial of BCH code */	/* Randomly generate DATA */	seed = 131073;	srandom(seed);	for (i = 0; i < k; i++)		data[i] = ( random() & 65536 ) >> 16;	encode_bch();           /* encode data */	/*	 * recd[] are the coefficients of c(x) = x**(length-k)*data(x) + b(x)	 */	for (i = 0; i < length - k; i++)		recd[i] = bb[i];	for (i = 0; i < k; i++)		recd[i + length - k] = data[i];	printf("Code polynomial:\nc(x) = ");	for (i = 0; i < length; i++) {		printf("%1d", recd[i]);		if (i && ((i % 50) == 0))			printf("\n");	}	printf("\n");	printf("Enter the number of errors:\n");	scanf("%d", &numerr);	/* CHANNEL errors */    printf("Enter error locations (integers between");    printf(" 0 and %d): ", length-1);	/*	 * recd[] are the coefficients of r(x) = c(x) + e(x)	 */	for (i = 0; i < numerr; i++)		scanf("%d", &errpos[i]);	if (numerr)		for (i = 0; i < numerr; i++)			recd[errpos[i]] ^= 1;	printf("r(x) = ");	for (i = 0; i < length; i++) {		printf("%1d", recd[i]);		if (i && ((i % 50) == 0))			printf("\n");	}	printf("\n");	decode_bch();             /* DECODE received codeword recv[] */	/*	 * print out original and decoded data	 */	printf("Results:\n");	printf("original data  = ");	for (i = 0; i < k; i++) {		printf("%1d", data[i]);		if (i && ((i % 50) == 0))			printf("\n");	}	printf("\nrecovered data = ");	for (i = length - k; i < length; i++) {		printf("%1d", recd[i]);		if ((i-length+k) && (((i-length+k) % 50) == 0))			printf("\n");	}	printf("\n");	/*	 * DECODING ERRORS? we compare only the data portion	 */	for (i = length - k; i < length; i++)		if (data[i - length + k] != recd[i])			decerror++;	if (decerror)	   printf("There were %d decoding errors in message positions\n", decerror);	else	   printf("Succesful decoding\n");}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品夜夜夜夜久久| 不卡av免费在线观看| 韩国v欧美v日本v亚洲v| 国产精品 欧美精品| 91麻豆国产香蕉久久精品| 欧美体内she精高潮| 日韩色视频在线观看| 国产亚洲1区2区3区| 亚洲精品中文字幕在线观看| 99视频在线精品| 欧美无砖砖区免费| 欧美精品一区二区精品网| 1000精品久久久久久久久| 亚洲国产精品久久艾草纯爱| 精品一区二区免费视频| jlzzjlzz亚洲女人18| 欧美高清视频www夜色资源网| 欧美tickling网站挠脚心| 中文字幕亚洲电影| 免费人成黄页网站在线一区二区| 成人免费av在线| 在线播放国产精品二区一二区四区 | 91浏览器入口在线观看| 91精品综合久久久久久| 国产精品理论片在线观看| 五月婷婷另类国产| 成人免费av网站| 日韩视频免费直播| 亚洲综合久久av| 国产福利视频一区二区三区| 欧美日韩国产高清一区| 欧美国产一区二区在线观看| 日韩国产高清在线| 91天堂素人约啪| 精品国产一区二区三区四区四 | 欧美日韩日日摸| 国产精品色噜噜| 麻豆91精品视频| 91国产成人在线| 国产日韩欧美精品电影三级在线 | 91精品国产91热久久久做人人| 国产精品色在线观看| 蜜桃一区二区三区在线| 在线免费观看成人短视频| 国产日韩影视精品| 另类小说图片综合网| 欧美在线一区二区| 亚洲欧美国产三级| 成人在线视频一区二区| 亚洲精品一区二区三区蜜桃下载| 亚洲成a人片在线不卡一二三区| 成人性色生活片免费看爆迷你毛片| 欧美一级久久久| 亚洲自拍欧美精品| 91蜜桃传媒精品久久久一区二区| 精品国产亚洲在线| 毛片一区二区三区| 欧美日韩国产区一| 亚洲成a人v欧美综合天堂下载| 91麻豆免费在线观看| 亚洲国产高清在线观看视频| 国产在线乱码一区二区三区| 777亚洲妇女| 性做久久久久久久久| 91福利视频在线| 亚洲精品成人在线| 色综合久久99| 亚洲精品视频一区| 93久久精品日日躁夜夜躁欧美| 欧美国产精品久久| 成人av动漫在线| 国产精品第五页| 99精品热视频| 亚洲欧洲av在线| 99久久婷婷国产综合精品| 中文字幕二三区不卡| 成人一区二区视频| 国产精品久久久久久亚洲毛片 | 亚洲日本电影在线| 一本久道久久综合中文字幕| 亚洲欧美区自拍先锋| av中文字幕在线不卡| 亚洲美女视频在线| 欧美性videosxxxxx| 日日夜夜精品视频免费| 91精品国产一区二区| 精品制服美女丁香| 国产日韩欧美激情| 99在线精品观看| 亚洲高清三级视频| 欧美一区二区网站| 韩国三级在线一区| 国产精品国产三级国产aⅴ中文| 不卡的av在线播放| 亚洲最新在线观看| 欧美一级理论片| 国产激情91久久精品导航| 国产精品久久久久永久免费观看| xfplay精品久久| 成人中文字幕合集| 亚洲精品视频自拍| 日韩精品一区二区三区视频| 国产一区二区调教| 1000部国产精品成人观看| 欧美无人高清视频在线观看| 麻豆精品精品国产自在97香蕉| 久久新电视剧免费观看| 成人av在线播放网址| 一区二区三区欧美亚洲| 69成人精品免费视频| 国产一区二区毛片| 亚洲欧美在线另类| 7777女厕盗摄久久久| 国产毛片精品视频| 一级日本不卡的影视| 欧美一卡二卡三卡| av亚洲精华国产精华| 婷婷国产在线综合| 国产欧美一区二区精品忘忧草| 91毛片在线观看| 免费成人小视频| 中文字幕一区在线| 制服丝袜在线91| 懂色一区二区三区免费观看| 无吗不卡中文字幕| 国产欧美日韩视频在线观看| 欧美军同video69gay| 国产成人一区二区精品非洲| 亚洲午夜三级在线| 2023国产一二三区日本精品2022| 91蜜桃免费观看视频| 国产综合久久久久影院| 亚洲欧美日韩中文播放| 精品国产成人系列| 欧美色爱综合网| 成人少妇影院yyyy| 免费久久精品视频| 一区二区三区四区亚洲| 久久久久国产一区二区三区四区| 欧美性猛交xxxx乱大交退制版 | 国产精品久久久久久妇女6080 | 国产在线一区二区综合免费视频| 亚洲欧美电影院| 久久综合色天天久久综合图片| 日本高清无吗v一区| 国产91精品一区二区| 蜜桃一区二区三区在线观看| 一区二区在线观看视频| 国产日本亚洲高清| 欧美成人a在线| 777色狠狠一区二区三区| 91视频.com| 国产不卡高清在线观看视频| 制服丝袜亚洲色图| 91国模大尺度私拍在线视频| 成人免费高清视频在线观看| 麻豆精品视频在线观看| 午夜婷婷国产麻豆精品| 亚洲视频香蕉人妖| 欧美国产日产图区| 精品不卡在线视频| 欧美一区2区视频在线观看| 欧美日韩综合不卡| 91免费观看国产| 97se亚洲国产综合自在线不卡| 国产精品综合在线视频| 蜜桃视频在线观看一区二区| 午夜精品福利一区二区蜜股av| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲欧美视频在线观看视频| 欧美高清在线一区二区| 久久久久亚洲蜜桃| 精品久久久久久久久久久院品网 | 国内精品在线播放| 久久99国产精品久久99| 免费观看一级欧美片| 亚洲第一搞黄网站| 一区二区三区四区在线播放 | 欧美人狂配大交3d怪物一区| 在线中文字幕一区| 色呦呦网站一区| 99re这里只有精品视频首页| 91丨porny丨最新| 91丨porny丨蝌蚪视频| www.日韩在线| 91丨九色丨尤物| 欧洲精品在线观看| 99久久国产综合精品女不卡| 国产精品综合一区二区三区| 久久99精品国产| 久久国产精品无码网站| 精品一区二区免费视频| 裸体在线国模精品偷拍| 免费在线看一区| 狠狠色综合日日| 精品国产露脸精彩对白| 日韩欧美aaaaaa| 中文字幕欧美日韩一区| 国产精品视频yy9299一区| 亚洲国产成人在线|