[Xorg] Implementing "Xv" extension on DDX which don't supportit in hardware...

Eric Anholt eta at lclark.edu
Sun Jul 11 12:46:51 PDT 2004


On Sun, 2004-07-11 at 12:28, Roland Mainz wrote:
> Alan Cox wrote:
> > > Is there a way to implement the "Xv" extension on hardware which doesn't
> > > support it (for example Xnest, Xvfb etc.) ?
> > 
> > I guess since nobody can see the display in Xvfb a "correct"
> > implementation would be to offer Xv overlays that have no-op functions
> > (and anyone reading back the fb - well its a hardware overlay so you
> > dont see the data ;))
> 
> Dumb question:
> I cannot implement "Xv" in a way like Mesa implements GLX for Xvfb (e.g.
> push images via XPutImage()), right ?
> 
> Are the "Xv" overlays _required_ to leave the underlying framebuffer
> contents intact ?

No, most XV implementations paint a color key on the underlying
framebuffer, so you typically don't read back the video if you do a
screenshot, for example.

> > For Xnest there is certainly nothing preventing it providing you go off
> > and write enough code. Xnest is an Xwindow, that means the Xv layer of
> > the master X server is perfectly capable of handling an Xv subwindow in
> > the Xnest window - you just have to get all the overlay offsets correct
> > and propogate the functionality.
> 
> What if the underlying Xserver does not support "Xv" ?

Then implement the conversion/scaling in software, or don't expose it.

One thing I've been talking with Kieth about is possibly supporting YUV
surfaces in Render.  I could see making them "special" so that YUV isn't
a valid target to render to (no hardware I know of implements it), and
the software implementation for reading would still be slow, but it
would be nice in that you could have a single xv implementation in your
DDX that just called to Render (hardware-accelerated on most drivers) to
do the drawing.  And of course leave the old XV support around for
hardware that can't handle it.

(note that to do this well we do need more work to deal with vsync, but
that's needed anyway)

-- 
Eric Anholt                                eta at lclark.edu          
http://people.freebsd.org/~anholt/         anholt at FreeBSD.org






More information about the xorg mailing list