fixed a bug in t1.c that prevented in some cases a true lossless compression (thanks to Don Mimlitch for reporting this bug)
This commit is contained in:
parent
f0721df1d9
commit
817681fb98
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
March 19, 2006
|
||||||
|
* [Antonin] fixed a bug in t1.c that prevented in some cases a true lossless compression (thanks to Don Mimlitch for reporting this bug)
|
||||||
|
|
||||||
February 12, 2006
|
February 12, 2006
|
||||||
- [Herve Drolon] removed unneeded working variables in opj_tcd_t
|
- [Herve Drolon] removed unneeded working variables in opj_tcd_t
|
||||||
|
|
||||||
|
|
|
@ -1066,11 +1066,7 @@ void t1_decode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp) {
|
||||||
for (j = 0; j < cblk->y1 - cblk->y0; j++) {
|
for (j = 0; j < cblk->y1 - cblk->y0; j++) {
|
||||||
for (i = 0; i < cblk->x1 - cblk->x0; i++) {
|
for (i = 0; i < cblk->x1 - cblk->x0; i++) {
|
||||||
int tmp = t1->data[j][i];
|
int tmp = t1->data[j][i];
|
||||||
if(tmp >> 1 == 0) {
|
tilec->data[x + i + (y + j) * (tilec->x1 - tilec->x0)] = tmp/2;
|
||||||
tilec->data[x + i + (y + j) * (tilec->x1 - tilec->x0)] = 0;
|
|
||||||
} else {
|
|
||||||
tilec->data[x + i + (y + j) * (tilec->x1 - tilec->x0)] = tmp<0?(tmp>>1)+1:(tmp>>1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { /* if (tcp->tccps[compno].qmfbid == 0) */
|
} else { /* if (tcp->tccps[compno].qmfbid == 0) */
|
||||||
|
|
Loading…
Reference in New Issue