mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 04:52:09 +00:00
lavfi/drawutils: fix blending computation in blend_line function
If width is not alligned with hsub, background component should only be multiplied once by sub alpha component.
This commit is contained in:
parent
f27eb1b702
commit
be0a67bd65
@ -313,7 +313,6 @@ static void blend_line(uint8_t *dst, unsigned src, unsigned alpha,
|
|||||||
unsigned tau = 0x1010101 - alpha;
|
unsigned tau = 0x1010101 - alpha;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
src *= alpha;
|
|
||||||
if (left) {
|
if (left) {
|
||||||
unsigned suba = (left * alpha) >> hsub;
|
unsigned suba = (left * alpha) >> hsub;
|
||||||
*dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;
|
*dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;
|
||||||
|
Loading…
Reference in New Issue
Block a user