FFmpeg
|
#include <stddef.h>
Go to the source code of this file.
Functions | |
int | ff_hashtable_alloc (struct FFHashtableContext **ctx, size_t key_size, size_t val_size, size_t max_entries) |
Create a fixed-sized Robin Hood hash table. More... | |
int | ff_hashtable_get (const struct FFHashtableContext *ctx, const void *key, void *val) |
Look up a value from a hash table given a key. More... | |
int | ff_hashtable_set (struct FFHashtableContext *ctx, const void *key, const void *val) |
Store a value in a hash table given a key. More... | |
int | ff_hashtable_delete (struct FFHashtableContext *ctx, const void *key) |
Delete a value from a hash table given a key. More... | |
void | ff_hashtable_clear (struct FFHashtableContext *ctx) |
Delete all values from a hash table. More... | |
void | ff_hashtable_freep (struct FFHashtableContext **ctx) |
Free a hash table. More... | |
int ff_hashtable_alloc | ( | struct FFHashtableContext ** | ctx, |
size_t | key_size, | ||
size_t | val_size, | ||
size_t | max_entries | ||
) |
Create a fixed-sized Robin Hood hash table.
ctx | context to allocate and initialize |
key_size | size of key type in bytes |
val_size | size of value type in bytes |
max_entries | maximum number of key-value pairs to store |
Definition at line 59 of file hashtable.c.
Referenced by dxv_init(), and main().
int ff_hashtable_get | ( | const struct FFHashtableContext * | ctx, |
const void * | key, | ||
void * | val | ||
) |
Look up a value from a hash table given a key.
ctx | hash table context |
key | pointer to key data |
val | destination pointer for value data |
Definition at line 97 of file hashtable.c.
Referenced by dxv_compress_dxt1(), and main().
int ff_hashtable_set | ( | struct FFHashtableContext * | ctx, |
const void * | key, | ||
const void * | val | ||
) |
Store a value in a hash table given a key.
ctx | hash table context |
key | pointer to key data |
val | pointer for value data |
Definition at line 119 of file hashtable.c.
Referenced by dxv_compress_dxt1(), and main().
int ff_hashtable_delete | ( | struct FFHashtableContext * | ctx, |
const void * | key | ||
) |
Delete a value from a hash table given a key.
ctx | hash table context |
key | pointer to key data |
Definition at line 163 of file hashtable.c.
Referenced by dxv_compress_dxt1(), and main().
void ff_hashtable_clear | ( | struct FFHashtableContext * | ctx | ) |
Delete all values from a hash table.
ctx | hash table context |
Definition at line 201 of file hashtable.c.
Referenced by dxv_compress_dxt1().
void ff_hashtable_freep | ( | struct FFHashtableContext ** | ctx | ) |
Free a hash table.
ctx | hash table context |
Definition at line 206 of file hashtable.c.
Referenced by dxv_close(), ff_hashtable_alloc(), and main().