diff --git a/rotation.cpp b/rotation.cpp index 8c97fc1..6682605 100644 --- a/rotation.cpp +++ b/rotation.cpp @@ -726,11 +726,6 @@ void rotate_pixel(TiledImage const& src, pvalue_t const* src_index_1 = src.access_pixel(src_x, src_y); pvalue_t const* src_index_3 = src_index_1 + (W + 1) * PIXEL_SIZE; - pvalue_t const* src_index_4 = src_index_3 + PIXEL_SIZE; - - // FIXME: deal with image border - if (!src_index_4) - return; unsigned int x_delta = src_rotated_point.x & 0x07;; unsigned int y_delta = src_rotated_point.y & 0x07; @@ -740,6 +735,7 @@ void rotate_pixel(TiledImage const& src, #ifndef SIMD pvalue_t const* src_index_2 = src_index_1 + PIXEL_SIZE; + pvalue_t const* src_index_4 = src_index_3 + PIXEL_SIZE; rot_tile[0] = ((src_index_1[0] * inv_x + src_index_2[0] * x_delta) * inv_y + (src_index_3[0] * inv_x + src_index_4[0] * x_delta) * y_delta) >> 6;