[MPlayer-dev-eng] [PATCH] libass support in vf_vo
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Sat Aug 26 00:30:28 CEST 2006
On Saturday 26 August 2006 00:29, Reimar Döffinger wrote:
> See attach for something to test. It still needs some cleanup, fixing,
> ifdefs etc. but still.
> And you explain how the color entry in ass_imag e_t is exactly defined?
> I have no clue if my way is correct for bigendian, and the alpha value
> does not at all work as expected.
#define _r(c) ((c)>>24)
#define _g(c) (((c)>>16)&0xFF)
#define _b(c) (((c)>>8)&0xFF)
#define _a(c) ((c)&0xFF)
Alpha of 255 means a transparent pixel, 0 means a solid pixel.
In bitmap it's exactly opposite: transparent pixels are 0.
In vf_ass it is used like this:
opacity = 255 - _a(color)
k = bitmap[stride * i + j] * opacity / 255
The resulting color is
(k/255) * image_color + ((255-k)/255) * bg_color
I'm getting "Too many OSD parts, contact the developers!" message.
MAX_OSD_PARTS is too low. In libass, every glyph produces at least 2 images:
the glyph and its outline (border), so the total number of images can easily
reach 300 and more.
More information about the MPlayer-dev-eng
mailing list