- for (unsigned y = 0; y < DCTSIZE; ++y) {
- unsigned real_x = (mcu_x * image->hsample[cn] + local_xb) * DCTSIZE;
- unsigned real_y = (mcu_y * image->vsample[cn] + local_yb) * DCTSIZE + y;
-
- memcpy(image->pixel_data[cn] + real_y * stride + real_x,
- pixdata + y * DCTSIZE,
- DCTSIZE);
+ unsigned real_x = (mcu_x * image->hsample[cn] + local_xb) * DCTSIZE;
+ unsigned real_y = (mcu_y * image->vsample[cn] + local_yb) * DCTSIZE;
+ uint8_t* dest_pixdata = image->pixel_data[cn] + real_y * stride + real_x;
+ for (unsigned y = 0; y < DCTSIZE; ++y, dest_pixdata += stride) {
+ memcpy(dest_pixdata, pixdata + y * DCTSIZE, DCTSIZE);