Changeset 310 for libmpc/trunk/libmpcdec/mpc_decoder.c
- Timestamp:
- 05/04/07 14:10:51 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/mpc_decoder.c
r301 r310 369 369 d->Res_L[0] = mpc_bits_read(r, 4); 370 370 d->Res_R[0] = mpc_bits_read(r, 4); 371 if (d->ms && !(d->Res_L[0] == 0 && d->Res_R[0] == 0)) 372 d->MS_Flag[0] = mpc_bits_read(r, 1); 371 if (!(d->Res_L[0] == 0 && d->Res_R[0] == 0)) { 372 if (d->ms) 373 d->MS_Flag[0] = mpc_bits_read(r, 1); 374 Max_used_Band = 1; 375 } 373 376 374 377 // consecutive subbands … … 383 386 if (d->ms) 384 387 d->MS_Flag[n] = mpc_bits_read(r, 1); 385 Max_used_Band = n ;388 Max_used_Band = n + 1; 386 389 } 387 390 } 391 388 392 /****************************** SCFI ******************************/ 389 for ( n = 0; n < =Max_used_Band; n++ ) {393 for ( n = 0; n < Max_used_Band; n++ ) { 390 394 if (d->Res_L[n]) 391 395 d->SCFI_L[n] = mpc_bits_huff_dec(r, mpc_table_HuffSCFI); … … 395 399 396 400 /**************************** SCF/DSCF ****************************/ 397 for ( n = 0; n < =Max_used_Band; n++ ) {401 for ( n = 0; n < Max_used_Band; n++ ) { 398 402 mpc_int32_t * SCF = d->SCF_Index_L[n]; 399 403 mpc_uint32_t Res = d->Res_L[n], SCFI = d->SCFI_L[n]; … … 448 452 449 453 /***************************** Samples ****************************/ 450 for ( n = 0; n < =Max_used_Band; n++ ) {454 for ( n = 0; n < Max_used_Band; n++ ) { 451 455 mpc_int32_t *q = d->Q[n].L, Res = d->Res_L[n]; 452 456 do { … … 554 558 for( n = Max_used_Band; n <= d->max_band; n++) 555 559 d->Res_L[n] = d->Res_R[n] = 0; 556 557 558 560 559 561 /****************************** SCFI ******************************/
Note: See TracChangeset
for help on using the changeset viewer.