Lines Matching refs:x

64 testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y);
78 testable bool getModule(const uint8_t qrcode[], int x, int y);
79 testable void setModule(uint8_t qrcode[], int x, int y, bool isBlack);
80 testable void setModuleBounded(uint8_t qrcode[], int x, int y, bool isBlack);
81 static bool getBit(int x, int i);
397 testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y) { in finiteFieldMultiply() argument
402 z ^= ((y >> i) & 1) * x; in finiteFieldMultiply()
581 int x = right - j; // Actual x coordinate in drawCodewords() local
584 if (!getModule(qrcode, x, y) && i < dataLen * 8) { in drawCodewords()
586 setModule(qrcode, x, y, black); in drawCodewords()
607 for (int x = 0; x < qrsize; x++) { in applyMask() local
608 if (getModule(functionModules, x, y)) in applyMask()
612 case 0: invert = (x + y) % 2 == 0; break; in applyMask()
614 case 2: invert = x % 3 == 0; break; in applyMask()
615 case 3: invert = (x + y) % 3 == 0; break; in applyMask()
616 case 4: invert = (x / 3 + y / 2) % 2 == 0; break; in applyMask()
617 case 5: invert = x * y % 2 + x * y % 3 == 0; break; in applyMask()
618 case 6: invert = (x * y % 2 + x * y % 3) % 2 == 0; break; in applyMask()
619 case 7: invert = ((x + y) % 2 + x * y % 3) % 2 == 0; break; in applyMask()
622 bool val = getModule(qrcode, x, y); in applyMask()
623 setModule(qrcode, x, y, val ^ invert); in applyMask()
640 for (int x = 0; x < qrsize; x++) { in getPenaltyScore() local
641 if (getModule(qrcode, x, y) == color) { in getPenaltyScore()
651 color = getModule(qrcode, x, y); in getPenaltyScore()
662 for (int x = 0; x < qrsize; x++) { in getPenaltyScore() local
667 if (getModule(qrcode, x, y) == color) { in getPenaltyScore()
677 color = getModule(qrcode, x, y); in getPenaltyScore()
690 for (int x = 0; x < qrsize - 1; x++) { in getPenaltyScore() local
691 bool color = getModule(qrcode, x, y); in getPenaltyScore()
692 if ( color == getModule(qrcode, x + 1, y) && in getPenaltyScore()
693 color == getModule(qrcode, x, y + 1) && in getPenaltyScore()
694 color == getModule(qrcode, x + 1, y + 1)) in getPenaltyScore()
702 for (int x = 0; x < qrsize; x++) { in getPenaltyScore() local
703 if (getModule(qrcode, x, y)) in getPenaltyScore()
749 bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y) { in qrcodegen_getModule() argument
752 return (0 <= x && x < qrsize && 0 <= y && y < qrsize) && getModule(qrcode, x, y); in qrcodegen_getModule()
757 testable bool getModule(const uint8_t qrcode[], int x, int y) { in getModule() argument
759 assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize); in getModule()
760 int index = y * qrsize + x; in getModule()
766 testable void setModule(uint8_t qrcode[], int x, int y, bool isBlack) { in setModule() argument
768 assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize); in setModule()
769 int index = y * qrsize + x; in setModule()
780 testable void setModuleBounded(uint8_t qrcode[], int x, int y, bool isBlack) { in setModuleBounded() argument
782 if (0 <= x && x < qrsize && 0 <= y && y < qrsize) in setModuleBounded()
783 setModule(qrcode, x, y, isBlack); in setModuleBounded()
788 static bool getBit(int x, int i) { in getBit() argument
789 return ((x >> i) & 1) != 0; in getBit()