[FFmpeg-soc] [soc]: r5797 - libavfilter/vf_overlay.c

bcoudurier subversion at mplayerhq.hu
Thu May 13 19:34:37 CEST 2010


Author: bcoudurier
Date: Thu May 13 19:34:36 2010
New Revision: 5797

Log:
correct rounding when alpha blending

Modified:
   libavfilter/vf_overlay.c

Modified: libavfilter/vf_overlay.c
==============================================================================
--- libavfilter/vf_overlay.c	Wed May 12 02:26:33 2010	(r5796)
+++ libavfilter/vf_overlay.c	Thu May 13 19:34:36 2010	(r5797)
@@ -212,7 +212,7 @@ static void copy_blended(uint8_t* out, i
         const uint8_t *aptr = alpha + (y<<vsub) * alpha_linesize;
         for (x = 0; x < w; x++) {
             uint8_t a = *aptr;
-            *optr = (*optr * (0xff - a) + *iptr * a) >> 8;
+            *optr = (*optr * (0xff - a) + *iptr * a + 128) >> 8;
             optr++;
             iptr++;
             aptr += 1 << hsub;


More information about the FFmpeg-soc mailing list