On Sun, Jul 13, 2003 at 09:31:37PM +1200, Simon Glass wrote:
> Hi,
> 
> I may have the wrong end of the stick but I'm looking for some advise 
> please!
> 
> Short version:
>    - 1024x768 screen mode on Matrox G400/G450
>    - Need a 352x288 YUV surface scaled to full screen (easy enough)
>    - Alpha-blended 1024x768 RGB surface on top (hard)
>    - How?
> 
> Long version:
> 
> Not sure if anyone is familiar with mplayer, but basically its directfb 
> backend sets up a YUV layer which it scales to full screen size.
> 
> For example, in my case I have a 352x288 YUV surface (layer 1 on the Matrox 
> G400) scaled to 1024x768 for display. The card seems to do that and all is 
> well (and very fast).
> 
> But I would like to overlay an RGB 1024x768 image on top of the video, 
> alpha blended. I have tried getting a surface for layer 0, but this fails, 
> perhaps because layer 1 is set for exclusive access. I can't seem to blit 
> to my YUV surface and everything operates at the lower resolution.

You can't make layer 0 (CRTC1) appear on top of layer 1 (BES). It's a
hardware limitation.

What you could do is ignore the BES altogether and just use CRTC1. The
hardware can StretchBlit from YUV surfaces to RGB surfaces. This is what I
do in the dfbmga driver because CRTC2 doesn't have a hardware scaler.

So set layer 0 to RGB. Create one YUV surface for the video and one RGB
surface for the overlay. Then just blit the surfaces to layer 0's surface.

-- 
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/


--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-users" as subject.

Reply via email to