about Xvideo support in glamor

Alex Deucher alexdeucher at gmail.com
Tue Jun 4 16:13:21 PDT 2013


On Tue, Jun 4, 2013 at 3:18 AM, bradpitt <hechuanbear at qq.com> wrote:
> I want to ask some questions about Xvideo.
> 1. What is the difference between overlay video and textured video adaptor?

A video overlay is generally part of the display hardware that can mix
data from two different surfaces within the display pipe.  Depending
on the capabilities of the video overlay it may be able to scale or
perform colorspace conversion.  Since the overlay is a separate plane,
the overlay data is never actually written to the graphics surface.
They are mixed in the display hardware.

Textured video uses the 3D engine on the card to perform scaling and
colorspace conversion.  The result is written to a buffer in memory.

You can mix textured video with the hardware overlay depending on what
you want to do.  E.g., use the 3D engine to do colorspace conversion
and then use the video overlay to scale and display the video on the
screen.


> 2. xf86-video-intel has implemented overlay video adaptor and textured video
> adaptor. If I want to add Xvideo adaptor in glamor, which should I use? can
> I implement putvideo function with I965DisplayVideoTextured() and
> intel_display_overlay() in glamor?

Since glamor implements X APIs using OpenGL, I'd recommend
implementing support for textured video.  That will work on all chips
regardless of what capabilities their hardware overlays have.  As for
your implementation, you can look at the intel or radeon drivers for
an idea of what callbacks and functions you need to implement, but the
actual work (scaling, colorspace conversion) needs to be done using
OpenGL.

Alex

>
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list