资源简介
亲测可用的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
相关资源
- The direction of synaptic plasticity mediated
- Apolipoprotein E4 Impairs in vivo Hippocampal
- Histamine excites rat lateral vestibular nucle
- C 大整数RSA加密
- 一种红外遥控编解码仿真
- DXperienceUniversal 10.1.6(2010年8月13日版
- RSA算法源码
- GPRS(MC35型号)的发送短信程序
- UART转CAN或LIN的工具(Uart2any)和文档
- 曼彻斯特编解码_同步QuartusII工程
- RSA AES DES ECC加密算法源码
- vc URL编解码类
- 关于角点检测算法HarrisForstner经典算子
- 51多机通信(内附Proteus及.hex文件)
- CJLibrary Version 6.09
- RSES 2.2——粗糙集处理软件
- Furan-BDOPV Donor-Acceptor Polymers with Plana
-
解决安装vs2012后vs2010 li
nk : fatal er - Behaviors of fatigue crack propagation in fric
- New fixed point theorems of e-concave-convex m
- 矿用多功能网关通信接口设计
- 矿井信号收发器通信模块设计
- 易语言RSA加解密源码
- Effects of the cultured Cordyceps exopolysacch
- Synthesis Characterization and in vitro Antitu
- Anti-biofilm Activity of Resveratrol and Ursol
- 在未来的电子对撞机上使用胶子Sive
- Fanuc机器人PNS程序和RSR程序启动改.d
- USB转串口(RS232/RS485/RS422)驱动程序文
- PRS+ 2.0.17 中文版 for SONY PRS 300
评论
共有 条评论