[Mesa-dev] [PATCH 2/6] st/vdpau: add h264 decoder level support

Marek Olšák maraeo at gmail.com
Mon Apr 20 15:31:10 PDT 2015


From: Leo Liu <leo.liu at amd.com>

Signed-off-by: Leo Liu <leo.liu at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
---
 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 767d311..0634ba7 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.1.0



More information about the mesa-dev mailing list