/* write 4 pixels at once */
while (sbuf32 < ALIGN_DOWN_PIXELS(send32, pixels, 4)) {
u32 pix[4] = {
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
+ le32_to_cpup(sbuf32),
+ le32_to_cpup(sbuf32 + 1),
+ le32_to_cpup(sbuf32 + 2),
+ le32_to_cpup(sbuf32 + 3),
};
/* write output bytes in reverse order for little endianness */
u32 val32 = xfrm_pixel(pix[0]) |
(xfrm_pixel(pix[2]) << 16) |
(xfrm_pixel(pix[3]) << 24);
*dbuf32++ = cpu_to_le32(val32);
+ sbuf32 += ARRAY_SIZE(pix);
}
/* write trailing pixels */
/* write 4 pixels at once */
while (sbuf32 < ALIGN_DOWN_PIXELS(send32, pixels, 4)) {
u32 pix[4] = {
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
+ le32_to_cpup(sbuf32),
+ le32_to_cpup(sbuf32 + 1),
+ le32_to_cpup(sbuf32 + 2),
+ le32_to_cpup(sbuf32 + 3),
};
/* write output bytes in reverse order for little endianness */
u64 val64 = ((u64)xfrm_pixel(pix[0])) |
((u64)xfrm_pixel(pix[2]) << 32) |
((u64)xfrm_pixel(pix[3]) << 48);
*dbuf64++ = cpu_to_le64(val64);
+ sbuf32 += ARRAY_SIZE(pix);
}
#endif
dbuf32 = (__le32 __force *)dbuf64;
while (sbuf32 < ALIGN_DOWN_PIXELS(send32, pixels, 2)) {
u32 pix[2] = {
- le32_to_cpup(sbuf32++),
- le32_to_cpup(sbuf32++),
+ le32_to_cpup(sbuf32),
+ le32_to_cpup(sbuf32 + 1),
};
/* write output bytes in reverse order for little endianness */
u32 val32 = xfrm_pixel(pix[0]) |
(xfrm_pixel(pix[1]) << 16);
*dbuf32++ = cpu_to_le32(val32);
+ sbuf32 += ARRAY_SIZE(pix);
}
/* write trailing pixel */
/* write pixels in chunks of 4 */
while (sbuf32 < ALIGN_DOWN_PIXELS(send32, pixels, 4)) {
u32 val24[4] = {
- xfrm_pixel(le32_to_cpup(sbuf32++)),
- xfrm_pixel(le32_to_cpup(sbuf32++)),
- xfrm_pixel(le32_to_cpup(sbuf32++)),
- xfrm_pixel(le32_to_cpup(sbuf32++)),
+ xfrm_pixel(le32_to_cpup(sbuf32)),
+ xfrm_pixel(le32_to_cpup(sbuf32 + 1)),
+ xfrm_pixel(le32_to_cpup(sbuf32 + 2)),
+ xfrm_pixel(le32_to_cpup(sbuf32 + 3)),
};
u32 out32[3] = {
/* write output bytes in reverse order for little endianness */
*dbuf32++ = cpu_to_le32(out32[0]);
*dbuf32++ = cpu_to_le32(out32[1]);
*dbuf32++ = cpu_to_le32(out32[2]);
+ sbuf32 += ARRAY_SIZE(val24);
}
/* write trailing pixel */