Lines Matching refs:y
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);
397 testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y) { in finiteFieldMultiply() argument
402 z ^= ((y >> i) & 1) * x; in finiteFieldMultiply()
583 int y = upward ? qrsize - 1 - vert : vert; // Actual y coordinate in drawCodewords() local
584 if (!getModule(qrcode, x, y) && i < dataLen * 8) { in drawCodewords()
586 setModule(qrcode, x, y, black); in drawCodewords()
606 for (int y = 0; y < qrsize; y++) { in applyMask() local
608 if (getModule(functionModules, x, y)) in applyMask()
612 case 0: invert = (x + y) % 2 == 0; break; in applyMask()
613 case 1: invert = y % 2 == 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()
636 for (int y = 0; y < qrsize; y++) { in getPenaltyScore() local
641 if (getModule(qrcode, x, y) == color) { in getPenaltyScore()
651 color = getModule(qrcode, x, y); in getPenaltyScore()
666 for (int y = 0; y < qrsize; y++) { in getPenaltyScore() local
667 if (getModule(qrcode, x, y) == color) { in getPenaltyScore()
677 color = getModule(qrcode, x, y); in getPenaltyScore()
689 for (int y = 0; y < qrsize - 1; y++) { 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()
701 for (int y = 0; y < qrsize; y++) { 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 LV_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 LV_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()