Commit 5cf593ad authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 324487b5
......@@ -255,7 +255,7 @@ static void dwt_encode97_int(DWTContext *s, int *t)
line += 5;
for (i = 0; i < w * h; i++)
t[i] <<= I_PRESHIFT;
t[i] *= 1 << I_PRESHIFT;
for (lev = s->ndeclevels-1; lev >= 0; lev--){
int lh = s->linelen[lev][0],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment