Lines Matching defs:version
179 int QrSegment::getTotalBits(const vector<QrSegment> &segs, int version) {
182 int ccbits = seg.mode->numCharCountBits(version);
264 // Find the minimal version number to use
265 int version, dataUsedBits;
266 for (version = minVersion; ; version++) {
267 int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; // Number of data bits available
268 dataUsedBits = QrSegment::getTotalBits(segs, version);
270 break; // This version number is found to be suitable
271 if (version >= maxVersion) { // All versions in the range could not fit the given data
284 // Increase the error correction level while the data still fits in the current version number
286 if (boostEcl && dataUsedBits <= getNumDataCodewords(version, newEcl) * 8)
294 bb.appendBits(static_cast<uint32_t>(seg.getNumChars()), seg.getMode().numCharCountBits(version));
300 size_t dataCapacityBits = static_cast<size_t>(getNumDataCodewords(version, ecl)) * 8;
316 return QrCode(version, ecl, dataCodewords, mask);
322 version(ver),
363 return version;
444 if (version < 7)
448 int rem = version; // version is uint6, in the range [7, 40]
451 long bits = static_cast<long>(version) << 12 | rem; // uint18
499 if (data.size() != static_cast<unsigned int>(getNumDataCodewords(version, errorCorrectionLevel)))
503 int numBlocks = NUM_ERROR_CORRECTION_BLOCKS[static_cast<int>(errorCorrectionLevel)][version];
504 int blockEccLen = ECC_CODEWORDS_PER_BLOCK [static_cast<int>(errorCorrectionLevel)][version];
505 int rawCodewords = getNumRawDataModules(version) / 8;
537 if (data.size() != static_cast<unsigned int>(getNumRawDataModules(version) / 8))
665 if (version == 1)
668 int numAlign = version / 7 + 2;
669 int step = (version == 32) ? 26 :
670 (version * 4 + numAlign * 2 + 1) / (numAlign * 2 - 2) * 2;