From 9d9afcb5bac2931d4b8e6d1aa571e941c5110c90 Mon Sep 17 00:00:00 2001 From: Christian König Date: Tue, 10 Jan 2012 14:03:28 +0100 Subject: vl: reintroduce PIPE_VIDEO_CAP_PREFERED_FORMAT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create the video buffers in the format the driver preffers. This temporary creates problems with decoder less VDPAU video playback. Signed-off-by: Christian König --- src/gallium/state_trackers/vdpau/surface.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gallium/state_trackers/vdpau') diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index 206a8397e9f..60cbbed2769 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -74,7 +74,12 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, p_surf->device = dev; memset(&tmpl, 0, sizeof(tmpl)); - tmpl.buffer_format = PIPE_FORMAT_YV12; + tmpl.buffer_format = dev->context->pipe->screen->get_video_param + ( + dev->context->pipe->screen, + PIPE_VIDEO_PROFILE_UNKNOWN, + PIPE_VIDEO_CAP_PREFERED_FORMAT + ); tmpl.chroma_format = ChromaToPipe(chroma_type); tmpl.width = width; tmpl.height = height; -- cgit v1.2.3