diff options
author | Eduard Hasenleithner <ehasenle@users.sourceforge.net> | 2001-08-24 17:58:15 +0000 |
---|---|---|
committer | Eduard Hasenleithner <ehasenle@users.sourceforge.net> | 2001-08-24 17:58:15 +0000 |
commit | 03e9d3bba44edc770023bd00b48650dc12889340 (patch) | |
tree | cd47747ae3dac73644670410df7f6abaa859188c /src/libac3/bit_allocate.c | |
parent | d3fbaa461102296228ef0b2a0d529a914469957d (diff) | |
download | xine-lib-03e9d3bba44edc770023bd00b48650dc12889340.tar.gz xine-lib-03e9d3bba44edc770023bd00b48650dc12889340.tar.bz2 |
Fixed the "cirp" bug with gcc-3.0.
CVS patchset: 479
CVS date: 2001/08/24 17:58:15
Diffstat (limited to 'src/libac3/bit_allocate.c')
-rw-r--r-- | src/libac3/bit_allocate.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libac3/bit_allocate.c b/src/libac3/bit_allocate.c index f3eaa1def..45bc16cef 100644 --- a/src/libac3/bit_allocate.c +++ b/src/libac3/bit_allocate.c @@ -170,7 +170,8 @@ void bit_allocate (ac3_state_t * state, ac3_ba_t * ba, int bndstart, psd = 128 * exp[i]; mask = psd + fgain + lowcomp; COMPUTE_MASK (); - bap[i++] = (baptab+156)[mask + 4 * exp[i]]; + bap[i] = (baptab+156)[mask + 4 * exp[i]]; + i++; } while ((i < 3) || ((i < 7) && (exp[i] > exp[i-1]))); fastleak = psd + fgain; slowleak = psd + sgain; @@ -187,7 +188,8 @@ void bit_allocate (ac3_state_t * state, ac3_ba_t * ba, int bndstart, mask = ((fastleak + lowcomp < slowleak) ? fastleak + lowcomp : slowleak); COMPUTE_MASK (); - bap[i++] = (baptab+156)[mask + 4 * exp[i]]; + bap[i] = (baptab+156)[mask + 4 * exp[i]]; + i++; } if (end == 7) // lfe channel @@ -203,7 +205,8 @@ void bit_allocate (ac3_state_t * state, ac3_ba_t * ba, int bndstart, mask = ((fastleak + lowcomp < slowleak) ? fastleak + lowcomp : slowleak); COMPUTE_MASK (); - bap[i++] = (baptab+156)[mask + 4 * exp[i]]; + bap[i] = (baptab+156)[mask + 4 * exp[i]]; + i++; } while (i < 20); while (lowcomp > 128) { // two iterations maximum @@ -213,7 +216,8 @@ void bit_allocate (ac3_state_t * state, ac3_ba_t * ba, int bndstart, mask = ((fastleak + lowcomp < slowleak) ? fastleak + lowcomp : slowleak); COMPUTE_MASK (); - bap[i++] = (baptab+156)[mask + 4 * exp[i]]; + bap[i] = (baptab+156)[mask + 4 * exp[i]]; + i++; } j = i; } @@ -250,7 +254,8 @@ void bit_allocate (ac3_state_t * state, ac3_ba_t * ba, int bndstart, do { // max(mask+4*exp)=147=-(minpsd+fgain-deltba-snroffset)>>5+4*exp // min(mask+4*exp)=-156=-(sgain-deltba-snroffset)>>5 - bap[j++] = (baptab+156)[mask + 4 * exp[j]]; + bap[j] = (baptab+156)[mask + 4 * exp[j]]; + j++; } while (j < endband); } while (j < end); } |