[MPlayer-dev-eng] I'm going crazy...

Michael Niedermayer michaelni at gmx.at
Thu Oct 10 01:18:40 CEST 2002


Hi

On Thursday 10 October 2002 00:33, Per Wigren wrote:
> 1) Please tell me how to blend YUV using an alpha value of 0-255... I've
> been trying all evening, but I can't make U and V blend... :((
a= alpha/255.0
y' = y1*a + y2*(1.0-a)
u' = u1*a + u2*(1.0-a)
v' = v1*a + v2*(1.0-a)

u could allso use
y' = (y1*alpha + y2*(256-alpha) + 128)>>8
...
if alpha had a range from 0-256

btw, black in YUV = (16, 128, 128)
 and white in YUV = (235, 128, 128)

[...]

Michael



More information about the MPlayer-dev-eng mailing list