===========================================================================
| 1163 | |
| 1164 | //=========================================================================== |
| 1165 | static void initPixelDoubleMasks (void) |
| 1166 | { |
| 1167 | /* |
| 1168 | Convert 7-bit monochrome luminance to 14-bit double pixel luminance |
| 1169 | Chroma will be applied later based on the color phase in updatePixelHueMonitorDoubleScanline( luminanceBit ) |
| 1170 | 0x001 -> 0x0003 |
| 1171 | 0x002 -> 0x000C |
| 1172 | 0x004 -> 0x0030 |
| 1173 | 0x008 -> 0x00C0 |
| 1174 | : -> : |
| 1175 | 0x100 -> 0x4000 |
| 1176 | */ |
| 1177 | for (uint8_t byte = 0; byte < 0x80; byte++ ) // Optimization: hgrbits second 128 entries are mirror of first 128 |
| 1178 | for (uint8_t bits = 0; bits < 7; bits++ ) // high bit = half pixel shift; pre-optimization: bits < 8 |
| 1179 | if (byte & (1 << bits)) // pow2 mask |
| 1180 | g_aPixelDoubleMaskHGR[byte] |= 3 << (bits*2); |
| 1181 | |
| 1182 | for ( uint16_t color = 0; color < 16; color++ ) |
| 1183 | g_aPixelMaskGR[ color ] = (color << 12) | (color << 8) | (color << 4) | (color << 0); |
| 1184 | } |
| 1185 | |
| 1186 | //=========================================================================== |
| 1187 | void updateMonochromeTables( uint16_t r, uint16_t g, uint16_t b ) |