Commit 25c46651 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Implement maybe bad opt

parent fa54bf86
......@@ -88,11 +88,21 @@ swizzle_bpp1_align16(int width, int height, int source_stride, int block_pitch,
for (int q = 0; q < 4; ++q) {
uint32_t src = src_32[q];
uint32_t spaced = space_filler_packed4[rem_y][q];
uint16_t *bs = (uint16_t *) block_start_s;
block_start_s[(spaced >> 0) & 0xFF] = (src >> 0) & 0xFF;
block_start_s[(spaced >> 8) & 0xFF] = (src >> 8) & 0xFF;
block_start_s[(spaced >> 16) & 0xFF] = (src >> 16) & 0xFF;
block_start_s[(spaced >> 24) & 0xFF] = (src >> 24) & 0xFF;
if (!(y & 1)) {
int spacedA = (spaced >> 0) & 0xFF;
int spacedB = (spaced >> 16) & 0xFF;
bs[spacedA >> 1] = (src >> 0) & 0xFFFF;
bs[spacedB >> 1] = (src >> 16) & 0xFFFF;
} else {
block_start_s[(spaced >> 0) & 0xFF] = (src >> 0) & 0xFF;
block_start_s[(spaced >> 8) & 0xFF] = (src >> 8) & 0xFF;
block_start_s[(spaced >> 16) & 0xFF] = (src >> 16) & 0xFF;
block_start_s[(spaced >> 24) & 0xFF] = (src >> 24) & 0xFF;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment