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
This commit is contained in:
parent
287be4e683
commit
cc01949777
|
@ -1264,7 +1264,7 @@ void t1_decode_cblks(
|
||||||
for (j = 0; j < cblk_h; ++j) {
|
for (j = 0; j < cblk_h; ++j) {
|
||||||
for (i = 0; i < cblk_w; ++i) {
|
for (i = 0; i < cblk_w; ++i) {
|
||||||
OPJ_INT32 tmp = datap[(j * cblk_w) + i];
|
OPJ_INT32 tmp = datap[(j * cblk_w) + i];
|
||||||
((OPJ_INT32*)tiledp)[(j * tile_w) + i] = tmp >> 1;
|
((OPJ_INT32*)tiledp)[(j * tile_w) + i] = tmp / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { /* if (tccp->qmfbid == 0) */
|
} else { /* if (tccp->qmfbid == 0) */
|
||||||
|
|
Loading…
Reference in New Issue