summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/tcd.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-06-12 11:23:55 +0100
committerEven Rouault <even.rouault@spatialys.com>2017-06-12 18:37:50 +0200
commit73d1510d473b7dcfccfdee57e0e511e6791d5091 (patch)
tree668e073423435d7db608d6ff49875dd4b855cac0 /src/lib/openjp2/tcd.h
parent81c5311758a0ae1f1aea349a6ee0bca2a238fa79 (diff)
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.
Diffstat (limited to 'src/lib/openjp2/tcd.h')
-rw-r--r--src/lib/openjp2/tcd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/openjp2/tcd.h b/src/lib/openjp2/tcd.h
index 913979a8..4f842b41 100644
--- a/src/lib/openjp2/tcd.h
+++ b/src/lib/openjp2/tcd.h
@@ -375,6 +375,12 @@ OPJ_BOOL opj_tcd_copy_tile_data(opj_tcd_t *p_tcd,
*/
OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec);
+/** Returns whether a sub-band is empty (i.e. whether it has a null area)
+ * @param band Sub-band handle.
+ * @return OPJ_TRUE whether the sub-band is empty.
+ */
+OPJ_BOOL opj_tcd_is_band_empty(opj_tcd_band_t* band);
+
/* ----------------------------------------------------------------------- */
/*@}*/