summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xvmc
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-07-15 01:50:24 -0600
committerChristian König <[email protected]>2013-08-19 10:21:14 +0200
commit53e20b8b418cc85e13d70f41ce160e17847a5096 (patch)
treefab98050b72995f12e7126c3df148d5aaab77415 /src/gallium/state_trackers/xvmc
parentd13003f544417db6de44c65a0c118bd2b189458a (diff)
vl: use a template for create_video_decoder
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/xvmc')
-rw-r--r--src/gallium/state_trackers/xvmc/context.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c
index 23f9d10ca92..d6301335b4b 100644
--- a/src/gallium/state_trackers/xvmc/context.c
+++ b/src/gallium/state_trackers/xvmc/context.c
@@ -191,6 +191,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
Status ret;
struct vl_screen *vscreen;
struct pipe_context *pipe;
+ struct pipe_video_decoder templat = {};
XvMCContextPrivate *context_priv;
vl_csc_matrix csc;
@@ -244,14 +245,15 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
return BadAlloc;
}
- context_priv->decoder = pipe->create_video_decoder
- (
- pipe, ProfileToPipe(mc_type),
- (mc_type & XVMC_IDCT) ? PIPE_VIDEO_ENTRYPOINT_IDCT : PIPE_VIDEO_ENTRYPOINT_MC,
- FormatToPipe(chroma_format),
- width, height, 2,
- true
- );
+ templat.profile = ProfileToPipe(mc_type);
+ templat.entrypoint = (mc_type & XVMC_IDCT) ? PIPE_VIDEO_ENTRYPOINT_IDCT : PIPE_VIDEO_ENTRYPOINT_MC;
+ templat.chroma_format = FormatToPipe(chroma_format);
+ templat.width = width;
+ templat.height = height;
+ templat.max_references = 2;
+ templat.expect_chunked_decode = true;
+
+ context_priv->decoder = pipe->create_video_decoder(pipe, &templat);
if (!context_priv->decoder) {
XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL decoder.\n");