Go to the documentation of this file.
26 #ifndef AVCODEC_MSS12_H
27 #define AVCODEC_MSS12_H
34 #define MODEL_MIN_SYMS 2
35 #define MODEL_MAX_SYMS 256
36 #define THRESH_ADAPTIVE -1
38 #define THRESH_HIGH 50
102 #define ARITH_GET_BIT(prefix) \
103 static int prefix ## _get_bit(ArithCoder *c) \
105 int range = c->high - c->low + 1; \
106 int bit = 2 * c->value - c->low >= c->high; \
109 c->low += range >> 1; \
111 c->high = c->low + (range >> 1) - 1; \
113 prefix ## _normalise(c); \
118 #define ARITH_GET_MODEL_SYM(prefix) \
119 static int prefix ## _get_model_sym(ArithCoder *c, Model *m) \
123 idx = prefix ## _get_prob(c, m->cum_prob); \
125 val = m->idx2sym[idx]; \
126 ff_mss12_model_update(m, idx); \
128 prefix ## _normalise(c); \