On Mon, 4 Feb 2002, Steve Kirkendall wrote:
> I wrote an XMMS visualization plugin called Blursk a couple of years ago.
> Now I'm trying to add support for full-screen output via XVideo, with mixed
> success.
>
> First the details: I'm running XFree86 4.1.0 under SuSE Linux 7.3. My
> video card is a Voodoo3/3000 AGP. I normally run it at a resolution of
> 1600x1200, 16bpp.
>
> The good news is, I can now display a 400x300 image full-screen. I can
> even display it on the root window, like animated wallpaper. The speed is
> good -- about as fast as in a window. It looks pretty damn cool.
>
> The bad news is, there are some quirks. The biggest and scariest is that
> the X server dies if I try some image sizes. There doesn't seem to be
> any pattern to it. Odd, even, larger, smaller, same aspect ratio, wide
> aspect ratio... They all stand a good chance of killing the server. By
> strategically adding XSync() calls and fprintf() calls to the code, I've
> been able to determine that it is dying while processing an XvPutImage()
> or XvShmPutImage() request. (The use of shared memory apparently makes
> no difference.)
>
> This has to be a bug in the X server, XVideo extension, or TDFX driver.
> There's no way a client should be able to kill the server. But DVD
> player software is able to use 720x480 images without trouble, so there
> must be something I'm doing that's weird.
>
> I'm appending my alloc_image() function, below. The rest of the
> initialization code doesn't care about the image size, so I don't think
> it can be faulty. And the Xv[Shm]PutImage() calls are too simple to have
> any bugs this subtle in them, so I'm pretty sure there must be something
> wrong in the image allocation.
The X-server should never crash. It's probably a problem in the
driver though, since I've not seen problems like you describe on
other hardware.
>
> The image format is always packed YUV, 16 bits per pixel, in YUYV order.
> If that matters. I wouldn't be surprised to learn that DVD players used
> a planar layout, or something like that.
They usually use planar.
>
> Other issues include:
>
> * Although "xvinfo" reports a maximum image size of 2048x2048, the width
> is actually limited to 1024. I haven't stress tested the height. The
> width thing is actually a little weird -- if I request a 1280x480
> image buffer, it doesn't fail; it just gives me a 1024x480 image buffer.
> Is this normal?
In the code, the driver is obviously advertising 2048x2048 and
yet clamping all sizes to 1024x1024. One of those is in error.
I'd be surprised if a voodoo card could do 2048x2048. It's
one of the worst overlay hardware. Doesn't seem to do the correct
YUV->RGB colorspace conversion either (ie. not CCIR601).
>
> * Filtering (to smooth out the enlarged pixels) is not performed when
> I'm running the display at my usual resolution of 1600x1200. If I
> switch resolutions via <Ctrl-Alt-KPPlus> and <Ctrl-Alt-KPMinus>,
Hardware limitations. 3dfx hardware can't scale in "2x" mode if I
remember correctly.
> the smoothing seems to kick in at 1024x768. This is true for DVD
> player programs too, not just my XMMS plugin. But is there some way
> I can detect this? DVDs look better when played with filtering in a
> 1024x768 screen than they do unfiltered in a 1600x1200 screen.
There's no way to detect that. Ideally, DVD's would look best
at 720x480 without scaling.
>
> * By the way, is this extension officially called "XVideo" or "Xv"? It
> seems to be listed both ways, in different places.
Not clear exactly. The extension string says XVideo, but even
DEC's original docs usually refer to it as Xv.
>
> * I've noticed that, on my Voodoo3 at least, XVideo uses color #0000f8
> as a mask color. This is pretty cool, because if I run Blursk in the
> root window, I can then use color #0000f8 to let the Blursk animation
> shine through. For example, "xterm -fg white -bg '#0000f8'" gives me
> an xterm with a transparent background. Is this standard? Does XVideo
> always use color #0000f8 for this? If the color varies, how can I find
> out what it is? Blursk users might have fun with this.
A color key is standard on overlay adaptors. Not only can you
query it but you can change it programatically. There is a
standard XV_COLORKEY port attribute which you can query and set.
If the attribute doesn't exist or is marked read-only, you can't
change it. See xc/doc/hardcopy/Xv/video in the server tree on
querying attributes.
Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert