- #include <stdlib.h>
- #include "mp4_vars.h"
- #include "getbits.h"
- #define SE_CODE 31
- // 初始化缓存,第一次得到或显示位时调用一次。
- void initbits (unsigned char * stream, int length)
- {
- ld->incnt = 0;
- ld->bitcnt = 0;
- ld->rdptr = ld->rdbfr + 2048;
- #ifdef _DECORE
- ld->rdptr = stream;
- ld->length = length;
- #endif
- }
- unsigned int getbits1 ()
- {
- return getbits (1);
- }