Common header for Microsoft Screen 1 and 2.
More...
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
Go to the source code of this file.
|
|
#define | MODEL_MIN_SYMS 2 |
| |
|
#define | MODEL_MAX_SYMS 256 |
| |
|
#define | THRESH_ADAPTIVE -1 |
| |
|
#define | THRESH_LOW 15 |
| |
|
#define | THRESH_HIGH 50 |
| |
| #define | ARITH_GET_BIT(prefix) |
| |
| #define | ARITH_GET_MODEL_SYM(prefix) |
| |
Common header for Microsoft Screen 1 and 2.
§ ARITH_GET_BIT
| #define ARITH_GET_BIT |
( |
|
prefix | ) |
|
Value:{ \
int range = c->high - c->low + 1; \
int bit = 2 * c->value - c->low >= c->high; \
\
if (bit) \
c->low += range >> 1; \
else \
c->high = c->low + (range >> 1) - 1; \
\
prefix ## _normalise(c); \
\
return bit; \
}
§ ARITH_GET_MODEL_SYM
| #define ARITH_GET_MODEL_SYM |
( |
|
prefix | ) |
|
Value:{ \
int idx, val; \
\
idx = prefix ## _get_prob(c, m->cum_prob); \
\
val = m->idx2sym[idx]; \
ff_mss12_model_update(m, idx); \
\
prefix ## _normalise(c); \
\
return val; \
}