aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_video_state.h
diff options
context:
space:
mode:
authorJulien Isorce <[email protected]>2017-07-25 15:31:28 +0100
committerJulien Isorce <[email protected]>2017-08-14 13:40:19 +0100
commit91d93aa62162f98d6377e5c796b63faa263f2c18 (patch)
tree9df67ea3d8fcbbe7eff793363585a79591a9974f /src/gallium/include/pipe/p_video_state.h
parent3d8da1f678e196af619d74845f7d5f564ce40ea3 (diff)
st/va: change frame_idx from array to hash table
The picture_id was assumed to be a frame number so in 0-31. But the vaapi client gstreamer-vaapi uses the surfaces handles as identifier which are unsigned int. This bug can happen when using a lot of vaapi surfaces within the same process. Indeed Mesa/st/va increments a counter for the surface ID: mesa/util/u_handle_table.c::handle_table_add which starts from 0 and incremented by 1 at each call. So creating more than 32 surfaces was a problem. The following bug contains a test that reproduces the problem by running a couple of vaapih264enc in the same process. The above also explains why there was no pb when running them in separated processes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102006 Signed-off-by: Julien Isorce <[email protected]> Tested-by: Tomas Rataj <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-and-tested-by: Boyuan Zhang <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_video_state.h')
-rw-r--r--src/gallium/include/pipe/p_video_state.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index 39b39051648..53f9ab3d5e1 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -32,6 +32,7 @@
#include "pipe/p_format.h"
#include "pipe/p_state.h"
#include "pipe/p_screen.h"
+#include "util/u_hash_table.h"
#include "util/u_inlines.h"
#ifdef __cplusplus
@@ -407,7 +408,8 @@ struct pipe_h264_enc_picture_desc
bool not_referenced;
bool is_idr;
bool enable_vui;
- unsigned int frame_idx[32];
+ struct util_hash_table *frame_idx;
+
};
struct pipe_h265_sps