⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rs.h

📁 应用于无线通信的RS编码和OFDM调制源程序。64点FFT
💻 H
字号:
#define RSInforBit 6                        /* RS code over GF(2^RSInforBit) */
#define RSInforSym 43                       /* Number of information symbols */
#define RSTotalSym ((1 << RSInforBit) - 1)  /* Number of total symbols in RS */

typedef unsigned short DType;

#if (RSInforBit <= 8)
typedef short WordType;
#else
typedef int WordType;
#endif

/* Initialization function */
void Init_RS(void);

/* These two functions must be called in this order (by Init_RS())
 * before any encoding/decoding
 */
void Generate_GF(void);	                    /* Generate Galois Field         */
void Generate_Poly(void);	                /* Generate generator polynomial */

/* Reed-Solomon encoding:
 * SourceData[] is the input block, parity symbols are placed in PariData[];
 * PariData[] may lie past the end of the data, e.g., for (255,223):
 * Enncode_RS(&SourceData[0],&SourceData[223]);
 */
void Encode_RS(DType SourceData[], DType PariData[]);

/* Reed-Solomon error decoding:
 * The received block goes into ComData[];
 * The decoder corrects the symbols in place, if possible and returns
 * the number of corrected symbols. If the codeword is illegal or
 * uncorrectible, the data array is unchanged and -1 is returned;
 */
WordType Decode_RS(DType ComData[]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -