[MPlayer-dev-eng] [PATCH] libass improvements and fixes

Grigori G greg at chown.ath.cx
Sat Feb 7 04:27:18 CET 2009


Evgeniy Stepanov wrote:
> It's not a fix, it's a regression. It adds a little transparency between the 
> border and the actual glyph. It happens because in current implementation 
> bitmaps are blitted one by one to a video frame. Suppose for some pixel 
> opacity(glyph) = opacity(border) = 1/2. After blitting first bitmap we have 1/2 
> glyph color and 1/2 background color. After blitting the second one we have 
> 1/4 glyph color, 1/4 background color and 1/2 border color. That looks ugly.
>

I just noticed the change in svn (rev. 20890) that introduced this fix
I consider a bug. I actually came up with the regression myself.

I still think that the "fix" you introduced breaks aa sometimes (esp. 
against white background) -- please compare toradora-old.png and 
toradora-new.png at
http://greg.geekmind.org/mplayer/ (the gray text in the top left)
The antialiasing on toradora-old.png is very ugly and that's with your
fix. Without it, e.g. with my regression it looks a lot better. OTOH the 
code I propose makes antialiasing a bit uglier sometimes with different 
color combinations.

How about a compromise, e.g.
	o[x] = (c_o > c_g) ? c_o - c_g/2 : 0;
which looks okay, but not great, with any color combination. Yeah, I'm 
serious. :)

Grigori




More information about the MPlayer-dev-eng mailing list