wefwe
Dependencies: mbed C12832 DogM163 FatFileSystem
_bitio.h@28:19aac2daf669, 2019-05-08 (annotated)
- Committer:
- JostBaus
- Date:
- Wed May 08 13:48:54 2019 +0000
- Revision:
- 28:19aac2daf669
Wavspiller using RiceGulumb
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JostBaus | 28:19aac2daf669 | 1 | #ifndef ___BITIO_H__ |
JostBaus | 28:19aac2daf669 | 2 | #define ___BITIO_H__ |
JostBaus | 28:19aac2daf669 | 3 | /* |
JostBaus | 28:19aac2daf669 | 4 | #define TRUE 1 |
JostBaus | 28:19aac2daf669 | 5 | #define FALSE 0 |
JostBaus | 28:19aac2daf669 | 6 | */ |
JostBaus | 28:19aac2daf669 | 7 | #define rightbits(n, x) ((x) & ((1U << (n)) - 1U)) |
JostBaus | 28:19aac2daf669 | 8 | |
JostBaus | 28:19aac2daf669 | 9 | #define OVERRUN 0xffff |
JostBaus | 28:19aac2daf669 | 10 | #define k 0x0b // k:0x09 to 0x0b? |
JostBaus | 28:19aac2daf669 | 11 | |
JostBaus | 28:19aac2daf669 | 12 | typedef unsigned int Uint; |
JostBaus | 28:19aac2daf669 | 13 | typedef unsigned char Uchar; |
JostBaus | 28:19aac2daf669 | 14 | |
JostBaus | 28:19aac2daf669 | 15 | extern FILE *infp, *outfp; |
JostBaus | 28:19aac2daf669 | 16 | extern int getcount, putcount; |
JostBaus | 28:19aac2daf669 | 17 | extern Uint bitbuf; |
JostBaus | 28:19aac2daf669 | 18 | |
JostBaus | 28:19aac2daf669 | 19 | /* Rice Golomb en-decoding */ |
JostBaus | 28:19aac2daf669 | 20 | extern void decode(void); |
JostBaus | 28:19aac2daf669 | 21 | extern void encode(long int n); |
JostBaus | 28:19aac2daf669 | 22 | |
JostBaus | 28:19aac2daf669 | 23 | |
JostBaus | 28:19aac2daf669 | 24 | void init_bit_o(void); |
JostBaus | 28:19aac2daf669 | 25 | void init_bit_i(void); |
JostBaus | 28:19aac2daf669 | 26 | Uint getbit(void); |
JostBaus | 28:19aac2daf669 | 27 | Uint getbits(int n); |
JostBaus | 28:19aac2daf669 | 28 | void putbit(Uint bit); |
JostBaus | 28:19aac2daf669 | 29 | void putbits(int n, Uint x); |
JostBaus | 28:19aac2daf669 | 30 | |
JostBaus | 28:19aac2daf669 | 31 | |
JostBaus | 28:19aac2daf669 | 32 | |
JostBaus | 28:19aac2daf669 | 33 | #endif |