On Mittwoch, 28. Juli 2004 10:59, Kristof Pelckmans wrote:
> Quoting Stefan Lucke <[EMAIL PROTECTED]>:
> > Code is available via http://www.lucke.in-berlin.de
> > It is used in vdr-softdevice plugin. File of interest is video-dfb.c
> > (somewhere in .. tar.bz2) .
> I looked at your code and saw that you have 2 scenarios :
> YUY2 :
> osd rendering :
> - copy into srcSurface
> - srcSurface->Flip
> video rendering :
> - copy into videoSurface
> - videoSurface->Flip

That is the one where alpha blending is available.

> 
> YV12 || I420 :
> osd rendering :
> - copy into osdSurface
> - osdSurface->Flip
> video rendering :
> - copy into videoSurface
> - srcSurface->StretchBlit( videoSurface )
> - srcSurface->Blit( osdSurface ) (alpha blending)
> - srcSurface->Flip

Oh, in these formats I do no stretchblit and only colorkeyd OSD is present.
That is when OSD color == colorkey (black) I see video, else I see OSD.

> 
> Now I am still stuck with two questions :
> 1) I conclude that the alphablending will only work when you have a
> pixelformat YUY2 for your video surface ? 

Yes.

> Is this because your Matrox card
> does only support this for this pixelformat ? 

No my card support all 3 formats but stretchblit works for me only
in YUY2.

> If you don't have alphablending
> for this specific scenario, is there a fallback to software aided
> alphablending ?

There is some work in directfb for software emulated stretchblit, but
I didn't test that with a card that has not hw-stretchblit

> 2) What happens during the first scenario ? You do a flip on the primary
> surface, but is it shown when the video surface covers it ? Do you use
> destination color keying here ?

> 
> Thanks for your comments,

I'll put my answer on the list because my knowledge of dfb programming is
rather limited and someone my correct me if I'm wrong.


Stefan Lucke



Reply via email to