diff options
author | Marek Olšák <[email protected]> | 2020-02-05 14:10:48 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-26 20:35:50 +0000 |
commit | a01a875081bd52bc1c3c142a60af678171ce6c33 (patch) | |
tree | 395290b39796f09ee465fda4fbbb07354c57cb26 /src/gallium/state_trackers/omx | |
parent | 56f31328f207f310ee9b53f3294a23b25b2687e0 (diff) |
gallium/hash_table: consolidate hash tables with pointer keys
Reviewed-by: Kristian H. Kristensen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3722>
Diffstat (limited to 'src/gallium/state_trackers/omx')
-rw-r--r-- | src/gallium/state_trackers/omx/tizonia/h264dprc.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/omx/tizonia/h264dprc.c b/src/gallium/state_trackers/omx/tizonia/h264dprc.c index cac62a82e72..5678bd7ac8c 100644 --- a/src/gallium/state_trackers/omx/tizonia/h264dprc.c +++ b/src/gallium/state_trackers/omx/tizonia/h264dprc.c @@ -46,18 +46,6 @@ unsigned dec_frame_delta; -#define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x))) - -static unsigned handle_hash(void *key) -{ - return PTR_TO_UINT(key); -} - -static int handle_compare(void *key1, void *key2) -{ - return PTR_TO_UINT(key1) != PTR_TO_UINT(key2); -} - static enum pipe_error hash_table_clear_item_callback(void *key, void *value, void *data) { struct pipe_video_buffer *video_buffer = (struct pipe_video_buffer *)value; @@ -434,7 +422,7 @@ static OMX_ERRORTYPE h264d_prc_allocate_resources(void *ap_obj, OMX_U32 a_pid) list_inithead(&priv->codec_data.h264.dpb_list); - priv->video_buffer_map = util_hash_table_create(handle_hash, handle_compare); + priv->video_buffer_map = util_hash_table_create_ptr_keys(); return OMX_ErrorNone; } |