summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEduard Hasenleithner <ehasenle@users.sourceforge.net>2001-08-24 17:58:15 +0000
committerEduard Hasenleithner <ehasenle@users.sourceforge.net>2001-08-24 17:58:15 +0000
commit03e9d3bba44edc770023bd00b48650dc12889340 (patch)
treecd47747ae3dac73644670410df7f6abaa859188c /src
parentd3fbaa461102296228ef0b2a0d529a914469957d (diff)
downloadxine-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')
-rw-r--r--src/libac3/bit_allocate.c15
-rw-r--r--src/libac3/parse.c9
2 files changed, 16 insertions, 8 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);
}
diff --git a/src/libac3/parse.c b/src/libac3/parse.c
index d200a2be1..7d7d7b3d0 100644
--- a/src/libac3/parse.c
+++ b/src/libac3/parse.c
@@ -310,15 +310,18 @@ static int q_4_pointer;
}
#define CHANNEL_COEFF(val) \
- coeff[i++] = val; \
+ coeff[i] = val; \
+ i++; \
continue;
#define CHANNEL_DITHER(val) \
if (dither) { \
- coeff[i++] = dither_gen () * val; \
+ coeff[i] = dither_gen () * val; \
+ i++; \
continue; \
} else { \
- coeff[i++] = 0; \
+ coeff[i] = 0; \
+ i++; \
continue; \
}