summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/dwt.h
AgeCommit message (Collapse)Author
2020-05-20Irreversible compression/decompression DWT: use 1/K constant as per standardEven Rouault
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 !
2020-05-20Add multithreaded support in the DWT encoder.Even Rouault
Update the bench_dwt utility to have a -decode/-encode switch Measured performance gains for DWT encoder on a Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (4 cores, hyper threaded) Encoding time: $ ./bin/bench_dwt -encode -num_threads 1 time for dwt_encode: total = 8.348 s, wallclock = 8.352 s $ ./bin/bench_dwt -encode -num_threads 2 time for dwt_encode: total = 9.776 s, wallclock = 4.904 s $ ./bin/bench_dwt -encode -num_threads 4 time for dwt_encode: total = 13.188 s, wallclock = 3.310 s $ ./bin/bench_dwt -encode -num_threads 8 time for dwt_encode: total = 30.024 s, wallclock = 4.064 s Scaling is probably limited by memory access patterns causing memory access to be the bottleneck. The slightly worse results with threads==8 than with thread==4 is due to hyperthreading being not appropriate here.
2017-09-01Sub-tile decoding: only allocate tile component buffer of the needed dimensionEven Rouault
Instead of being the full tile size. * Use a sparse array mechanism to store code-blocks and intermediate stages of IDWT. * IDWT, DC level shift and MCT stages are done just on that smaller array. * Improve copy of tile component array to final image, by saving an intermediate buffer. * For full-tile decoding at reduced resolution, only allocate the tile buffer to the reduced size, instead of the full-resolution size.
2017-08-20Subtile decoding: only do 9x7 IDWT computations on relevant areas of ↵Even Rouault
tile-component buffer.
2017-08-18Subtile decoding: only do 5x3 IDWT computations on relevant areas of ↵Even Rouault
tile-component buffer. This lowers 'bin/opj_decompress -i ../MAPA.jp2 -o out.tif -d 0,0,256,256' down to 0.860s
2017-07-30src/lib/openjp2/*.h: use OPJ_ prefix for inclusion guards instead of ↵Even Rouault
reserved __ (#587)
2017-05-15Reformat: apply reformattin on .h files (#128)Even Rouault
2016-09-08Merge branch 'master' of https://github.com/uclouvain/openjpeg into ↵Even Rouault
tier1_optimizations_multithreading_2 Conflicts: src/lib/openjp2/t1.c
2016-09-06Change 'restrict' define to 'OPJ_RESTRICT' (#816)Matthieu Darbois
Visual Studio 2015 does not pass regression tests with `__restrict` so kept disabled for MSVC. Need to check proper usage of OPJ_RESTRICT (if correct then there’s probably a bug in vc14) Closes #661
2016-05-25Use thread pool for DWT decodingEven Rouault
2015-09-29Fix typos in comments and stringStefan Weil
Most typos were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-04-03[trunk] updated copyright and added copyright notice required by ISO, in ↵Antonin Descampe
each file; updated AUTHORS, NEWS
2012-11-15[trunk] move opj_bool to OPJ_BOOL to follow the other typeMickael Savinaud
2012-10-25[trunk] rename opj_tcd_truct_v2 to opj_tcd_structMickael Savinaud
2012-10-24[trunk] Finalize dwt.v/.h with the v2 style : remove last functions already ↵Mickael Savinaud
optimized, add opj_ prefix, use new name of the functions
2012-09-28[trunk] Start FolderReorgProposal taskMathieu Malaterre
Update issue 177