History

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.

Matthieu Bouron committed 13 years ago

Commit be0a67b1 parent f27eb1b1 file · +0 −1Browse files

Unified · Split

libavfilter/drawutils.c+0−1
@@ -313,7 +313,6 @@ static void blend_line(uint8_t *dst, unsigned src, unsigned alpha, · 312 unmodified lines
313 unsigned tau = 0x1010101 - alpha;313 unsigned tau = 0x1010101 - alpha;
314 int x;314 int x;
315 315
316 src *= alpha;
317 if (left) {316 if (left) {
318 unsigned suba = (left * alpha) >> hsub;317 unsigned suba = (left * alpha) >> hsub;
319 *dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;318 *dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t