Ported from Carl Hetherington work (actually through Matthieu Darbois's port
on top of OpenJPEG 2.1.0)
Can reduce total encoding time by 10-15%
WARNING: VSC mode is not implemented, and so is a temporary regression
that must be fixed.
Use an internal version of astyle (astyle 3.0). Scripts taken from QGIS.
astyle.options from https://github.com/uclouvain/openjpeg/issues/128
scripts/prepare-commit.sh can be used locally to automatically reformat
edited files.
Travis-CI will run scripts/verify-indentation.sh to verify committed files.
Decoding some valid .jp2 files like Sentinel2 datasets leads to warnings like:
No incltree created.
tgt_create tree->numnodes == 0, no tree created.
No imsbtree created.
tgt_create tree->numnodes == 0, no tree created.
Besides that, the image is correctly decoded. So there is no reason to emit
those warnings.
* test_tile_decoder: Fix potential buffer overflow (coverity)
CID 1190155 (#1 of 1): Unbounded source buffer (STRING_SIZE)
Using a pointer instead of buffer of fixed size avoids the limit
for the length of the input file name.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* test_tile_encoder: Fix potential buffer overflow (coverity)
CID 1190154 (#1 of 1): Unbounded source buffer (STRING_SIZE)
Using a pointer instead of buffer of fixed size avoids the limit
for the length of the output file name. This implies that the length
can exceed 255, so the data type for variable len had to be fixed, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* openjpip: Initialize data before returning it
This fixes an error reported by Coverity:
CID 1190143 (#1 of 1): Uninitialized scalar variable (UNINIT)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* query_parser: Fix potential out-of-bounds read (coverity)
CID 1190207 (#1 of 1): Out-of-bounds read (OVERRUN)
Variable i must be checked before testing query_param.box_type.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* jpip_parser: Fix potential out-of-bounds read (coverity)
CID 1190206 (#1 of 1): Out-of-bounds read (OVERRUN)
Variable i must be checked before testing query_param.box_type.
Signed-off-by: Stefan Weil <sw@weilnetz.de>