diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2025-01-10 15:58:57 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2025-01-10 16:02:45 +0100 |
commit | 9319d14566e5d1bfec617c479b8543a9ee3ad4ea (patch) | |
tree | b0130ae9e5ac2932c88ff99b83c83d23126d91bc /lpg/libqr/constants.h | |
parent | 147b8805247ca23fb96e51694f78439ab24f93a2 (diff) | |
parent | ab64314222aca47dd7e52eca2d54d2fad0a58f6c (diff) | |
download | pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.tar.gz pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.tar.xz pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.zip |
Merge remote-tracking branch 'libqr/master'
Diffstat (limited to 'lpg/libqr/constants.h')
-rw-r--r-- | lpg/libqr/constants.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lpg/libqr/constants.h b/lpg/libqr/constants.h new file mode 100644 index 0000000..b1f7493 --- /dev/null +++ b/lpg/libqr/constants.h @@ -0,0 +1,29 @@ +#ifndef QR_CONSTANTS_H +#define QR_CONSTANTS_H + +#include <qr/types.h> + +/* XOR mask for format data: 101 0100 0001 0010 */ +static const unsigned int QR_FORMAT_MASK = 0x5412; + +/* Format info EC polynomial + * G(x) = x^10 + x^8 + x^5 + x^4 + x^2 + x + 1 + */ +static const unsigned int QR_FORMAT_POLY = 0x537; + +/* Version info EC polynomial + * G(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + */ +static const unsigned int QR_VERSION_POLY = 0x1F25; + +/* A QR-code word is always 8 bits, but CHAR_BIT might not be */ +static const int QR_WORD_BITS = 8; + +extern const int QR_ALIGNMENT_LOCATION[40][7]; +extern const int QR_DATA_WORD_COUNT[40][4]; +/* See qr_get_rs_block_sizes() */ +extern const int QR_RS_BLOCK_COUNT[40][4][2]; +extern const enum qr_data_type QR_TYPE_CODES[16]; + +#endif + |