g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
- *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
+ *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
+ ((r + (1 << 3)) >> 4),
+ ((g + (1 << 3)) >> 4),
+ ((b + (1 << 3)) >> 4));
xp++; xapp++;
}
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
- *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
+ *pbuf++ = ARGB_JOIN(0xff,
+ ((r + (1 << 3)) >> 4),
+ ((g + (1 << 3)) >> 4),
+ ((b + (1 << 3)) >> 4));
xp++; xapp++;
}
}
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
- *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
+ *pbuf++ = ARGB_JOIN(0xff,
+ ((r + (1 << 3)) >> 4),
+ ((g + (1 << 3)) >> 4),
+ ((b + (1 << 3)) >> 4));
xp++; xapp++;
}
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
- *pbuf++ = ARGB_JOIN(a >> 5, r >> 5, g >> 5, b >> 5);
+ *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5),
+ ((r + (1 << 4)) >> 5),
+ ((g + (1 << 4)) >> 5),
+ ((b + (1 << 4)) >> 5));
xp++; xapp++;
}
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
- *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5);
+ *pbuf++ = ARGB_JOIN(0xff,
+ ((r + (1 << 4)) >> 5),
+ ((g + (1 << 4)) >> 5),
+ ((b + (1 << 4)) >> 5));
xp++; xapp++;
}
}
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
- *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5);
+ *pbuf++ = ARGB_JOIN(0xff,
+ ((r + (1 << 4)) >> 5),
+ ((g + (1 << 4)) >> 5),
+ ((b + (1 << 4)) >> 5));
xp++; xapp++;
}
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
- *pbuf++ = ARGB_JOIN(a >> 4, r >> 4, g >> 4, b >> 4);
+ *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
+ ((r + (1 << 3)) >> 4),
+ ((g + (1 << 3)) >> 4),
+ ((b + (1 << 3)) >> 4));
xp++; xapp++;
}
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
- *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
+ *pbuf++ = ARGB_JOIN(0xff,
+ ((r + (1 << 3)) >> 4),
+ ((g + (1 << 3)) >> 4),
+ ((b + (1 << 3)) >> 4));
xp++; xapp++;
}
}
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
- *pbuf++ = ARGB_JOIN(0xff, r >> 4, g >> 4, b >> 4);
+ *pbuf++ = ARGB_JOIN(0xff,
+ ((r + (1 << 3)) >> 4),
+ ((g + (1 << 3)) >> 4),
+ ((b + (1 << 3)) >> 4));
xp++; xapp++;
}