History

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.

Andreas Rheinhardt committed 7 years ago

Commit 5cf593a1 parent 324487b1 file · +1 −1Browse files

Unified · Split

libavcodec/jpeg2000dwt.c+1−1
@@ -255,7 +255,7 @@ static void dwt_encode97_int(DWTContext *s, int *t) · 254 unmodified lines
255 line += 5;255 line += 5;
256 256
257 for (i = 0; i < w * h; i++)257 for (i = 0; i < w * h; i++)
258 t[i] <<= I_PRESHIFT;258 t[i] *= 1 << I_PRESHIFT;
259 259
260 for (lev = s->ndeclevels-1; lev >= 0; lev--){260 for (lev = s->ndeclevels-1; lev >= 0; lev--){
261 int lh = s->linelen[lev][0],261 int lh = s->linelen[lev][0],

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t