diff options
author | Indrajit Das <[email protected]> | 2018-01-10 15:13:37 +0530 |
---|---|---|
committer | Christian König <[email protected]> | 2018-01-16 10:51:15 +0100 |
commit | 338638a8afc9f330bacc1cdd7e6392a3ea9d828a (patch) | |
tree | 515c3a1a33ea925902278a7021f03d988d2d5e8b | |
parent | f5277e84925b69b0bf01340122684becd45c1f7d (diff) |
st/va: clear pointers for mpeg2 quantiser matrices
This is to fix VA-API issues with GStreamer and MPEG2.
Since gstreamer does not pass quantiser matrices with each frame, invalid
pointers were being passed to the driver. This patch addresses the same.
Signed-off-by: Indrajit Das <[email protected]>
Reviewed-by: Christian König <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/va/picture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 895157375a6..23a4b524d7b 100644 --- a/src/gallium/state_trackers/va/picture.c +++ b/src/gallium/state_trackers/va/picture.c @@ -57,6 +57,11 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende return VA_STATUS_ERROR_INVALID_CONTEXT; } + if (u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_MPEG12) { + context->desc.mpeg12.intra_matrix = NULL; + context->desc.mpeg12.non_intra_matrix = NULL; + } + surf = handle_table_get(drv->htab, render_target); mtx_unlock(&drv->mutex); if (!surf || !surf->buffer) |