[SDL] YUV overlay with large size picture

Kumasaka Yohsuke kumasaka at nippon-control-system.co.jp
Tue Nov 25 01:41:02 PST 2003


On Wed, 19 Nov 2003 11:30:29 +0100
Gabriele Greco <gabrielegreco at tin.it> wrote:

> Kumasaka Yohsuke wrote:
> > Hi all.
> > 
> > I'm trying to draw YUV (YUY2) pics with hardware YUV overlay.
> > Problem is, with large size YUV picture, it couldn't draw normally.
> > I tried with four sizes; 400x300, 640x480, 800x600 and 1024x768,
> > and following results.
> > 
> > 400x300:   Normally drawn.
> > 640x480:   Normally drawn.
> > 800x600:   Left side of window (about 80%) is normally drawn.
> >            Right side fo window (about 20%) is colorful noise (not static).
> > 1024x768:  Not normally drawn at all.
> >            Left side of window (about 70%) is vertical stripe of some colors.
> >            Right size of window (about 30%) is colorful noise (not static).
> 
> When you get a YUV surface with SDL_CreateYUVSurface you should also 
> check that the three values (possibly with the surface locked):
> 
> surface->pixels[0]
> surface->pixels[1]
> surface->pixels[2]
> 
> match the width that you request, this is not always true since some 
> chipsets may have alignment restrictions.
> 
> Bye,
>   Gabry

Thank you for your advice.
Did you mean surface->pitches[] (not surface->pixels[]) ?
Yes, It just matched with surface->w(x2).

Now, the problem was fortunately solved thanks to everyone.
Here, I report the cause.

They say, RAGE XL video chip doesn't support YUVOverlay with
width over 768 (it's not writen in docs...). And since the driver
doesn't notice about it and forced to write video ram. So the
problem occured.

I tried with newly bought higher grade video card(radeon7500),
it's successfully drawn.

Bye,
  Yohsuke




More information about the SDL mailing list