| 111 | } |
| 112 | |
| 113 | bool verifyBlackColorPattern(const Image<ColorRgb>& yuvImage, bool isFirstWhite, CapturedColor& black) |
| 114 | { |
| 115 | try |
| 116 | { |
| 117 | for (int x = 0; x < SCREEN_BLOCKS_X; x++) |
| 118 | for (int y = 0; y < SCREEN_BLOCKS_Y; y++) |
| 119 | if ((x + isFirstWhite + y) % 2 == 0) |
| 120 | { |
| 121 | auto test = readBlock(yuvImage, int2(x, y)); |
| 122 | if (test.Y() > black.Y() + SCREEN_MAX_CRC_BRIGHTNESS_ERROR) |
| 123 | return false; |
| 124 | } |
| 125 | } |
| 126 | catch (std::exception& ex) |
| 127 | { |
| 128 | // too much noice or too low resolution |
| 129 | return false; |
| 130 | } |
| 131 | |
| 132 | return true; |
| 133 | } |
| 134 | |
| 135 | int readCrc(const Image<ColorRgb>& yuvImage, int line, CapturedColor& white) |
| 136 | { |
no test coverage detected