diff options
author | Christian König <[email protected]> | 2012-01-10 14:03:28 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-01-15 12:40:44 +0100 |
commit | 9d9afcb5bac2931d4b8e6d1aa571e941c5110c90 (patch) | |
tree | d4b2c3bb9a84db7f4b6a9ea07309a00e746be44c /src/gallium/state_trackers | |
parent | d6aa0ad55dc245bfacb7d9c3b479fe5a6557d43f (diff) |
vl: reintroduce PIPE_VIDEO_CAP_PREFERED_FORMAT
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 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 7 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xvmc/surface.c | 7 |
2 files changed, 12 insertions, 2 deletions
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; diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c index 06a3eb963ad..f1c32714cc6 100644 --- a/src/gallium/state_trackers/xorg/xvmc/surface.c +++ b/src/gallium/state_trackers/xorg/xvmc/surface.c @@ -175,7 +175,12 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac return BadAlloc; memset(&tmpl, 0, sizeof(tmpl)); - tmpl.buffer_format = PIPE_FORMAT_NV12; + tmpl.buffer_format = pipe->screen->get_video_param + ( + pipe->screen, + PIPE_VIDEO_PROFILE_MPEG2_MAIN, + PIPE_VIDEO_CAP_PREFERED_FORMAT + ); tmpl.chroma_format = context_priv->decoder->chroma_format; tmpl.width = context_priv->decoder->width; tmpl.height = context_priv->decoder->height; |