The original v1.3 branch had:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Thu, 7 Oct 2010 17:45:04 +0000 (17:45 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Thu, 7 Oct 2010 17:45:04 +0000 (17:45 +0000)
commitcc01949777e56db1cb1bb2fd3809e2963da6efa3
treeae35c816346b5bf858fb7017962ae22336ac6f8d
parent287be4e6832bca03d00e4e83bd6439129b54dff3
The original v1.3 branch had:
((int*)tiledp)[(j * tile_w) + i] = tmp / 2;
while v2 had:
((OPJ_INT32*)tiledp)[(j * tile_w) + i] = tmp >> 1;
Divide by two and a right shift operation are only equivalent when the data
is unsigned. In this case the data is signed, so the right shift operation
is incorrectly clearing the sign bit.
Patch from: Sheet Spotter
libopenjpeg/t1.c