It fixes asserts like assert(templ->max_references <= 2);
in nvc0_video.c::nvc0_create_decoder

Signed-off-by: Julien Isorce <j.iso...@samsung.com>
---
 src/gallium/state_trackers/va/context.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/va/context.c 
b/src/gallium/state_trackers/va/context.c
index 8b003ae..6357c28 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -165,13 +165,15 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID 
config_id, int picture_width,
    templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
    templat.width = picture_width;
    templat.height = picture_height;
-   templat.max_references = num_render_targets;
+   templat.max_references = 2;
    templat.expect_chunked_decode = true;
 
    if (u_reduce_video_profile(templat.profile) ==
-       PIPE_VIDEO_FORMAT_MPEG4_AVC)
+       PIPE_VIDEO_FORMAT_MPEG4_AVC) {
+      templat.max_references = 16;
       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) {
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to