bitstrm.h
来自「EM8511s中使用的mpg播放器」· C头文件 代码 · 共 43 行
H
43 行
#ifndef _BITSTRM_H#define _BITSTRM_H// this class will increment Err if you proceed past the end of the buffer// the buffer is padded with zeros if the input buffer length is not modulo // 4 bytesclass BitStream{private: int m_incnt; unsigned char * m_rdbfr; unsigned long m_rdbfr_length; unsigned char * m_rdptr; unsigned char * m_rdmax; int m_bitcnt; unsigned int m_bfr; void initbits (int *Err);public: BitStream (unsigned char *pBuffer, unsigned long Length, int *Err); ~BitStream (); long m_nbits; // get n bits without advancing unsigned int showbits (int n); // advance n bits void flushbits (int n, int *Err); // advance 32 bits void flushbits32 (int *Err); // get n bits + advance unsigned int getbits (int n, int *Err); // get 32bits + advance unsigned int getbits32 (int *Err); // align to the next byte void align (int *Err); // see how many bits have been processed long getnbits ();};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?