资源简介
亲测可用的RS编解码技术,纯C的源码,可移植到任意平台,linux和windows均可用。
代码片段和文件信息
/***********************************************************************
* Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009
*
* This software library is licensed under terms of the GNU GENERAL
* PUBLIC LICENSE
*
*
* RSCODE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License or
* (at your option) any later version.
*
* RSCODE is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Rscode. If not see .
*
* Commercial licensing is available under a separate license please
* contact author for details.
*
* Source code is available at http://rscode.sourceforge.net
* Berlekamp-Peterson and Berlekamp-Massey Algorithms for error-location
*
* From Cain Clark “Error-Correction Coding For Digital Communications“ pp. 205.
*
* This finds the coefficients of the error locator polynomial.
*
* The roots are then found by looking for the values of a^n
* where evaluating the polynomial yields zero.
*
* Error correction is done using the error-evaluator equation on pp 207.
*
*/
#include
#include “ecc.h“
/* The Error Locator Polynomial also known as Lambda or Sigma. Lambda[0] == 1 */
static int Lambda[MAXDEG];
/* The Error Evaluator Polynomial */
static int Omega[MAXDEG];
/* local ANSI declarations */
static int compute_discrepancy(int lambda[] int S[] int L int n);
static void init_gamma(int gamma[]);
static void compute_modified_omega (void);
static void mul_z_poly (int src[]);
/* error locations found using Chien‘s search*/
static int ErrorLocs[256];
static int NErrors;
/* erasure flags */
static int ErasureLocs[256];
static int NErasures;
/* From Cain Clark “Error-Correction Coding For Digital Communications“ pp. 216. */
void
Modified_Berlekamp_Massey (void)
{
int n L L2 k d i;
int psi[MAXDEG] psi2[MAXDEG] D[MAXDEG];
int gamma[MAXDEG];
/* initialize Gamma the erasure locator polynomial */
init_gamma(gamma);
/* initialize to z */
copy_poly(D gamma);
mul_z_poly(D);
copy_poly(psi gamma);
k = -1; L = NErasures;
for (n = NErasures; n < NPAR; n++) {
d = compute_discrepancy(psi synBytes L n);
if (d != 0) {
/* psi2 = psi - d*D */
for (i = 0; i < MAXDEG; i++) psi2[i] = psi[i] ^ gmult(d D[i]);
if (L < (n-k)) {
L2 = n-k;
k = n-L;
/* D = scale_poly(ginv(d) psi); */
for (i = 0; i < MAXDEG; i++) D[i] = gmult(psi[i] ginv(d));
L = L2;
}
/* psi = psi2 */
for (i = 0; i < MAXDEG; i++) psi[i] = psi2[i];
}
mul_z_poly(D);
}
for(i = 0; i < MAXDEG; i++) Lambda[i] = psi[i]
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-22 12:58 rscode-1.3\
文件 337 2009-05-14 07:40 rscode-1.3\LICENSE
文件 951 2009-05-14 07:40 rscode-1.3\Makefile
文件 687 2009-05-14 07:40 rscode-1.3\README
文件 7627 2009-05-14 07:40 rscode-1.3\berlekamp.c
文件 563 2009-05-14 07:40 rscode-1.3\config.doc
文件 1801 2009-05-14 07:40 rscode-1.3\crcgen.c
文件 2922 2009-05-14 07:40 rscode-1.3\ecc.h
文件 3512 2018-03-20 09:27 rscode-1.3\example.c
文件 2474 2009-05-14 07:40 rscode-1.3\galois.c
文件 35147 2009-05-14 07:40 rscode-1.3\gpl.txt
文件 4295 2009-05-14 07:40 rscode-1.3\rs.c
文件 3651 2009-05-14 07:40 rscode-1.3\rs.doc
相关资源
- inthehand.net.personal.dll
- ncurses_programs.tar.gz
- 高级网页配色器ColorSchemeDesigner3(绝对
- RSLinx完美替换授权文件
- 软件需求规格说明书 IEEE 830 1998 模板
- 基于GPRS的车辆监控系统车载移动终端
- IBM RSA软件破解
- H7200GPRSDTU演示数据中心DEMO
- webgis地图开发
- R for Beginners(中文版).pdf
- 1001 Battle Over Cities - Hard Version.c
- 51 单片机串口通信程序,RS232串口通信
- Turbo码的编解码,可以达到论文中仿真
- 中国CRS自动出票.pdf
- NCURSES 手册
- CNC USB Controllers keygen
- ER/Studio Version 8.0.2(Build 5991)破解文
- RS485通讯超声波流量计.pdf
- ros中LaserScan 消息转化成PointCloud2d 的
- date-pickers.zip
- 破解RS5000保护文件sk.docx
- Authorship+form_imprints various.pdf
- 顺序延时关断三盏灯,VHDL程序
- 百度网盘链接coursera 吴恩达深度机器
- 远程抄表系统中嵌入式GPRS无线通信模
- RS485芯片ESD ±20kV 速率高达10MBPS 性价
- 数学推理:写作和证明,版本2.1Math
- 基于RFID的数据采集网络的设计与实现
- RS触发器与SR触发器区别有哪些
- delphi RSA加密
评论
共有 条评论