diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-20 18:00:45 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-05-20 20:31:28 +0200 |
| commit | 3cd1305596f191a01afdc11f9355f9c6590065dd (patch) | |
| tree | 5aa7c46c81d6122f38100df2f590bc915b5275a9 /src/lib/openjp2/dwt.h | |
| parent | f38c069547f1c41dc94ec4a273efb07997685c21 (diff) | |
Irreversible compression/decompression DWT: use 1/K constant as per standard
The previous constant opj_c13318 was mysteriously equal to 2/K , and in
the DWT, we had to divide K and opj_c13318 by 2... The issue was that the
band->stepsize computation in tcd.c didn't take into account the log2gain of
the band.
The effect of this change is expected to be mostly equivalent to the previous
situation, except some difference in rounding. But it leads to a dramatic
reduction of the mean square error and peak error in the irreversible encoding
of issue141.tif !
Diffstat (limited to 'src/lib/openjp2/dwt.h')
| -rw-r--r-- | src/lib/openjp2/dwt.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/lib/openjp2/dwt.h b/src/lib/openjp2/dwt.h index 89c859cb..215061e6 100644 --- a/src/lib/openjp2/dwt.h +++ b/src/lib/openjp2/dwt.h @@ -74,12 +74,6 @@ OPJ_BOOL opj_dwt_decode(opj_tcd_t *p_tcd, OPJ_UINT32 numres); /** -Get the gain of a subband for the reversible 5-3 DWT. -@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) -@return Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise -*/ -OPJ_UINT32 opj_dwt_getgain(OPJ_UINT32 orient) ; -/** Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT. @param level Level of the wavelet function @param orient Band of the wavelet function @@ -106,12 +100,6 @@ OPJ_BOOL opj_dwt_decode_real(opj_tcd_t *p_tcd, OPJ_UINT32 numres); /** -Get the gain of a subband for the irreversible 9-7 DWT. -@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) -@return Returns the gain of the 9-7 wavelet transform -*/ -OPJ_UINT32 opj_dwt_getgain_real(OPJ_UINT32 orient); -/** Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT @param level Level of the wavelet function @param orient Band of the wavelet function |
