Algorithm 版 (精华区)
发信人: lofe ()感激生活(), 信区: Algorithm
标 题: Comp -- coder.h
发信站: 哈工大紫丁香 (Sun Sep 3 08:31:58 2000), 转信
/*
* 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 );
--
_____________________________
Every problem has a solution.
optooff@mail.hust.edu.cn
www.netease.com/~hansen
※ 修改:.haojs 于 Sep 3 08:29:34 修改本文.[FROM: bbs.hit.edu.cn]
--
※ 转寄:.武汉白云黄鹤站 bbs.whnet.edu.cn.[FROM: bbs.hit.edu.cn]
--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: haojs.bbs@bbs.whnet.]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.398毫秒