34 #define QRSPEC_WIDTH_MAX 177
108 #define QRspec_rsBlockNum(__spec__) (__spec__[0] + __spec__[3])
109 #define QRspec_rsBlockNum1(__spec__) (__spec__[0])
110 #define QRspec_rsDataCodes1(__spec__) (__spec__[1])
111 #define QRspec_rsEccCodes1(__spec__) (__spec__[2])
112 #define QRspec_rsBlockNum2(__spec__) (__spec__[3])
113 #define QRspec_rsDataCodes2(__spec__) (__spec__[4])
114 #define QRspec_rsEccCodes2(__spec__) (__spec__[2])
116 #define QRspec_rsDataLength(__spec__) \
117 ((QRspec_rsBlockNum1(__spec__) * QRspec_rsDataCodes1(__spec__)) + \
118 (QRspec_rsBlockNum2(__spec__) * QRspec_rsDataCodes2(__spec__)))
119 #define QRspec_rsEccLength(__spec__) \
120 (QRspec_rsBlockNum(__spec__) * QRspec_rsEccCodes1(__spec__))
164 #define QRSPEC_MODEID_ECI 7
165 #define QRSPEC_MODEID_NUM 1
166 #define QRSPEC_MODEID_AN 2
167 #define QRSPEC_MODEID_8 4
168 #define QRSPEC_MODEID_KANJI 8
169 #define QRSPEC_MODEID_FNC1FIRST 5
170 #define QRSPEC_MODEID_FNC1SECOND 9
171 #define QRSPEC_MODEID_STRUCTURE 3
172 #define QRSPEC_MODEID_TERMINATOR 0
int QRspec_getRemainder(int version)
Return the numer of remainder bits.
unsigned char * QRspec_newFrame(int version)
Return a copy of initialized frame.
int QRspec_getMinimumVersion(int size, QRecLevel level)
Return a version number that satisfies the input code length.
QRecLevel
Level of error correction.
int QRspec_lengthIndicator(QRencodeMode mode, int version)
Return the size of length indicator for the mode and version.
QRencodeMode
Encoding mode.
int QRspec_maximumWords(QRencodeMode mode, int version)
Return the maximum length for the mode and version.
unsigned int QRspec_getVersionPattern(int version)
Return BCH encoded version information pattern that is used for the symbol of version 7 or greater...
unsigned int QRspec_getFormatInfo(int mask, QRecLevel level)
Return BCH encoded format information pattern.
void QRspec_getEccSpec(int version, QRecLevel level, int spec[5])
Return an array of ECC specification.
int QRspec_getWidth(int version)
Return the width of the symbol for the version.
int QRspec_getECCLength(int version, QRecLevel level)
Return maximum error correction code length (bytes) for the version.
int QRspec_getDataLength(int version, QRecLevel level)
Return maximum data code length (bytes) for the version.