40 if (c->
high >= 0x8000) {
41 if (c->
low < 0x8000) {
42 if (c->
low >= 0x4000 && c->
high < 0xC000) {
67 int range = c->high - c->low + 1;
68 int val = (((c->value - c->low + 1) << bits) - 1) / range;
69 int prob = range *
val;
71 c->high = ((prob + range) >> bits) + c->low - 1;
72 c->low += prob >>
bits;
81 int range = c->
high - c->
low + 1;
82 int val = ((c->
value - c->
low + 1) * mod_val - 1) / range;
83 int prob = range *
val;
85 c->
high = (prob + range) / mod_val + c->
low - 1;
86 c->
low += prob / mod_val;
95 int range = c->
high - c->
low + 1;
96 int val = ((c->
value - c->
low + 1) * probs[0] - 1) / range;
99 while (probs[sym] > val)
102 c->
high = range * probs[sym - 1] / probs[0] + c->
low - 1;
103 c->
low += range * probs[sym] / probs[0];
116 c->get_model_sym = arith_get_model_sym;
122 int i, ncol,
r,
g,
b;
129 for (i = 0; i < ncol; i++) {
133 *pal++ = (0xFF
U << 24) | (r << 16) | (g << 8) | b;
143 int buf_size = avpkt->
size;
159 c->
keyframe = !arith_get_bit(&acoder);