summaryrefslogtreecommitdiff
path: root/src/liba52/bit_allocate.c
diff options
context:
space:
mode:
authorEduard Hasenleithner <ehasenle@users.sourceforge.net>2001-08-29 17:56:21 +0000
committerEduard Hasenleithner <ehasenle@users.sourceforge.net>2001-08-29 17:56:21 +0000
commit918fe19376fb88e6c4d50ba991d8f98c52669168 (patch)
treed8b9315dc177cb195a855540a7e9f67889f3dc82 /src/liba52/bit_allocate.c
parentd6924b69145eaa122ae20068f74c2d728872431c (diff)
downloadxine-lib-918fe19376fb88e6c4d50ba991d8f98c52669168.tar.gz
xine-lib-918fe19376fb88e6c4d50ba991d8f98c52669168.tar.bz2
re-merged gcc-3.0 "cirp" bug fix from a52dec cvs.
CVS patchset: 519 CVS date: 2001/08/29 17:56:21
Diffstat (limited to 'src/liba52/bit_allocate.c')
-rw-r--r--src/liba52/bit_allocate.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/liba52/bit_allocate.c b/src/liba52/bit_allocate.c
index a44142ae3..000e6c0dd 100644
--- a/src/liba52/bit_allocate.c
+++ b/src/liba52/bit_allocate.c
@@ -168,7 +168,8 @@ void bit_allocate (a52_state_t * state, a52_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;
@@ -185,7 +186,8 @@ void bit_allocate (a52_state_t * state, a52_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 */
@@ -201,7 +203,8 @@ void bit_allocate (a52_state_t * state, a52_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 */
@@ -211,7 +214,8 @@ void bit_allocate (a52_state_t * state, a52_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;
}
@@ -248,7 +252,7 @@ void bit_allocate (a52_state_t * state, a52_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]];
- } while (j < endband);
+ bap[j] = (baptab+156)[mask + 4 * exp[j]];
+ } while (++j < endband);
} while (j < end);
}