1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

Use correct value for range

The current range value causes an underflow
when negated and pushes anything less than zero
to the minimum.
This commit is contained in:
Mashiat Sarker Shakkhar 2011-12-02 03:11:21 +06:00
parent 768261e50d
commit 29c2fcb677

View File

@ -895,7 +895,7 @@ static void lms_update(WmallDecodeCtx *s, int ich, int ilms, int16_t input, int1
{
int16_t icoef;
int recent = s->cdlms[ich][ilms].recent;
int16_t range = 1 << (s->bits_per_sample - 1);
int16_t range = (1 << s->bits_per_sample - 1) - 1;
int bps = s->bits_per_sample > 16 ? 4 : 2; // bytes per sample
if (input > pred) {