33 if (left > 999 || right > 999)
35 if (right - left != t->
state)
39 return FFMAX(left, right) + 1;
47 for (i = 0; i < depth * 4; i++)
57 static int cmp(
const void *
a,
const void *
b)
62 int main(
int argc,
char **argv)
68 int log_level = argc <= 1 ?
AV_LOG_INFO : atoi(argv[1]);
74 for (i = 0; i < 10000; i++) {
77 if (
check(root) > 999) {
void av_log_set_level(int level)
Set the log level.
int main(int argc, char **argv)
void * av_tree_find(const AVTreeNode *t, void *key, int(*cmp)(const void *key, const void *b), void *next[2])
struct AVTreeNode * av_tree_node_alloc(void)
Allocate an AVTreeNode.
void av_tree_destroy(AVTreeNode *t)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
struct AVTreeNode * child[2]
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_INFO
Standard information.
static int cmp(const void *a, const void *b)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
static int check(AVTreeNode *t)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
common internal and external API header
void * av_tree_insert(AVTreeNode **tp, void *key, int(*cmp)(const void *key, const void *b), AVTreeNode **next)
Insert or remove an element.
static void print(AVTreeNode *t, int depth)