Sub-tile decoding: only allocate tile component buffer of the needed dimension
authorEven Rouault <even.rouault@spatialys.com>
Fri, 1 Sep 2017 14:30:29 +0000 (16:30 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Fri, 1 Sep 2017 14:30:29 +0000 (16:30 +0200)
commitf9e9942330f476b66ac4a35d0ae521200878f343
tree49cd4ab4a3d05d148a03052fdb856b2c58a88412
parentaa7198146b995fe2993ce24f5715057b7da0386d
Sub-tile decoding: only allocate tile component buffer of the needed dimension

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.
13 files changed:
CMakeLists.txt
src/lib/openjp2/CMakeLists.txt
src/lib/openjp2/bench_dwt.c
src/lib/openjp2/dwt.c
src/lib/openjp2/dwt.h
src/lib/openjp2/j2k.c
src/lib/openjp2/opj_includes.h
src/lib/openjp2/sparse_array.c [new file with mode: 0644]
src/lib/openjp2/sparse_array.h [new file with mode: 0644]
src/lib/openjp2/t1.c
src/lib/openjp2/tcd.c
src/lib/openjp2/tcd.h
src/lib/openjp2/test_sparse_array.c [new file with mode: 0644]