39 if (c->
high >= 0x8000) {
40 if (c->
low < 0x8000) {
41 if (c->
low >= 0x4000 && c->
high < 0xC000) {
66 int range = c->high - c->low + 1;
67 int val = (((c->value - c->low + 1) << bits) - 1) / range;
68 int prob = range * val;
70 c->high = ((prob + range) >> bits) + c->low - 1;
71 c->low += prob >>
bits;
80 int range = c->
high - c->
low + 1;
81 int val = ((c->
value - c->
low + 1) * mod_val - 1) / range;
82 int prob = range * val;
84 c->
high = (prob + range) / mod_val + c->
low - 1;
85 c->
low += prob / mod_val;
94 int range = c->
high - c->
low + 1;
95 int val = ((c->
value - c->
low + 1) * probs[0] - 1) / range;
98 while (probs[sym] > val)
101 c->
high = range * probs[sym - 1] / probs[0] + c->
low - 1;
102 c->
low += range * probs[sym] / probs[0];
115 c->get_model_sym = arith_get_model_sym;
121 int i, ncol,
r,
g,
b;
128 for (i = 0; i < ncol; i++) {
132 *pal++ = (0xFF
U << 24) | (r << 16) | (g << 8) | b;
142 int buf_size = avpkt->
size;
163 c->
keyframe = !arith_get_bit(&acoder);