On Mon, Jul 14, 2003 at 09:11:22PM +1200, Simon Glass wrote:
> On Sun, 13 Jul 2003 13:49:14 +0300, Ville Syrj�l� <[EMAIL PROTECTED]> wrote:
> 
> > On Sun, Jul 13, 2003 at 09:31:37PM +1200, Simon Glass wrote:
> >> 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?
> 
> > 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.
> 
> Thanks very much for the advice - am trying this first with the colour- 
> keying idea as a backup. On my G400 card this punts me to software 
> (gfx/generic/generic.c) which gives an error. I suspect blitting from YUV 
> to RGB is only supported in the G450, so will try that.

G400-G550 all have the same accelerator features. Even G200 can do this
but it only supports YUY2 whereas G400 and better also support UYVY.

So the data must be YUY2/UYVY and it must be located in video RAM
for hw accel to kick in.
If you don't need to read from the YUV and RGB overlay surfaces you can
create them with DSCAPS_VIDEOONLY. This will guarantee that hw accel will
work.
But if you do need to read from the surfaces don't specify DSCAPS_*ONLY.
This way DirectFB will automagically copy the unscaled images to video RAM
before the accelerator performas the blit. Unless of course you don't 
have enough video RAM left in which case it will fall back to software.
As you noticed YUV<->RGB software accel isn't implemented.

-- 
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