*/
static void CopyFromUswc(uint8_t *dst, size_t dst_pitch,
const uint8_t *src, size_t src_pitch,
- unsigned unaligned,
unsigned width, unsigned height,
unsigned cpu)
{
ASM_SSE2(cpu, "mfence");
for (unsigned y = 0; y < height; y++) {
+ const unsigned unaligned = (intptr_t)src & 0x0f;
unsigned x;
for (x = 0; x < unaligned; x++)
assert(hstep > 0);
for (unsigned y = 0; y < height; y += hstep) {
- const unsigned unaligned = (intptr_t)src & 0x0f;
const unsigned hblock = __MIN(hstep, height - y);
/* Copy a bunch of line into our cache */
CopyFromUswc(cache, w16,
src, src_pitch,
- unaligned,
width, hblock, cpu);
/* Copy from our cache to the destination */
assert(hstep > 0);
for (unsigned y = 0; y < height; y += hstep) {
- const unsigned unaligned = (intptr_t)src & 0x0f;
const unsigned hblock = __MIN(hstep, height - y);
/* Copy a bunch of line into our cache */
CopyFromUswc(cache, w2_16,
src, src_pitch,
- unaligned,
2*width, hblock, cpu);
/* Copy from our cache to the destination */