summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/bench_dwt.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-09-01 16:30:29 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-09-01 16:30:29 +0200
commitf9e9942330f476b66ac4a35d0ae521200878f343 (patch)
tree49cd4ab4a3d05d148a03052fdb856b2c58a88412 /src/lib/openjp2/bench_dwt.c
parentaa7198146b995fe2993ce24f5715057b7da0386d (diff)
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.
Diffstat (limited to 'src/lib/openjp2/bench_dwt.c')
-rw-r--r--src/lib/openjp2/bench_dwt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/openjp2/bench_dwt.c b/src/lib/openjp2/bench_dwt.c
index 36f4c0c9..0dc278f3 100644
--- a/src/lib/openjp2/bench_dwt.c
+++ b/src/lib/openjp2/bench_dwt.c
@@ -198,10 +198,11 @@ int main(int argc, char** argv)
memset(&tcd, 0, sizeof(tcd));
tcd.thread_pool = tp;
- tcd.decoded_x0 = (OPJ_UINT32)tilec.x0;
- tcd.decoded_y0 = (OPJ_UINT32)tilec.y0;
- tcd.decoded_x1 = (OPJ_UINT32)tilec.x1;
- tcd.decoded_y1 = (OPJ_UINT32)tilec.y1;
+ tcd.whole_tile_decoding = OPJ_TRUE;
+ tcd.win_x0 = (OPJ_UINT32)tilec.x0;
+ tcd.win_y0 = (OPJ_UINT32)tilec.y0;
+ tcd.win_x1 = (OPJ_UINT32)tilec.x1;
+ tcd.win_y1 = (OPJ_UINT32)tilec.y1;
tcd.tcd_image = &tcd_image;
memset(&tcd_image, 0, sizeof(tcd_image));
tcd_image.tiles = &tcd_tile;