rs.h
来自「基于TMS320F2812的AMR+RS编解码+OFDM调制解调源程序。是sta」· C头文件 代码 · 共 38 行
H
38 行
#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[]);
int min(int a, int b);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?