\
for (j = 0; j < size; j++) {\
for (i = 0; i < size; i++)\
- dst[i] = (((w2 * src1[i]) >> 9) + ((w1 * src2[i]) >> 9) + 0x10) >> 5;\
+ dst[i] = ((((unsigned)w2 * src1[i]) >> 9) + (((unsigned)w1 * src2[i]) >> 9) + 0x10) >> 5;\
src1 += stride;\
src2 += stride;\
dst += stride;\
\
for (j = 0; j < size; j++) {\
for (i = 0; i < size; i++)\
- dst[i] = (w2 * src1[i] + w1 * src2[i] + 0x10) >> 5;\
+ dst[i] = ((unsigned)w2 * src1[i] + (unsigned)w1 * src2[i] + 0x10) >> 5;\
src1 += stride;\
src2 += stride;\
dst += stride;\