From 2d4a890c0b763ae3feb7af9255d6d92baa9cfe57 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 12 Mar 2015 14:29:21 -0400 Subject: [PATCH] st/va: add h264 decoder level support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leo Liu Reviewed-by: Christian König --- src/gallium/state_trackers/va/context.c | 5 +++++ 1 file changed, 5 insertions(+) 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);