[Mesa-dev] [PATCH v4 4/6] st/va: properly set max number of ref frames
Julien Isorce
j.isorce at samsung.com
Wed Sep 16 05:22:24 PDT 2015
It fixes asserts like assert(templ->max_references <= 2);
in nvc0_video.c::nvc0_create_decoder
Signed-off-by: Julien Isorce <j.isorce at 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
More information about the mesa-dev
mailing list