mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 05:24:13 -04:00
HANXIN: 0xFFE terminator; reedsol/AZTEC: stack-based; AZTEC/HANXIN/QR/GRIDMATRIX speedups; #209
This commit is contained in:
parent
ab379a233d
commit
cd214addba
70 changed files with 5703 additions and 2907 deletions
|
@ -38,14 +38,33 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
INTERNAL void rs_init_gf(const int poly);
|
||||
INTERNAL void rs_init_code(const int nsym,int index);
|
||||
INTERNAL void rs_encode(const size_t len,const unsigned char *data, unsigned char *res);
|
||||
INTERNAL void rs_encode_long(const int len,const unsigned int *data, unsigned int *res);
|
||||
INTERNAL void rs_free(void);
|
||||
typedef struct {
|
||||
const unsigned char *logt; /* These are static */
|
||||
const unsigned char *alog;
|
||||
unsigned char rspoly[256];
|
||||
int nsym;
|
||||
} rs_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int *logt; /* These are malloced */
|
||||
unsigned int *alog;
|
||||
unsigned short rspoly[4096]; /* 12-bit max - needs to be enlarged if > 12-bit used */
|
||||
int nsym;
|
||||
} rs_uint_t;
|
||||
|
||||
INTERNAL void rs_init_gf(rs_t *rs, const unsigned int prime_poly);
|
||||
INTERNAL void rs_init_code(rs_t *rs, const int nsym, int index);
|
||||
INTERNAL void rs_encode(const rs_t *rs, const int datalen, const unsigned char *data, unsigned char *res);
|
||||
INTERNAL void rs_encode_uint(const rs_t *rs, const int datalen, const unsigned int *data, unsigned int *res);
|
||||
/* No free needed as log tables static */
|
||||
|
||||
INTERNAL void rs_uint_init_gf(rs_uint_t *rs_uint, const unsigned int prime_poly, const int logmod);
|
||||
INTERNAL void rs_uint_init_code(rs_uint_t *rs_uint, const int nsym, int index);
|
||||
INTERNAL void rs_uint_encode(const rs_uint_t *rs_uint, const int datalen, const unsigned int *data, unsigned int *res);
|
||||
INTERNAL void rs_uint_free(rs_uint_t *rs_uint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __REEDSOL_H */
|
||||
#endif /* __REEDSOL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue