Changeset 221 for libmpc/branches/r2d/libmpcenc/libmpcenc.h
- Timestamp:
- 02/17/07 21:18:35 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcenc/libmpcenc.h
r220 r221 94 94 mpc_uint32_t writeBlock ( mpc_encoder_t *, const char *, const mpc_bool_t, mpc_uint32_t); 95 95 void writeMagic (mpc_encoder_t * e); 96 void writeBits (mpc_encoder_t * e, mpc_uint32_t input, unsigned int bits ); 96 void emptyBits(mpc_encoder_t * e); 97 static mpc_inline void writeBits (mpc_encoder_t * e, mpc_uint32_t input, unsigned int bits ) 98 { 99 e->outputBits += bits; 100 101 if (e->bitsCount + bits > sizeof(e->bitsBuff) * 8) { 102 int tmp = (sizeof(e->bitsBuff) * 8 - e->bitsCount); 103 bits -= tmp; 104 e->bitsBuff = (e->bitsBuff << tmp) | (input >> bits); 105 e->bitsCount = sizeof(e->bitsBuff) * 8; 106 emptyBits(e); 107 input &= (1 << bits) - 1; 108 } 109 e->bitsBuff = (e->bitsBuff << bits) | input; 110 e->bitsCount += bits; 111 } 97 112 void writeSeekTable (mpc_encoder_t * e); 98 113 void writeBitstream_SV8 ( mpc_encoder_t*, int);
Note: See TracChangeset
for help on using the changeset viewer.