40 int (*
cmp)(
const void *
key,
const void *
b),
void *next[2])
46 next[v >> 31] = t->
elem;
83 int i = (v >> 31) ^ !!*next;
87 if (!(t->
state & 1)) {
109 if ((*child)->state * 2 == -t->
state) {
110 *tp = (*child)->
child[
i ^ 1];
117 (*tp)->child[1]->state = (*tp)->state < 0;
127 (*tp)->state = -t->
state;
131 if (!(*tp)->state ^ !!*next)
156 int (*
cmp)(
void *opaque,
void *
elem),
157 int (*enu)(
void *opaque,
void *
elem))
164 enu(opaque, t->
elem);
#define i(width, name, range_min, range_max)
void av_tree_enumerate(AVTreeNode *t, void *opaque, int(*cmp)(void *opaque, void *elem), int(*enu)(void *opaque, void *elem))
Apply enu(opaque, &elem) to all the elements in the tree in a given range.
void * av_tree_insert(AVTreeNode **tp, void *key, int(*cmp)(const void *key, const void *b), AVTreeNode **next)
Insert or remove an element.
const int av_tree_node_size
void av_tree_destroy(AVTreeNode *t)
struct AVTreeNode * av_tree_node_alloc(void)
Allocate an AVTreeNode.
Memory handling functions.
static av_always_inline int cmp(MPVEncContext *const s, const int x, const int y, const int subx, const int suby, const int size, const int h, int ref_index, int src_index, me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags)
compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensa...
struct AVTreeNode * child[2]
static int cmp(const void *a, const void *b)
void * av_tree_find(const AVTreeNode *t, void *key, int(*cmp)(const void *key, const void *b), void *next[2])