YUV overlay with large size picture

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

With software YUV overlay, all pics are normally drawn.

I’m developping on x11 on Debian linux, chipset is ATI RAGE XL
and using ati.2 driver(got at GATOS).

Anyone know how to fix this problem or have some idea ?

Best Regards,
Yohsuke Kumasaka

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

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,
YohsukeOn Wed, 19 Nov 2003 11:30:29 +0100 Gabriele Greco wrote: