g72x.h

来自「dm642上的h264源码」· C头文件 代码 · 共 50 行

H
50
字号
/*
 * g72x.h
 *
 * Header file for CCITT conversion routines.
 *
 */
#ifndef _G72X_H
#define	_G72X_H

/*
 * The following is the definition of the state structure
 * used by the G.721/G.723 encoder and decoder to preserve their internal
 * state between successive calls.  The meanings of the majority
 * of the state structure fields are explained in detail in the
 * CCITT Recommendation G.721.  The field names are essentially indentical
 * to variable names in the bit level description of the coding algorithm
 * included in this Recommendation.
 */
struct g72x_state {
	short yu;	/* Unlocked or non-steady state step size multiplier. */

	short a[2];	/* Coefficients of pole portion of prediction filter. */
	short b[6];	/* Coefficients of zero portion of prediction filter. */
	short pk[2];	/*
			 * Signs of previous two samples of a partially
			 * reconstructed signal.
			 */
	short dq[6];	/*
			 * Previous 6 samples of the quantized difference
			 * signal represented in an internal floating point
			 * format.
			 */
	short sr[2];	/*
			 * Previous 2 samples of the quantized difference
			 * signal represented in an internal floating point
			 * format.
			 */

};

/* External function definitions. */

extern void g72x_init_state(struct g72x_state *);
extern short g721_encoder(short sample,struct g72x_state *state_ptr);
extern short g721_decoder(short code,struct g72x_state *state_ptr);
extern void pack_output(short *in_code,unsigned short *out_byte,int len);
extern void unpack_input(unsigned short *in_byte,short *out_code,int len);

#endif /* !_G72X_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?