[SDL] YUV overlay with large size picture

Gabriele Greco gabrielegreco at tin.it
Fri Nov 21 22:27:01 PST 2003

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


match the width that you request, this is not always true since some 
chipsets may have alignment restrictions.


More information about the SDL mailing list