Skip to content

Commit 55513e8

Browse files
committed
Fix multiple unsequenced modifications
Could only happen on 32-bit fixed-point builds. The bug was introduced in 4ba06d9.
1 parent 4a344af commit 55513e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

celt/bands.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,15 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X,
264264
shift = -2;
265265
}
266266
do {
267-
*f++ = SHL32(MULT16_32_Q15(*x++, g), -shift);
267+
*f++ = SHL32(MULT16_32_Q15(*x, g), -shift);
268+
x++;
268269
} while (++j<band_end);
269270
} else
270271
#endif
271272
/* Be careful of the fixed-point "else" just above when changing this code */
272273
do {
273-
*f++ = SHR32(MULT16_32_Q15(*x++, g), shift);
274+
*f++ = SHR32(MULT16_32_Q15(*x, g), shift);
275+
x++;
274276
} while (++j<band_end);
275277
}
276278
celt_assert(start <= end);

0 commit comments

Comments
 (0)