Ignore:
Timestamp:
02/17/07 21:18:35 (17 years ago)
Author:
r2d
Message:
  • speed optimizations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/libmpcenc/bitstream.c

    r204 r221  
    108108}
    109109
    110 void writeBits (mpc_encoder_t * e, mpc_uint32_t input, unsigned int bits )
    111 {
    112         e->outputBits += bits;
    113 
    114         if (e->bitsCount + bits > sizeof(e->bitsBuff) * 8) {
    115                 int tmp = (sizeof(e->bitsBuff) * 8 - e->bitsCount);
    116                 bits -= tmp;
    117                 e->bitsBuff = (e->bitsBuff << tmp) | (input >> bits);
    118                 e->bitsCount = sizeof(e->bitsBuff) * 8;
    119                 emptyBits(e);
    120                 input &= (1 << bits) - 1;
    121         }
    122         e->bitsBuff = (e->bitsBuff << bits) | input;
    123         e->bitsCount += bits;
    124 }
    125 
    126110unsigned int encodeSize(mpc_uint64_t size, char * buff, mpc_bool_t addCodeSize)
    127111{
Note: See TracChangeset for help on using the changeset viewer.