From d043b51ba47688044b1a09a6023093a90ad62e6a Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 12 Mar 2015 14:09:49 -0400 Subject: [PATCH] st/vdpau: add h264 decoder level support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Leo Liu Reviewed-by: Christian König --- src/gallium/state_trackers/vdpau/decode.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 767d3114125..0634ba72fda 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -118,6 +118,11 @@ vlVdpDecoderCreate(VdpDevice device, templat.height = height; templat.max_references = max_references; + 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); + vldecoder->decoder = pipe->create_video_codec(pipe, &templat); if (!vldecoder->decoder) { -- 2.30.2