diff options
author | uid56437 <none@none> | 2001-07-04 14:09:52 +0000 |
---|---|---|
committer | uid56437 <none@none> | 2001-07-04 14:09:52 +0000 |
commit | dcf6b20403886932bff88ba93fa47c954abc38a6 (patch) | |
tree | 56d3773485e25a8089017c4b281158caba959da6 /src/libac3/bit_allocate.c | |
parent | 0342d76c613911b282e14a1188326075d1d43bca (diff) | |
download | xine-lib-dcf6b20403886932bff88ba93fa47c954abc38a6.tar.gz xine-lib-dcf6b20403886932bff88ba93fa47c954abc38a6.tar.bz2 |
* 32-bit aligned memory access for bitstream access, so a SPARC cpu is happy.
* gcc-3.0 fixes for bit_allocate.c: The same variable is used with autoincrement
on left/right side of an assigment, which is an undefined operation.
CVS patchset: 246
CVS date: 2001/07/04 14:09:52
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 74c5ec902..17f35b159 100644 --- a/src/libac3/bit_allocate.c +++ b/src/libac3/bit_allocate.c @@ -165,7 +165,8 @@ void bit_allocate(int fscod, audblk_t * audblk, ac3_ba_t * ba, 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; @@ -182,7 +183,8 @@ void bit_allocate(int fscod, audblk_t * audblk, ac3_ba_t * ba, 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 @@ -198,7 +200,8 @@ void bit_allocate(int fscod, audblk_t * audblk, ac3_ba_t * ba, 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 @@ -208,7 +211,8 @@ void bit_allocate(int fscod, audblk_t * audblk, ac3_ba_t * ba, 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; } @@ -245,7 +249,8 @@ void bit_allocate(int fscod, audblk_t * audblk, ac3_ba_t * ba, 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); } |