Hi Andy,

Am 19.01.2017 um 11:46 schrieb Andy Furniss:
I think you are right about the slices, the failing vids are blu-ray/tv.

https://drive.google.com/file/d/0BxP5-S1t9VEEZlozcjVUZ1lDbWM/view?usp=sharing

Thanks for the link, if you have time please give the attached patch a try.

It should fix the issue, but I currently don't have a test system for VAAPI ready so I can't confirm it of hand.

Thanks,
Christian.
>From 6076a9a095b435add036a01ea1769e29b7e3cddb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koe...@amd.com>
Date: Thu, 19 Jan 2017 13:44:34 +0100
Subject: [PATCH] st/va: make sure that we call begin_frame() only once
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This fixes "st/va: delay calling begin_frame until we have all parameters".

Signed-off-by: Christian König <christian.koe...@amd.com>
---
 src/gallium/state_trackers/va/picture.c    | 9 ++++++---
 src/gallium/state_trackers/va/va_private.h | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
index dc7121c..e75006d 100644
--- a/src/gallium/state_trackers/va/picture.c
+++ b/src/gallium/state_trackers/va/picture.c
@@ -81,7 +81,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
    }
 
    if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE)
-      context->decoder->begin_frame(context->decoder, context->target, &context->desc.base);
+      context->needs_begin_frame = true;
 
    return VA_STATUS_SUCCESS;
 }
@@ -308,8 +308,11 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
    sizes[num_buffers] = buf->size;
    ++num_buffers;
 
-   context->decoder->begin_frame(context->decoder, context->target,
-      &context->desc.base);
+   if (context->needs_begin_frame) {
+      context->decoder->begin_frame(context->decoder, context->target,
+         &context->desc.base);
+      context->needs_begin_frame = false;
+   }
    context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base,
       num_buffers, (const void * const*)buffers, sizes);
 }
diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h
index 8faec10..0877236 100644
--- a/src/gallium/state_trackers/va/va_private.h
+++ b/src/gallium/state_trackers/va/va_private.h
@@ -261,6 +261,7 @@ typedef struct {
    int target_id;
    bool first_single_submitted;
    int gop_coeff;
+   bool needs_begin_frame;
 } vlVaContext;
 
 typedef struct {
-- 
2.7.4

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

Reply via email to