st/vdpau: add h264 decoder level support
authorLeo Liu <leo.liu@amd.com>
Thu, 12 Mar 2015 18:09:49 +0000 (14:09 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 28 Apr 2015 15:42:29 +0000 (17:42 +0200)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/decode.c

index 767d311412552675a4d1c8b99cfb77e60ec8e3b2..0634ba72fda8aa49b49d1db69434bc705667c6c9 100644 (file)
@@ -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) {