📄 coder.h
字号:
/*
* Listing 1 -- coder.h
*
* This header file contains the constants, declarations, and
* prototypes needed to use the arithmetic coding routines. These
* declarations are for routines that need to interface with the
* arithmetic coding stuff in coder.c
*
*/
#define MAXIMUM_SCALE 16383 /* Maximum allowed frequency count */
#define ESCAPE 256 /* The escape symbol */
#define DONE -1 /* The output stream empty symbol */
#define FLUSH -2 /* The symbol to flush the model */
/*
* A symbol can either be represented as an int, or as a pair of
* counts on a scale. This structure gives a standard way of
* defining it as a pair of counts.
*/
typedef struct {
unsigned short int low_count;
unsigned short int high_count;
unsigned short int scale;
} SYMBOL;
extern long underflow_bits; /* The present underflow count in */
/* the arithmetic coder. */
/*
* Function prototypes.
*/
void initialize_arithmetic_decoder( FILE *stream );
void remove_symbol_from_stream( FILE *stream, SYMBOL *s );
void initialize_arithmetic_encoder( void );
void encode_symbol( FILE *stream, SYMBOL *s );
void flush_arithmetic_encoder( FILE *stream );
short int get_current_count( SYMBOL *s );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -