63void calcEdgesGL(std::span<const uint32_t> curr, std::span<const uint32_t> next,
64 std::span<Endian::L32> edges2, EdgeOp edgeOp)
66 assert(curr.size() == 320);
67 assert(next.size() == 320);
68 assert(edges2.size() == 320 / 2);
108 using Pixel = uint32_t;
110 uint32_t pattern = 0;
113 if (edgeOp(c5, c8)) pattern |= 0x1800'0000;
115 for (
auto xx :
xrange((320 - 2) / 2)) {
116 pattern = (pattern >> (16 + 9)) & 0x001C;
117 pattern |= (edges2[xx] << 3) & 0xC460'C460;
119 if (edgeOp(c5, c8)) pattern |= 0x0000'0080;
120 Pixel c6 = curr[2 * xx + 1];
121 if (edgeOp(c6, c8)) pattern |= 0x0004'0800;
122 if (edgeOp(c5, c6)) pattern |= 0x0010'2000;
123 Pixel c9 = next[2 * xx + 1];
124 if (edgeOp(c5, c9)) pattern |= 0x0008'1000;
126 if (edgeOp(c6, c9)) pattern |= 0x0080'0000;
127 c5 = curr[2 * xx + 2];
128 if (edgeOp(c5, c9)) pattern |= 0x0800'0000;
129 if (edgeOp(c6, c5)) pattern |= 0x2000'0000;
130 c8 = next[2 * xx + 2];
131 if (edgeOp(c6, c8)) pattern |= 0x1000'0000;
133 edges2[xx] = pattern;
136 pattern = (pattern >> (16 + 9)) & 0x001C;
137 pattern |= (edges2[159] << 3) & 0xC460'C460;
139 if (edgeOp(c5, c8)) pattern |= 0x0000'0080;
140 Pixel c6 = curr[319];
141 if (edgeOp(c6, c8)) pattern |= 0x0004'0800;
142 if (edgeOp(c5, c6)) pattern |= 0x0010'2000;
143 Pixel c9 = next[319];
144 if (edgeOp(c5, c9)) pattern |= 0x0008'1000;
146 if (edgeOp(c6, c9)) pattern |= 0x1880'0000;
148 edges2[159] = pattern;