26 static unsigned short int code;
27 static unsigned short int low;
28 static unsigned short int high;
60 range = (long) (
high-
low ) + 1;
61 high =
low + (
unsigned short int )
63 low = low + (
unsigned short int )
75 if ( (
high & 0x8000 ) == ( low & 0x8000 ) )
88 else if ( ( low & 0x4000 ) && !(
high & 0x4000 ))
129 range = (long) (
high -
low ) + 1;
131 ((((
long) (
code -
low ) + 1 ) * s->
scale-1 ) / range );
146 for ( i = 0 ; i < 16 ; i++ )
168 range = (long)(
high -
low ) + 1;
169 high =
low + (
unsigned short int)
171 low = low + (
unsigned short int)
181 if ( (
high & 0x8000 ) == ( low & 0x8000 ) )
187 else if ((low & 0x4000) == 0x4000 && (
high & 0x4000) == 0 )
void initialize_arithmetic_decoder(FILE *stream)
void encode_symbol(FILE *stream, SYMBOL *s)
void initialize_arithmetic_encoder()
static unsigned short int code
static unsigned short int low
void output_bit(FILE *stream, int bit)
unsigned short int low_count
void flush_arithmetic_encoder(FILE *stream)
static unsigned short int high
short int input_bit(FILE *stream)
unsigned short int high_count
void remove_symbol_from_stream(FILE *stream, SYMBOL *s)
short int get_current_count(SYMBOL *s)