[FFmpeg-cvslog] lavfi/drawutils: fix blending computation in blend_line function

Matthieu Bouron git at videolan.org
Sat Jan 5 13:21:54 CET 2013


ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at gmail.com> | Fri Jan  4 22:08:11 2013 +0100| [be0a67bd6508ccff81570a41ebe8169e34012c66] | committer: Nicolas George

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be0a67bd6508ccff81570a41ebe8169e34012c66
---

 libavfilter/drawutils.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index aefd09d..aebc000 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -313,7 +313,6 @@ static void blend_line(uint8_t *dst, unsigned src, unsigned alpha,
     unsigned tau = 0x1010101 - alpha;
     int x;
 
-    src *= alpha;
     if (left) {
         unsigned suba = (left * alpha) >> hsub;
         *dst = (*dst * (0x1010101 - suba) + src * suba) >> 24;



More information about the ffmpeg-cvslog mailing list