Changeset 179 for libmpc/branches/r2d/libmpcdec/mpc_bits_reader.c
- Timestamp:
- 12/20/06 20:42:30 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcdec/mpc_bits_reader.c
r172 r179 106 106 { 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31}; 107 107 108 // FIXME : make it work without 64 bit use for 32 bit output 108 109 mpc_uint32_t mpc_bits_read(mpc_bits_reader * r, const unsigned int nb_bits) 109 110 { 110 mpc_uint 32_t ret = r->buff[0];111 mpc_uint64_t ret = r->buff[0]; 111 112 112 113 while(nb_bits > r->count){ … … 118 119 r->count -= nb_bits; 119 120 120 return ( ret >> r->count) & (-1u >> (32 - nb_bits));121 return (mpc_uint32_t)((ret >> r->count) & (-1u >> (32 - nb_bits))); 121 122 } 122 123
Note: See TracChangeset
for help on using the changeset viewer.