Index: source/scale.cc |
diff --git a/source/scale.cc b/source/scale.cc |
index 595314f35cbda7526317d0857f79adf654c559d8..8ab85ce0032fdf82129d735eb3b44c77bd92e28e 100644 |
--- a/source/scale.cc |
+++ b/source/scale.cc |
@@ -659,7 +659,6 @@ static void ScaleAddCols2_C(int dst_width, int boxheight, int x, int dx, |
int i; |
int scaletbl[2]; |
int minboxwidth = dx >> 16; |
- int* scaleptr = scaletbl - minboxwidth; |
int boxwidth; |
scaletbl[0] = 65536 / (MIN1(minboxwidth) * boxheight); |
scaletbl[1] = 65536 / (MIN1(minboxwidth + 1) * boxheight); |
@@ -667,7 +666,8 @@ static void ScaleAddCols2_C(int dst_width, int boxheight, int x, int dx, |
int ix = x >> 16; |
x += dx; |
boxwidth = MIN1((x >> 16) - ix); |
- *dst_ptr++ = SumPixels(boxwidth, src_ptr + ix) * scaleptr[boxwidth] >> 16; |
+ *dst_ptr++ = SumPixels(boxwidth, src_ptr + ix) * |
+ scaletbl[boxwidth - minboxwidth] >> 16; |
} |
} |
@@ -676,7 +676,6 @@ static void ScaleAddCols2_16_C(int dst_width, int boxheight, int x, int dx, |
int i; |
int scaletbl[2]; |
int minboxwidth = dx >> 16; |
- int* scaleptr = scaletbl - minboxwidth; |
int boxwidth; |
scaletbl[0] = 65536 / (MIN1(minboxwidth) * boxheight); |
scaletbl[1] = 65536 / (MIN1(minboxwidth + 1) * boxheight); |
@@ -684,8 +683,8 @@ static void ScaleAddCols2_16_C(int dst_width, int boxheight, int x, int dx, |
int ix = x >> 16; |
x += dx; |
boxwidth = MIN1((x >> 16) - ix); |
- *dst_ptr++ = |
- SumPixels_16(boxwidth, src_ptr + ix) * scaleptr[boxwidth] >> 16; |
+ *dst_ptr++ = SumPixels_16(boxwidth, src_ptr + ix) * |
+ scaletbl[boxwidth - minboxwidth] >> 16; |
} |
} |