diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-20 19:24:09 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-05-20 20:31:28 +0200 |
| commit | adccbc8336ce5c46ca7de85ac364d9c992d337c7 (patch) | |
| tree | 3703001156ba3d43cb8e07bde7cfc2dbe01dac79 /src/lib/openjp2/tcd.c | |
| parent | 3cd1305596f191a01afdc11f9355f9c6590065dd (diff) | |
Irreversible decoding: partially revert previous commit, to fix failures in test suite
Diffstat (limited to 'src/lib/openjp2/tcd.c')
| -rw-r--r-- | src/lib/openjp2/tcd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index 02fb11db..810f83ec 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -1000,7 +1000,11 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, { /* Table E-1 - Sub-band gains */ - const OPJ_INT32 log2_gain = (l_band->bandno == 0) ? 0 : + /* BUG_WEIRD_TWO_INVK (look for this identifier in dwt.c): */ + /* the test (!isEncoder && l_tccp->qmfbid == 0) is strongly */ + /* linked to the use of two_invK instead of invK */ + const OPJ_INT32 log2_gain = (!isEncoder && + l_tccp->qmfbid == 0) ? 0 : (l_band->bandno == 0) ? 0 : (l_band->bandno == 3) ? 2 : 1; /* Nominal dynamic range. Equation E-4 */ |
