# Xvideo problem

**URL:** <https://discourse.libsdl.org/t/xvideo-problem/6431>\
**Category:** SDL Development\
**Created:** [April 15, 2002, 10:24am UTC](https://discourse.libsdl.org/t/xvideo-problem/6431 "2002-04-15T10:24:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabor](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/8797f3/32.png) [@gabor](https://discourse.libsdl.org/u/gabor)\
**Post date:** [April 15, 2002, 10:24am UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/1 "2002-04-15T10:24:00Z")

</div>

hi,

i don’t know if this is the best place to ask…

i’m using mplayer, which is a linux media mplayer.

it has many output modes, like x11, xvideo , aa and sdl.

i’m using a tnt2 32mb card in a relatively high resolution 1408x1056…

the problem is that when playing movies, x11 output is ok, but xvideo  
output is broken… i can see thin horizontal lines in the movie window,  
and even next to the movie window…

because of that, i was using the sdl mode to watch the videos, it worked  
without problems … this was sdl 1.2.3

then 1.2.4 arrived… i installed it , and now it displays the movies  
with the same errors as mplayer’s xvideo mode…

so something got wrong… or maybe my card is broken, but either way,  
with sdl1.2.3 i can watch my movies and 1.2.4 not… i know it’s hard to  
find the place where it broke… are there any daily snapshots or  
something like that?

bye,  
gabor

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [April 15, 2002, 11:00am UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/2 "2002-04-15T11:00:01Z")

</div>

> hi,

> i don’t know if this is the best place to ask…

> i’m using mplayer, which is a linux media mplayer.

> it has many output modes, like x11, xvideo , aa and sdl.

> i’m using a tnt2 32mb card in a relatively high resolution 1408x1056…

> the problem is that when playing movies, x11 output is ok, but xvideo  
> output is broken… i can see thin horizontal lines in the movie window,  
> and even next to the movie window…

> because of that, i was using the sdl mode to watch the videos, it worked  
> without problems … this was sdl 1.2.3

> then 1.2.4 arrived… i installed it , and now it displays the movies  
> with the same errors as mplayer’s xvideo mode…

> so something got wrong… or maybe my card is broken, but either way,  
> with sdl1.2.3 i can watch my movies and 1.2.4 not… i know it’s hard to  
> find the place where it broke… are there any daily snapshots or  
> something like that?

Probably what’s happening is that there is a bug in your card’s XVideo  
driver, and SDL is now using XVideo support on your card. You can disable  
it by setting the environment variable SDL\_VIDEO\_YUV\_HWACCEL to 0.

Please let me know if that works.

See ya,  
-Sam Lantinga, Software Engineer, Blizzard Entertainment

---

<div class="post-metadata">

**Author:** ![gabor](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/8797f3/32.png) [@gabor](https://discourse.libsdl.org/u/gabor)\
**Post date:** [April 15, 2002, 11:18am UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/3 "2002-04-15T11:18:01Z")

</div>

> > hi,
> 
> > i don’t know if this is the best place to ask…
> 
> > i’m using mplayer, which is a linux media mplayer.
> 
> > it has many output modes, like x11, xvideo , aa and sdl.
> 
> > i’m using a tnt2 32mb card in a relatively high resolution 1408x1056…
> 
> > the problem is that when playing movies, x11 output is ok, but xvideo  
> > output is broken… i can see thin horizontal lines in the movie window,  
> > and even next to the movie window…
> 
> > because of that, i was using the sdl mode to watch the videos, it worked  
> > without problems … this was sdl 1.2.3
> 
> > then 1.2.4 arrived… i installed it , and now it displays the movies  
> > with the same errors as mplayer’s xvideo mode…
> 
> > so something got wrong… or maybe my card is broken, but either way,  
> > with sdl1.2.3 i can watch my movies and 1.2.4 not… i know it’s hard to  
> > find the place where it broke… are there any daily snapshots or  
> > something like that?
> 
> Probably what’s happening is that there is a bug in your card’s XVideo  
> driver, and SDL is now using XVideo support on your card. You can disable  
> it by setting the environment variable SDL\_VIDEO\_YUV\_HWACCEL to 0.
> 
> Please let me know if that works.

no ☹

of course it eliminates the problem, but i got worse quality than  
before…

by now, i have sdl-1.2.3 and sdl-1.2.4 on my computer and just make  
install/make uninstall them to test…

so i make installed 1.2.4 … it was broken… i used  
SDL\_VIDEO\_YUV\_HWACCEL=0, it wasn’t broken but it had bad quality…

now i uinstalled it, and installed 1.2.3

great quality without problems… then i tried YUV\_HWACCEL=0, and i got  
the same correct, but bad quality picture as with 1.2.4…

so to summarize it:  
the problem lies somewhere in xvideo, but 1.2.3 uses xvideo too, and  
there it works, and in 1.2.4 it doesn’t

bye,  
gaborOn Mon, 2002-04-15 at 13:59, Sam Lantinga wrote:

> See ya,  
> -Sam Lantinga, Software Engineer, Blizzard Entertainment
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [April 15, 2002, 2:23pm UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/4 "2002-04-15T14:23:00Z")

</div>

> so to summarize it:  
> the problem lies somewhere in xvideo, but 1.2.3 uses xvideo too, and  
> there it works, and in 1.2.4 it doesn’t

Okay, one more thing to try:  
Edit src/video/x11/SDL\_x11yuv.c and uncomment the line:  
#define USE\_LAST\_ADAPTOR

See ya,  
-Sam Lantinga, Software Engineer, Blizzard Entertainment

---

<div class="post-metadata">

**Author:** ![gabor](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/8797f3/32.png) [@gabor](https://discourse.libsdl.org/u/gabor)\
**Post date:** [April 15, 2002, 3:53pm UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/5 "2002-04-15T15:53:00Z")

</div>

> > so to summarize it:  
> > the problem lies somewhere in xvideo, but 1.2.3 uses xvideo too, and  
> > there it works, and in 1.2.4 it doesn’t
> 
> Okay, one more thing to try:  
> Edit src/video/x11/SDL\_x11yuv.c and uncomment the line:  
> #define USE\_LAST\_ADAPTOR

it didn’t help ☹

i was browsing the cvs via web… i tried to find out what changed  
between 1.2.3 and 1.2.4

i focused on src/video/x11…

as i can see nothing really changed except on  
Fri Jan 18…  
"  
I benchmarked with and without clipping UpdateRects and was unable to  
find  
any difference on my moderately slow machine. Anyway, I haven’t added  
clipping in this patch, but fixed a couple of bugs and generally cleaned  
up some of the X11 image code. Most importantly, UpdateRects now checks  
for both zero height and width. Also, I eliminated the entire code to  
byteswap X11 images since X11 can do that automatically if you ask it  
nicely 🙂  
"

as i understand in 1.2.3 sdl was doing something and in 1.2.4 it was  
left to x11… maybe this could be the problem for me?

bye,  
gabor

p.s: blizzard is using sdl? :-)On Mon, 2002-04-15 at 17:22, Sam Lantinga wrote:

> See ya,  
> -Sam Lantinga, Software Engineer, Blizzard Entertainment
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![Mark\_Grant](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Mark\_Grant](https://discourse.libsdl.org/u/Mark_Grant)\
**Post date:** [April 15, 2002, 6:37pm UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/6 "2002-04-15T18:37:01Z")

</div>

Ok I’ve kind of got things working… But I think it’s set up badly  
because not everything is working and #include “SDL.h” isn’t  
working, I still need to do SDL/SDL.h

I think my problems are rooted back to sdl-config… I’m not sure if  
it’s being processed at all, and even if it is it refuses to be called  
under any circumstances for purposes of --lib and --cflags … I’ve  
tried going into the directory WITH the file and running through sh  
and it still says it can’t find the file.

One thing I’ve noticed is that when I’m in /usr/bin and do any cyg-  
unix commands such as ‘ls’ it will list /bin rather than /usr/bin

I’m not totally sure this is the reason but I have my suspicions that  
it might be related somehow.

Just to clarify: I’ve gotten programs which do absolutely nothing  
except load SDL.h to work, but have yet to compile something that  
actually does anything.

Any further assistance would be greatly appreciated.

Thanks in advance,  
Mark

---

<div class="post-metadata">

**Author:** ![Mark\_Grant](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Mark\_Grant](https://discourse.libsdl.org/u/Mark_Grant)\
**Post date:** [April 15, 2002, 7:24pm UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/7 "2002-04-15T19:24:01Z")

</div>

Well I think I’ve solved this problem by evading the use of the SDL-  
config file and manually entering the flags it was setting… But if  
anyone has any idea how I can get it to act properly I’d still  
appreciate it. Finally got some stuff to compile, thanks much for  
everyone’s help!

Mark

---

<div class="post-metadata">

**Author:** ![Zdenek\_Kabelac](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/z/258eb7/32.png) [@Zdenek\_Kabelac](https://discourse.libsdl.org/u/Zdenek_Kabelac)\
**Post date:** [April 16, 2002, 10:07am UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/8 "2002-04-16T10:07:02Z")

</div>

> hi,
> 
> it has many output modes, like x11, xvideo , aa and sdl.
> 
> i’m using a tnt2 32mb card in a relatively high resolution 1408x1056…

Ok I’ll try to answer your question.

Avifile has been solving this long time ago - and it has came up  
that relatively simple hack avoids this flickering problem

you just have to clear two lowest lines - that’s it - nothing else  
is needed - this is of course known to mplayer team for a long time  
so I’ve no idea why they didn’t included support for this into mplayer.

I’m not sure which NVidia driver do you use - is it the latest release ?  
I know that some initial driver have been suffering from this problem  
but I’ve thought that NVidia team managed to fix this bug.  
As the cards like GeForce2 or MX or whatever newer product do not  
show this problem it might be as well the hardware bug in TNT2 card  
(I’ve heard something like this initialy, but I would proabably bet  
on buggy X11 driver 🙂

Anyway Sam has removed the ugly have (which is goood)

- use the last Xv surface have - because in this case it will try to use  
textured Xv surface (I would have assumed that this shouldn’t have the  
behavior with flashing colors at the bottom of the window) -  
this hack has the side effect that the user couldn’t select  
Xv attributes for such surface like brigthness contrast hue saturation  
(actually the NVidia cards are the most advanced here!)

So Sam please do not reenable currently ‘disabled hack’ as there  
are easy solution for Tnt2 user (XClear for two lowest line)  
and most probably I would have though that using latest NVidia driver  
should solve the problem for Tnt2 user - if this is not true  
let me know gabor (in Slovak lang if you wish)

> then 1.2.4 arrived… i installed it , and now it displays the movies  
> with the same errors as mplayer’s xvideo mode…

again - it’s correct that SDL now behaves in the same way - because  
it’s finaly using real Xv (textured surfaces are nice extension,  
but that do not have the same amount of features)

> so something got wrong… or maybe my card is broken, but either way,

yeah - please try to report your problems on NVidia list if  
the problem remains even with latest driver (2880 I guess)

byeOn Mon, Apr 15, 2002 at 07:26:47PM -0400, gabor wrote:

–  
.‘’`. Which fundamental human right do you want to give up today? : :' : Debian GNU/Linux maintainer - www.debian.{org,cz} `. `' Zdenek Kabelac kabi@{debian.org, users.sf.net, fi.muni.cz} `- When in doubt, just blame the Euro. 🙂

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [April 17, 2002, 8:01am UTC](https://discourse.libsdl.org/t/xvideo-problem/6431/9 "2002-04-17T08:01:01Z")

</div>

Zdenek, thank you very much for your thorough explanation.

Gabor, if you have the problem with the latest NVidia drivers, please  
contact their technical support. In the meantime, you can use the hack  
in SDL\_x11yuv.c to work around the problem, but please don’t redistribute  
the library built with that hack enabled. Please let me know what happens. 🙂

Thanks,  
-Sam Lantinga, Software Engineer, Blizzard Entertainment
