From 85e89f2121bad96d34ff8df9456e2fbaa9ff7881 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 16 Aug 2013 21:11:33 +0100 Subject: sna/video: YUV420 is not supported by sprites, replace it with a RGB passthrough As YUV420 is not supported by any of the current sprite implementations drop it. Instead implement some RGB passthroughs. Signed-off-by: Chris Wilson --- src/sna/sna_video_overlay.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/sna/sna_video_overlay.c') diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c index 434d11f4..7a5b5dbf 100644 --- a/src/sna/sna_video_overlay.c +++ b/src/sna/sna_video_overlay.c @@ -600,6 +600,7 @@ sna_video_overlay_query(ClientPtr client, int *offsets) { struct sna_video *video = port->devPriv.ptr; + struct sna_video_frame frame; struct sna *sna = video->sna; int size, tmp; @@ -624,9 +625,17 @@ sna_video_overlay_query(ClientPtr client, switch (format->id) { case FOURCC_XVMC: *h = (*h + 1) & ~1; + sna_video_frame_init(video, format->id, *w, *h, &frame); size = sizeof(uint32_t); - if (pitches) - pitches[0] = size; + if (pitches) { + pitches[0] = frame.pitch[1]; + pitches[1] = frame.pitch[0]; + pitches[2] = frame.pitch[0]; + } + if (offsets) { + offsets[1] = frame.UBufOffset; + offsets[2] = frame.VBufOffset; + } break; /* IA44 is for XvMC only */ -- cgit v1.2.3