• Home
  • Raw
  • Download

Lines Matching refs:qrsize

75 static int finderPenaltyCountPatterns(const int runHistory[7], int qrsize);
76 …enaltyTerminateAndCount(bool currentRunColor, int currentRunLength, int runHistory[7], int qrsize);
77 static void finderPenaltyAddHistory(int currentRunLength, int runHistory[7], int qrsize);
420 int qrsize = version * 4 + 17; in initializeFunctionModules() local
421 memset(qrcode, 0, (size_t)((qrsize * qrsize + 7) / 8 + 1) * sizeof(qrcode[0])); in initializeFunctionModules()
422 qrcode[0] = (uint8_t)qrsize; in initializeFunctionModules()
425 fillRectangle(6, 0, 1, qrsize, qrcode); in initializeFunctionModules()
426 fillRectangle(0, 6, qrsize, 1, qrcode); in initializeFunctionModules()
430 fillRectangle(qrsize - 8, 0, 8, 9, qrcode); in initializeFunctionModules()
431 fillRectangle(0, qrsize - 8, 9, 8, qrcode); in initializeFunctionModules()
446 fillRectangle(qrsize - 11, 0, 3, 6, qrcode); in initializeFunctionModules()
447 fillRectangle(0, qrsize - 11, 6, 3, qrcode); in initializeFunctionModules()
457 int qrsize = qrcodegen_getSize(qrcode); in drawLightFunctionModules() local
458 for (int i = 7; i < qrsize - 7; i += 2) { in drawLightFunctionModules()
471 setModuleUnbounded(qrcode, qrsize - 4 + dx, 3 + dy, false); in drawLightFunctionModules()
472 setModuleUnbounded(qrcode, 3 + dx, qrsize - 4 + dy, false); in drawLightFunctionModules()
503 int k = qrsize - 11 + j; in drawLightFunctionModules()
537 int qrsize = qrcodegen_getSize(qrcode); in drawFormatBits() local
539 setModuleBounded(qrcode, qrsize - 1 - i, 8, getBit(bits, i)); in drawFormatBits()
541 setModuleBounded(qrcode, 8, qrsize - 15 + i, getBit(bits, i)); in drawFormatBits()
542 setModuleBounded(qrcode, 8, qrsize - 8, true); // Always dark in drawFormatBits()
578 int qrsize = qrcodegen_getSize(qrcode); in drawCodewords() local
581 …for (int right = qrsize - 1; right >= 1; right -= 2) { // Index of right column in each column pa… in drawCodewords()
584 for (int vert = 0; vert < qrsize; vert++) { // Vertical counter in drawCodewords()
588 int y = upward ? qrsize - 1 - vert : vert; // Actual y coordinate in drawCodewords()
610 int qrsize = qrcodegen_getSize(qrcode); in applyMask() local
611 for (int y = 0; y < qrsize; y++) { in applyMask()
612 for (int x = 0; x < qrsize; x++) { in applyMask()
637 int qrsize = qrcodegen_getSize(qrcode); in getPenaltyScore() local
641 for (int y = 0; y < qrsize; y++) { in getPenaltyScore()
645 for (int x = 0; x < qrsize; x++) { in getPenaltyScore()
653 finderPenaltyAddHistory(runX, runHistory, qrsize); in getPenaltyScore()
655 result += finderPenaltyCountPatterns(runHistory, qrsize) * PENALTY_N3; in getPenaltyScore()
660 result += finderPenaltyTerminateAndCount(runColor, runX, runHistory, qrsize) * PENALTY_N3; in getPenaltyScore()
663 for (int x = 0; x < qrsize; x++) { in getPenaltyScore()
667 for (int y = 0; y < qrsize; y++) { in getPenaltyScore()
675 finderPenaltyAddHistory(runY, runHistory, qrsize); in getPenaltyScore()
677 result += finderPenaltyCountPatterns(runHistory, qrsize) * PENALTY_N3; in getPenaltyScore()
682 result += finderPenaltyTerminateAndCount(runColor, runY, runHistory, qrsize) * PENALTY_N3; in getPenaltyScore()
686 for (int y = 0; y < qrsize - 1; y++) { in getPenaltyScore()
687 for (int x = 0; x < qrsize - 1; x++) { in getPenaltyScore()
698 for (int y = 0; y < qrsize; y++) { in getPenaltyScore()
699 for (int x = 0; x < qrsize; x++) { in getPenaltyScore()
704 int total = qrsize * qrsize; // Note that size is odd, so dark/total != 1/2 in getPenaltyScore()
716 static int finderPenaltyCountPatterns(const int runHistory[7], int qrsize) { in finderPenaltyCountPatterns() argument
718 assert(n <= qrsize * 3); (void)qrsize; in finderPenaltyCountPatterns()
728 …naltyTerminateAndCount(bool currentRunColor, int currentRunLength, int runHistory[7], int qrsize) { in finderPenaltyTerminateAndCount() argument
730 finderPenaltyAddHistory(currentRunLength, runHistory, qrsize); in finderPenaltyTerminateAndCount()
733 currentRunLength += qrsize; // Add light border to final run in finderPenaltyTerminateAndCount()
734 finderPenaltyAddHistory(currentRunLength, runHistory, qrsize); in finderPenaltyTerminateAndCount()
735 return finderPenaltyCountPatterns(runHistory, qrsize); in finderPenaltyTerminateAndCount()
740 static void finderPenaltyAddHistory(int currentRunLength, int runHistory[7], int qrsize) { in finderPenaltyAddHistory() argument
742 currentRunLength += qrsize; // Add light border to initial run in finderPenaltyAddHistory()
764 int qrsize = qrcode[0]; in qrcodegen_getModule() local
765 return (0 <= x && x < qrsize && 0 <= y && y < qrsize) && getModuleBounded(qrcode, x, y); in qrcodegen_getModule()
771 int qrsize = qrcode[0]; in getModuleBounded() local
772 assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize); in getModuleBounded()
773 int index = y * qrsize + x; in getModuleBounded()
780 int qrsize = qrcode[0]; in setModuleBounded() local
781 assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize); in setModuleBounded()
782 int index = y * qrsize + x; in setModuleBounded()
794 int qrsize = qrcode[0]; in setModuleUnbounded() local
795 if (0 <= x && x < qrsize && 0 <= y && y < qrsize) in setModuleUnbounded()