00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 # ifndef LIBMAD_BIT_H
00023 # define LIBMAD_BIT_H
00024
00025 struct mad_bitptr {
00026 unsigned char const *byte;
00027 unsigned short cache;
00028 unsigned short left;
00029 };
00030
00031 void mad_bit_init(struct mad_bitptr *, unsigned char const *);
00032
00033 # define mad_bit_finish(bitptr)
00034
00035 unsigned int mad_bit_length(struct mad_bitptr const *,
00036 struct mad_bitptr const *);
00037
00038 # define mad_bit_bitsleft(bitptr) ((bitptr)->left)
00039 unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *);
00040
00041 void mad_bit_skip(struct mad_bitptr *, unsigned int);
00042 unsigned long mad_bit_read(struct mad_bitptr *, unsigned int);
00043 void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long);
00044
00045 unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short);
00046
00047 # endif