]> granicus.if.org Git - libass/commitdiff
Revert "Merge glyph and outline bitmap better"
authorGrigori Goronzy <greg@blackbox>
Tue, 1 Sep 2009 00:22:44 +0000 (02:22 +0200)
committerGrigori Goronzy <greg@blackbox>
Tue, 1 Sep 2009 00:22:44 +0000 (02:22 +0200)
This reverts commit d3cd5b0148d64ae0f6e288e69b09acfe639fdcce.
This hack improved blending in few situations, but at the same time
broke it in lots o others; get rid of it.

libass/ass_bitmap.c

index faddcf3905fef8ee9624082073bd7c024a3ee0da..e2018ce1b3b5c6bc1be8bcd2db0c497623ccad41 100644 (file)
@@ -261,7 +261,7 @@ static Bitmap *fix_outline_and_shadow(Bitmap *bm_g, Bitmap *bm_o)
             unsigned char c_g, c_o;
             c_g = g[x];
             c_o = o[x];
-            o[x] = (c_o > (3 * c_g) / 5) ? c_o - (3 * c_g) / 5 : 0;
+            o[x] = (c_o > c_g) ? c_o - (c_g / 2) : 0;
             s[x] = (c_o < 0xFF - c_g) ? c_o + c_g : 0xFF;
         }
         g += bm_g->w;