xeye_ atsu
/
RiceGolombDPCM_Player
For BU9480F D-A Conv.
_bitio.h@3:64c3ed0fc4b4, 2010-09-11 (annotated)
- Committer:
- lynxeyed_atsu
- Date:
- Sat Sep 11 11:23:26 2010 +0000
- Revision:
- 3:64c3ed0fc4b4
- Parent:
- 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 | 1:02bfb013660c | 3 | /* |
lynxeyed_atsu | 0:805cffac956b | 4 | #define TRUE 1 |
lynxeyed_atsu | 0:805cffac956b | 5 | #define FALSE 0 |
lynxeyed_atsu | 1:02bfb013660c | 6 | */ |
lynxeyed_atsu | 0:805cffac956b | 7 | #define rightbits(n, x) ((x) & ((1U << (n)) - 1U)) |
lynxeyed_atsu | 0:805cffac956b | 8 | |
lynxeyed_atsu | 0:805cffac956b | 9 | #define OVERRUN 0xffff |
lynxeyed_atsu | 0:805cffac956b | 10 | #define k 0x0b // k:0x09 to 0x0b? |
lynxeyed_atsu | 0:805cffac956b | 11 | |
lynxeyed_atsu | 0:805cffac956b | 12 | typedef unsigned int Uint; |
lynxeyed_atsu | 0:805cffac956b | 13 | typedef unsigned char Uchar; |
lynxeyed_atsu | 0:805cffac956b | 14 | |
lynxeyed_atsu | 0:805cffac956b | 15 | extern FILE *infp, *outfp; |
lynxeyed_atsu | 0:805cffac956b | 16 | extern int getcount, putcount; |
lynxeyed_atsu | 0:805cffac956b | 17 | extern Uint bitbuf; |
lynxeyed_atsu | 0:805cffac956b | 18 | |
lynxeyed_atsu | 0:805cffac956b | 19 | /* Rice Golomb en-decoding */ |
lynxeyed_atsu | 0:805cffac956b | 20 | extern void decode(void); |
lynxeyed_atsu | 0:805cffac956b | 21 | extern void encode(long int n); |
lynxeyed_atsu | 0:805cffac956b | 22 | |
lynxeyed_atsu | 0:805cffac956b | 23 | |
lynxeyed_atsu | 0:805cffac956b | 24 | void init_bit_o(void); |
lynxeyed_atsu | 0:805cffac956b | 25 | void init_bit_i(void); |
lynxeyed_atsu | 0:805cffac956b | 26 | Uint getbit(void); |
lynxeyed_atsu | 0:805cffac956b | 27 | Uint getbits(int n); |
lynxeyed_atsu | 0:805cffac956b | 28 | void putbit(Uint bit); |
lynxeyed_atsu | 0:805cffac956b | 29 | void putbits(int n, Uint x); |
lynxeyed_atsu | 0:805cffac956b | 30 | |
lynxeyed_atsu | 0:805cffac956b | 31 | |
lynxeyed_atsu | 0:805cffac956b | 32 | |
lynxeyed_atsu | 0:805cffac956b | 33 | #endif |