summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2015-03-12 14:29:21 -0400
committerMarek Olšák <[email protected]>2015-04-28 17:42:52 +0200
commit2d4a890c0b763ae3feb7af9255d6d92baa9cfe57 (patch)
treec0c83a600dcc754bb594dea4634cd31fb95badcf /src/gallium/state_trackers
parentb2596efeb767417f21ce45a411c56bb3ecc51620 (diff)
st/va: add h264 decoder level support
Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/va/context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index a7a55f96139..0a733b39004 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -167,6 +167,11 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width,
templat.max_references = num_render_targets;
templat.expect_chunked_decode = true;
+ if (u_reduce_video_profile(templat.profile) ==
+ PIPE_VIDEO_FORMAT_MPEG4_AVC)
+ templat.level = u_get_h264_level(templat.width, templat.height,
+ &templat.max_references);
+
context->decoder = drv->pipe->create_video_codec(drv->pipe, &templat);
if (!context->decoder) {
FREE(context);