Encoder: fix packet writing of empty sub-bands (#891, #892)
authorEven Rouault <even.rouault@spatialys.com>
Mon, 12 Jun 2017 10:23:55 +0000 (11:23 +0100)
committerEven Rouault <even.rouault@spatialys.com>
Mon, 12 Jun 2017 16:37:50 +0000 (18:37 +0200)
commit73d1510d473b7dcfccfdee57e0e511e6791d5091
tree668e073423435d7db608d6ff49875dd4b855cac0
parent81c5311758a0ae1f1aea349a6ee0bca2a238fa79
Encoder: fix packet writing of empty sub-bands (#891, #892)

There are situations where, given a tile size, at a resolution level,
there are sub-bands with x0==x1 or y0==y1, that consequently don't have any
valid codeblocks, but the other sub-bands may be non-empty.
Given that we recycle the memory from one tile to another one, those
ghost codeblocks might be non-0 and thus candidate for packet inclusion.
src/lib/openjp2/t1.c
src/lib/openjp2/t2.c
src/lib/openjp2/tcd.c
src/lib/openjp2/tcd.h
tests/nonregression/test_suite.ctest.in