Changeset 179 for libmpc/branches/r2d/libmpcdec
- Timestamp:
- 12/20/06 20:42:30 (18 years ago)
- Location:
- libmpc/branches/r2d/libmpcdec
- Files:
-
- 2 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 -
libmpc/branches/r2d/libmpcdec/mpc_decoder.c
r177 r179 516 516 517 517 if (is_key_frame == MPC_TRUE) { 518 Max_used_Band = mpc_bits_log_dec(r, d->max_band );518 Max_used_Band = mpc_bits_log_dec(r, d->max_band + 1); 519 519 } else { 520 520 Max_used_Band = d->last_max_band + mpc_bits_huff_dec(r, mpc_table_HuffBands); … … 626 626 } 627 627 break; 628 case 0: 629 break; 628 630 case 1: 629 631 Table = mpc_table_HuffQ_8 [0][0]; … … 680 682 } 681 683 break; 682 case 9: case 10: case 11: case 12: case 13: case 14: case 15:684 default : 683 685 for ( ; k < 36; k++ ) { 684 686 q[k] = mpc_bits_huff_dec(r, mpc_table_HuffQ9up_8);
Note: See TracChangeset
for help on using the changeset viewer.