j = acc >> 17;
x = (acc & 0x1ffff) >> 9;
- if (2 * (j - 1) >= 0 && 2 * (j + 4) < src_width) {
+ if (2 * j - 1 >= 0 && 2 * j + 4 < src_width) {
y = vs_4tap_taps[x][0] * src[MAX (j * 4 + 1 - 4, 1)];
y += vs_4tap_taps[x][1] * src[j * 4 + 1];
y += vs_4tap_taps[x][2] * src[j * 4 + 1 + 4];
dest[i * 4 + 1] = CLAMP (y >> SHIFT, 0, 255);
if (2 * i + 1 < n) {
- if (2 * (j - 1) >= 0 && 2 * (j + 4) < src_width) {
+ if (2 * j - 1 >= 0 && 2 * j + 4 < src_width) {
y = vs_4tap_taps[x][0] * src[MAX (j * 4 + 3 - 4, 3)];
y += vs_4tap_taps[x][1] * src[j * 4 + 3];
y += vs_4tap_taps[x][2] * src[j * 4 + 3 + 4];
j = acc >> 17;
x = (acc & 0x1ffff) >> 9;
- if (2 * (j - 2) >= 0 && 2 * (j + 4) < src_width) {
+ if (2 * j - 2 >= 0 && 2 * j + 4 < src_width) {
y = vs_4tap_taps[x][0] * src[MAX (j * 4 + 0 - 4, 0)];
y += vs_4tap_taps[x][1] * src[j * 4 + 0];
y += vs_4tap_taps[x][2] * src[j * 4 + 0 + 4];
dest[i * 4 + 0] = CLAMP (y >> SHIFT, 0, 255);
if (2 * i + 1 < n) {
- if (2 * (j - 1) >= 0 && 2 * (j + 4) < src_width) {
+ if (2 * j - 1 >= 0 && 2 * j + 4 < src_width) {
y = vs_4tap_taps[x][0] * src[MAX (j * 4 + 2 - 4, 2)];
y += vs_4tap_taps[x][1] * src[j * 4 + 2];
y += vs_4tap_taps[x][2] * src[j * 4 + 2 + 4];
j = acc >> 17;
x = acc & 0x1ffff;
dest[i * 4 + 1] = (x < 65536
- || 2 * (j + 2) >= src_width) ? src[j * 4 + 1] : src[j * 4 + 5];
+ || 2 * j + 2 >= src_width) ? src[j * 4 + 1] : src[j * 4 + 5];
- if (2 * i + 1 < n && 2 * (j + 1) < src_width)
+ if (2 * i + 1 < n && 2 * j + 1 < src_width)
dest[i * 4 + 3] = (x < 65536
- || 2 * (j + 3) >= src_width) ? src[j * 4 + 3] : src[j * 4 + 7];
+ || 2 * j + 3 >= src_width) ? src[j * 4 + 3] : src[j * 4 + 7];
acc += increment;
j = acc >> 17;
x = acc & 0x1ffff;
- if (2 * (j + 2) < src_width)
+ if (2 * j + 2 < src_width)
dest[i * 4 + 1] =
(src[j * 4 + 1] * (131072 - x) + src[j * 4 + 5] * x) >> 17;
else
dest[i * 4 + 1] = src[j * 4 + 1];
- if (2 * i + 1 < n && 2 * (j + 1) < src_width) {
- if (2 * (j + 3) < src_width)
+ if (2 * i + 1 < n && 2 * j + 1 < src_width) {
+ if (2 * j + 3 < src_width)
dest[i * 4 + 3] =
(src[j * 4 + 3] * (131072 - x) + src[j * 4 + 7] * x) >> 17;
else
x = acc & 0x1ffff;
dest[i * 4 + 0] = (x < 65536
- || 2 * (j + 2) >= src_width) ? src[j * 4 + 0] : src[j * 4 + 4];
+ || 2 * j + 2 >= src_width) ? src[j * 4 + 0] : src[j * 4 + 4];
- if (2 * i + 1 < n && 2 * (j + 1) < src_width)
+ if (2 * i + 1 < n && 2 * j + 1 < src_width)
dest[i * 4 + 2] = (x < 65536
- || 2 * (j + 3) >= src_width) ? src[j * 4 + 2] : src[j * 4 + 6];
+ || 2 * j + 3 >= src_width) ? src[j * 4 + 2] : src[j * 4 + 6];
acc += increment;
j = acc >> 17;
x = acc & 0x1ffff;
- if (2 * (j + 2) < src_width)
+ if (2 * j + 2 < src_width)
dest[i * 4 + 0] =
(src[j * 4 + 0] * (131072 - x) + src[j * 4 + 4] * x) >> 17;
else
dest[i * 4 + 0] = src[j * 4 + 0];
- if (i * 2 + 1 < n && 2 * (j + 1) < src_width) {
- if (2 * (j + 3) < src_width)
+ if (i * 2 + 1 < n && 2 * j + 1 < src_width) {
+ if (2 * j + 3 < src_width)
dest[i * 4 + 2] =
(src[j * 4 + 2] * (131072 - x) + src[j * 4 + 6] * x) >> 17;
else