Remove out-of-bounds check for tiled images.
Since tiles have an overlap, if the absolute point is inside the source image, we can interpolate.
This commit is contained in:
parent
5f78958584
commit
c918ca5504
|
@ -726,11 +726,6 @@ void rotate_pixel(TiledImage<W, H> 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<W, H> 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;
|
||||
|
|
Loading…
Reference in a new issue