summaryrefslogtreecommitdiff
path: root/src/sna/sna_video.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-04-09 09:10:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-04-09 09:10:33 +0100
commit21294eaaf16a1e35fefe0f45a237826d38dc62eb (patch)
tree47ab9a15acce774d2b9629de467f659835d74b47 /src/sna/sna_video.h
parent86efddd9e4b921fcfc1a4b7492ba9174b84de64c (diff)
downloadxorg-driver-xf86-video-intel-21294eaaf16a1e35fefe0f45a237826d38dc62eb.tar.gz
sna/video: Expand passthrough support for overlay planes
The passthrough is actually a generic, albeit private, mechanism that anything can use to pass along a GEM handle for use with Xv. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video.h')
-rw-r--r--src/sna/sna_video.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sna/sna_video.h b/src/sna/sna_video.h
index c0c023cf..2e7144ec 100644
--- a/src/sna/sna_video.h
+++ b/src/sna/sna_video.h
@@ -35,6 +35,20 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SNA_XVMC 1
#endif
+/*
+ * Below, a dummy picture type that is used in XvPutImage
+ * only to do an overlay update.
+ * Introduced for the XvMC client lib.
+ * Defined to have a zero data size.
+ */
+#define XVMC_YUV { \
+ FOURCC_XVMC, XvYUV, LSBFirst, \
+ {'X', 'V', 'M', 'C', 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71}, \
+ 12, XvPlanar, 3, 0, 0, 0, 0, 8, 8, 8, 1, 2, 2, 1, 2, 2, \
+ {'Y', 'V', 'U', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \
+ XvTopToBottom \
+}
+
struct sna_video {
int brightness;
int contrast;
@@ -88,6 +102,11 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna, ScreenPtr screen);
#define FOURCC_XVMC (('C' << 24) + ('M' << 16) + ('V' << 8) + 'X')
+static inline int xvmc_passthrough(int id)
+{
+ return id == FOURCC_XVMC;
+}
+
static inline int is_planar_fourcc(int id)
{
switch (id) {