for (k = 0; k < 8; k++)
sum += c[k*8+i]*tmp[8*k+j];
- dst[dst_linesize*i + j] = av_clip_uint8((int)floor(sum+0.5));
+ dst[dst_linesize*i + j] = av_clip_uint8(lrint(sum));
}
}
}
for (y = 0; y < 16*16; y++) {
for (x = 0; x < 16*16; x++) {
- double d = sqrt((x-8*16)*(x-8*16) + (y-8*16)*(y-8*16));
+ double d = hypot(x-8*16, y-8*16);
double r = d/20 - (int)(d/20);
if (r < off/30.0) {
dst[x + y*dst_linesize] = 255;