avcodec/jpeg2000dwt: Fix undefined shifts of negative numbers

Affected the vsynth*-jpeg2000 and the vsynth*-jpeg2000-97 FATE tests
(where * ranges over { 1, 2, 3, _lena }) as well as ticket #7983.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5cf593adcd)
This commit is contained in:
Andreas Rheinhardt 2019-09-28 04:26:10 +02:00
parent 5b26d86cde
commit 33093d3782
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ static void dwt_encode97_int(DWTContext *s, int *t)
line += 5; line += 5;
for (i = 0; i < w * h; i++) for (i = 0; i < w * h; i++)
t[i] <<= I_PRESHIFT; t[i] *= 1 << I_PRESHIFT;
for (lev = s->ndeclevels-1; lev >= 0; lev--){ for (lev = s->ndeclevels-1; lev >= 0; lev--){
int lh = s->linelen[lev][0], int lh = s->linelen[lev][0],