xeye_ atsu
/
RiceGolombDPCM_Player
For BU9480F D-A Conv.
_bitio.h@0:805cffac956b, 2010-08-26 (annotated)
- Committer:
- lynxeyed_atsu
- Date:
- Thu Aug 26 12:48:50 2010 +0000
- Revision:
- 0:805cffac956b
- Child:
- 1:02bfb013660c
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lynxeyed_atsu | 0:805cffac956b | 1 | #ifndef ___BITIO_H__ |
lynxeyed_atsu | 0:805cffac956b | 2 | #define ___BITIO_H__ |
lynxeyed_atsu | 0:805cffac956b | 3 | |
lynxeyed_atsu | 0:805cffac956b | 4 | #define TRUE 1 |
lynxeyed_atsu | 0:805cffac956b | 5 | #define FALSE 0 |
lynxeyed_atsu | 0:805cffac956b | 6 | #define rightbits(n, x) ((x) & ((1U << (n)) - 1U)) |
lynxeyed_atsu | 0:805cffac956b | 7 | |
lynxeyed_atsu | 0:805cffac956b | 8 | #define OVERRUN 0xffff |
lynxeyed_atsu | 0:805cffac956b | 9 | #define k 0x0b // k:0x09 to 0x0b? |
lynxeyed_atsu | 0:805cffac956b | 10 | |
lynxeyed_atsu | 0:805cffac956b | 11 | typedef unsigned int Uint; |
lynxeyed_atsu | 0:805cffac956b | 12 | typedef unsigned char Uchar; |
lynxeyed_atsu | 0:805cffac956b | 13 | |
lynxeyed_atsu | 0:805cffac956b | 14 | extern FILE *infp, *outfp; |
lynxeyed_atsu | 0:805cffac956b | 15 | extern int getcount, putcount; |
lynxeyed_atsu | 0:805cffac956b | 16 | extern Uint bitbuf; |
lynxeyed_atsu | 0:805cffac956b | 17 | |
lynxeyed_atsu | 0:805cffac956b | 18 | /* Rice Golomb en-decoding */ |
lynxeyed_atsu | 0:805cffac956b | 19 | extern void decode(void); |
lynxeyed_atsu | 0:805cffac956b | 20 | extern void encode(long int n); |
lynxeyed_atsu | 0:805cffac956b | 21 | |
lynxeyed_atsu | 0:805cffac956b | 22 | |
lynxeyed_atsu | 0:805cffac956b | 23 | void init_bit_o(void); |
lynxeyed_atsu | 0:805cffac956b | 24 | void init_bit_i(void); |
lynxeyed_atsu | 0:805cffac956b | 25 | Uint getbit(void); |
lynxeyed_atsu | 0:805cffac956b | 26 | Uint getbits(int n); |
lynxeyed_atsu | 0:805cffac956b | 27 | void putbit(Uint bit); |
lynxeyed_atsu | 0:805cffac956b | 28 | void putbits(int n, Uint x); |
lynxeyed_atsu | 0:805cffac956b | 29 | |
lynxeyed_atsu | 0:805cffac956b | 30 | |
lynxeyed_atsu | 0:805cffac956b | 31 | |
lynxeyed_atsu | 0:805cffac956b | 32 | #endif |