Lines Matching defs:bits
183 // Appends the given number of low-order bits of the given value to the given byte-based
213 int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; // Number of data bits available
282 drawFormatBits(ecl, mask, qrcode); // Overwrite old format bits
336 // Returns the number of data bits that can be stored in a QR Code of the given version number, after
337 // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
428 // Fill 3 finder patterns (all corners except bottom right) and format bits
453 // non-function modules. This does not draw the format bits. This requires all function modules to be previously
493 // Calculate error correction code and pack bits
497 long bits = (long)version << 12 | rem; // uint18
498 assert(bits >> 18 == 0);
504 setModuleBounded(qrcode, k, i, (bits & 1) != 0);
505 setModuleBounded(qrcode, i, k, (bits & 1) != 0);
506 bits >>= 1;
513 // Draws two copies of the format bits (with its own error correction code) based
515 // the format bits, unlike drawLightFunctionModules() which might skip dark modules.
517 // Calculate error correction code and pack bits
524 int bits = (data << 10 | rem) ^ 0x5412; // uint15
525 assert(bits >> 15 == 0);
529 setModuleBounded(qrcode, 8, i, getBit(bits, i));
530 setModuleBounded(qrcode, 8, 7, getBit(bits, 6));
531 setModuleBounded(qrcode, 8, 8, getBit(bits, 7));
532 setModuleBounded(qrcode, 7, 8, getBit(bits, 8));
534 setModuleBounded(qrcode, 14 - i, 8, getBit(bits, i));
539 setModuleBounded(qrcode, qrsize - 1 - i, 8, getBit(bits, i));
541 setModuleBounded(qrcode, 8, qrsize - 15 + i, getBit(bits, i));
576 // the QR Code to be dark at function modules and light at codeword modules (including unused remainder bits).
594 // If this QR Code has any remainder bits (0 to 7), they were assigned as
604 // and given pattern of function modules. The codeword bits must be drawn
841 // Returns the number of data bits needed to represent a segment
844 // the number of needed bits exceeds INT16_MAX (i.e. 32767).
847 // - For ECI mode, numChars must be 0, and the worst-case number of bits is returned.
985 // Calculates the number of bits needed to encode the given segments at the given version.
987 // many characters to fit its length field, or the total bits exceeds INT16_MAX.