[MPlayer-dev-eng] [patch] dvd navigation for 20020402

Arpi arpi at thot.banki.hu
Wed Apr 3 01:13:05 CEST 2002


Hi,

> Okay, here it is again, with:
> - static function back in input.c
> - cosmetics corrected in spudec.c
ok

> - hack part of linedrawing wrapped in #ifdef's
ehh
i said _remove_ or move it to another patch...
i don't want to commit that part of your patch to CVS now, as it's
ugly temporal hack just for testing and won't remain too long...

> I don't have much experience with actually drawing stuff on the screen (I 
> just know MPG file formats, etc), so I'd like to ask why this code doesn't 
> work in my line_draw function:
> 
> unsigned char bitmap[]={ 0xff, 0x00 };
> unsigned char alphamap[]={ 0x00, 0x00 };
> 
> draw_alpha(cx,cy,1,1,bitmap,alphamap,1);
> 
> Shouldn't this work?  At pixel cx,cy, draw a 1 pixel by 1 pixel item, 
> whose datatype is 1 byte wide.  alpha is 0 to drop what's already there, 
> and bitmap is 0xff to make it white?  Or have I misunderstood something 
> obvious?

not really
dunno if it's documenetd somewhere (afaik it is in tech0eng.txt at libvo osd
part), but alpha values are not the common 'alpha' numbers...

0 = left the original pixel (do not render osd pixel)
1 = only osd pixel is visible
...
128 = osd pixel and original pixel half-way blended
...
255 = only original pixel visible

it was done for better speed optimizations in C renderer code...
so, set alpha to 1 and bitmap to 255 to get white pixel!
and your idea will work then...


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list