diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-16 21:11:33 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-16 21:32:09 +0100 |
commit | 85e89f2121bad96d34ff8df9456e2fbaa9ff7881 (patch) | |
tree | c7b0bb3474beef89bef04dfeffee791a3fa15f00 /src/sna/sna_video_overlay.c | |
parent | c610d37dae7e025027fd09a6889bf94853af8b8c (diff) |
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_overlay.c')
-rw-r--r-- | src/sna/sna_video_overlay.c | 13 |
1 files changed, 11 insertions, 2 deletions
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 */ |