~ubuntu-branches/ubuntu/trusty/gnuradio/trusty-updates

« back to all changes in this revision

Viewing changes to gnuradio-core/src/lib/reed-solomon/char.h

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2012-02-26 21:26:16 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120226212616-vsfkbi1158xshdql
Tags: 3.5.1-1
* new upstream version, re-packaged from scratch with modern tools
    closes: #642716, #645332, #394849, #616832, #590048, #642580,
    #647018, #557050, #559640, #631863
* CMake build

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
#define DTYPE unsigned char
8
8
 
 
9
#include <gr_core_api.h>
 
10
 
9
11
/* Reed-Solomon codec control block */
10
12
struct rs {
11
13
  unsigned int mm;              /* Bits per symbol */
19
21
  unsigned char iprim;      /* prim-th root of 1, index form */
20
22
};
21
23
 
22
 
static inline int modnn(struct rs *rs,int x){
 
24
static inline unsigned int modnn(struct rs *rs, unsigned int x){
23
25
  while (x >= rs->nn) {
24
26
    x -= rs->nn;
25
27
    x = (x >> rs->mm) + (x & rs->nn);
44
46
#define INIT_RS init_rs_char
45
47
#define FREE_RS free_rs_char
46
48
 
47
 
void ENCODE_RS(void *p,DTYPE *data,DTYPE *parity);
48
 
int DECODE_RS(void *p,DTYPE *data,int *eras_pos,int no_eras);
49
 
void *INIT_RS(unsigned int symsize,unsigned int gfpoly,unsigned int fcr,
 
49
GR_CORE_API void ENCODE_RS(void *p,DTYPE *data,DTYPE *parity);
 
50
GR_CORE_API int DECODE_RS(void *p,DTYPE *data,int *eras_pos,int no_eras);
 
51
GR_CORE_API void *INIT_RS(unsigned int symsize,unsigned int gfpoly,unsigned int fcr,
50
52
                   unsigned int prim,unsigned int nroots);
51
 
void FREE_RS(void *p);
52
 
 
 
53
GR_CORE_API void FREE_RS(void *p);
53
54
 
54
55
 
55
56