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:
parent
768261e50d
commit
29c2fcb677
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user