Changeset 307 for libmpc/trunk/libmpcenc


Ignore:
Timestamp:
05/03/07 12:39:37 (18 years ago)
Author:
r2d
Message:

writeBits can't output more than 31 bits !

Location:
libmpc/trunk/libmpcenc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/libmpcenc/bitstream.c

    r221 r307  
    133133        nb &= (1 << k) - 1;
    134134
    135         while( l > 32 ){
    136                 writeBits(e, 0, 32);
    137                 l -= 32;
     135        while( l > 31 ){
     136                writeBits(e, 0, 31);
     137                l -= 31;
    138138        }
    139139        writeBits(e, 1, l);
  • libmpc/trunk/libmpcenc/libmpcenc.h

    r226 r307  
    9595 void writeMagic (mpc_encoder_t * e);
    9696 void emptyBits(mpc_encoder_t * e);
     97
     98 /// maximum number of output bits is 31 !
    9799 static mpc_inline void writeBits (mpc_encoder_t * e, mpc_uint32_t input, unsigned int bits )
    98100 {
Note: See TracChangeset for help on using the changeset viewer.