[MPlayer-dev-eng] [PATCH] OSD through EOSD

Nicolas George nicolas.george at normalesup.org
Fri Aug 13 01:09:39 CEST 2010


Le sextidi 26 thermidor, an CCXVIII, Reimar Döffinger a écrit :
> What else to call it? It is alpha, it just has a special optimized
> representation.

Maybe "transparency", since it is exaactly that. Well, that is a minor point
anyway.

> And the value is not pre-multiplied, it is clamped to avoid overflow.

In osd_template, the formula is:
	out = ((in * srca) >> 8) + src
AFAIK, that means that srca = 1 - alpha (×256) and src = alpha * value.

Well, I will have to check in the other parts of the code to see if it is
actually supposed to be that.

> As said it does not overflow due to explicit clamping.
> This means the current blending is actually incorrect for most cases.
> Which is why I said that it may not be a good idea to try to match
> the OSD behaviour too much, still this should be a difference.
> And it is also why I think your method of calculating dm is
> over-complicated: I involves one division per without (I think)
> actually gaining any accuracy over e.g. v == a ? 255 : v.

I wanted to get my patch working as exactly like the old renderers as
possible, assuming, against all evidence, that they were doing the right
thing. You are certainly right about it not being actually necessary nor
desirable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100813/d2fe9fcc/attachment.pgp>


More information about the MPlayer-dev-eng mailing list