diff options
| author | Antonin Descampe <antonin@gmail.com> | 2006-03-19 18:51:32 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2006-03-19 18:51:32 +0000 |
| commit | 817681fb9865bea231293a7607521d6d7dacfb38 (patch) | |
| tree | 99b7760cac03806dfe8f6a67fa14d30d4a2e5e89 /libopenjpeg/t1.c | |
| parent | f0721df1d9ee78cd0aef66bca924072037ccc5ec (diff) | |
fixed a bug in t1.c that prevented in some cases a true lossless compression (thanks to Don Mimlitch for reporting this bug)
Diffstat (limited to 'libopenjpeg/t1.c')
| -rw-r--r-- | libopenjpeg/t1.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libopenjpeg/t1.c b/libopenjpeg/t1.c index 6b153502..210a6969 100644 --- a/libopenjpeg/t1.c +++ b/libopenjpeg/t1.c @@ -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 (i = 0; i < cblk->x1 - cblk->x0; i++) { int tmp = t1->data[j][i]; - if(tmp >> 1 == 0) { - 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); - } + tilec->data[x + i + (y + j) * (tilec->x1 - tilec->x0)] = tmp/2; } } } else { /* if (tcp->tccps[compno].qmfbid == 0) */ |
