If width is not alligned with hsub, background component should only be multiplied once by sub alpha component.
Showing the changes to libavfilter/drawutils.c (1 of 1 file). Show all
Unified · Split
| @@ -313,7 +313,6 @@ static void blend_line(uint8_t *dst, unsigned src, unsigned alpha, · 312 unmodified lines | ||
| 313 | 313 | unsigned tau = 0x1010101 - alpha; |
| 314 | 314 | int x; |
| 315 | 315 | |
| 316 | − src *= alpha; | |
| 317 | 316 | if (left) { |
| 318 | 317 | unsigned suba = (left * alpha) >> hsub; |
| 319 | 318 | *dst = (*dst * (0x1010101 - suba) + src * suba) >> 24; |