Changeset 206
- Timestamp:
- 02/09/07 18:57:23 (18 years ago)
- Location:
- libmpc/branches/r2d
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcdec/internal.h
r196 r206 74 74 mpc_size_t bytes_total; 75 75 mpc_bits_reader bits_reader; 76 mpc_ uint32_t block_bits; /// bits remaining in current audio block77 mpc_ bool_t end; /// end of stream flag76 mpc_int32_t block_bits; /// bits remaining in current audio block 77 mpc_uint_t block_frames; /// frames remaining in current audio block 78 78 79 79 // seeking -
libmpc/branches/r2d/libmpcdec/mpc_demux.c
r205 r206 66 66 d->bits_reader.count = 8; 67 67 d->block_bits = 0; 68 d-> end = MPC_FALSE;68 d->block_frames = 0; 69 69 } 70 70 … … 361 361 mpc_bits_reader r; 362 362 i->is_key_frame = MPC_FALSE; 363 if (d->block_bits < 8 && d->end == MPC_FALSE) { 363 364 if (d->block_frames == 0) { 364 365 mpc_block b = {{0,0},0}; 365 366 d->bits_reader.count &= -8; … … 372 373 while( memcmp(b.key, "AD", 2) != 0 ) { // scan all blocks until audio 373 374 if (memcmp(b.key, "SE", 2) == 0) { // end block 374 d->end = MPC_TRUE;375 break;375 i->bits = -1; 376 return; 376 377 } 377 378 mpc_demux_fill(d, 11 + (mpc_uint32_t) b.size, 0); … … 380 381 } 381 382 d->block_bits = (mpc_uint32_t) b.size * 8; 383 d->block_frames = 1 << d->si.block_pwr; 382 384 i->is_key_frame = MPC_TRUE; 383 385 } … … 387 389 mpc_decoder_decode_frame(d->d, &d->bits_reader, i); 388 390 d->block_bits -= ((d->bits_reader.buff - r.buff) << 3) + r.count - d->bits_reader.count; 391 d->block_frames--; 392 if (d->block_bits < 0) i->bits = -1; 389 393 } else { 390 394 mpc_bits_reader r; -
libmpc/branches/r2d/mpc2sv8/mpc2sv8.c
r205 r206 57 57 mpc_int32_t * q_d = d->Q[i].L, * q_e = e->Q[i].L, Res = d->Res_L[i]; 58 58 59 if (Res !=0)59 if (Res > 0) 60 60 for( j = 0; j < 36; j++) 61 61 q_e[j] = q_d[j] + offset[Res]; … … 63 63 q_d = d->Q[i].R, q_e = e->Q[i].R, Res = d->Res_R[i]; 64 64 65 if (Res !=0)65 if (Res > 0) 66 66 for( j = 0; j < 36; j++) 67 67 q_e[j] = q_d[j] + offset[Res]; … … 137 137 138 138 demux->d->samples_to_skip = MPC_FRAME_LENGTH + MPC_DECODER_SYNTH_DELAY; 139 frame.buffer = 0;140 139 mpc_demux_decode(demux, &frame); 141 140
Note: See TracChangeset
for help on using the changeset viewer.