Commit fe6fbfdb authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

try _skip?

parent 3487b836
......@@ -45,6 +45,7 @@ space_bits_4(int i)
uint32_t space_filler[16][16];
uint32_t space_filler_packed4[16][4];
uint32_t space_filler_packed4_skip[16][2];
unsigned space_filler_one[16];
void
......@@ -64,6 +65,14 @@ trans_generate_space_filler_indices()
(space_filler[y][(q*4) + 3] << 24);
}
for (int q = 0; q < 2; ++q) {
space_filler_packed4_skip[y][q] =
(space_filler[y][(q*8) + 0] << 0) |
(space_filler[y][(q*8) + 2] << 8) |
(space_filler[y][(q*8) + 4] << 16) |
(space_filler[y][(q*8) + 6] << 24);
}
space_filler_one[y] = space_bits_4(y);
}
}
......@@ -86,16 +95,21 @@ swizzle_bpp1_align16(int width, int height, int source_stride, int block_pitch,
for (; source_start < source_end; block_start_s += 16*16, source_start += 16) {
const uint32_t *src_32 = (const uint32_t *) source_start;
for (int q = 0; q < 4; ++q) {
uint32_t src = src_32[q];
uint32_t spaced = space_filler_packed4[rem_y][q];
for (int q = 0; q < 2; ++q) {
uint32_t srcA = src_32[q*2];
uint32_t srcB = src_32[q*2 + 1];
uint32_t spaced = space_filler_packed4_skip[rem_y][q];
uint16_t *bs = (uint16_t *) block_start_s;
int spacedA = (spaced >> 0) & 0xFF;
int spacedB = (spaced >> 16) & 0xFF;
bs[spacedA >> 1] = (src >> 0) & 0xFFFF;
bs[spacedB >> 1] = (src >> 16) & 0xFFFF;
int spacedB = (spaced >> 8) & 0xFF;
int spacedC = (spaced >> 16) & 0xFF;
int spacedD = (spaced >> 24) & 0xFF;
bs[spacedA >> 1] = (srcA >> 0) & 0xFFFF;
bs[spacedB >> 1] = (srcA >> 16) & 0xFFFF;
bs[spacedC >> 1] = (srcB >> 0) & 0xFFFF;
bs[spacedD >> 1] = (srcB >> 16) & 0xFFFF;
}
}
}
......
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