summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/pi.h
AgeCommit message (Collapse)Author
2020-12-02pi.c: avoid out of bounds access with POC (refs ↵Even Rouault
https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-737122836)
2020-04-21Add support for generation of PLT markers in encoderEven Rouault
* -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20160914T074612_N0204_R135_T36JTT_20160914T081456.SAFE Decompress it to TIFF: ``` opj_uncompress -i T36JTT_20160914T074612_B02.jp2 -o T36JTT_20160914T074612_B02.tif ``` Recompress it with similar parameters as original: ``` opj_compress -n 5 -c [256,256],[256,256],[256,256],[256,256],[256,256] -t 1024,1024 -PLT -i T36JTT_20160914T074612_B02.tif -o T36JTT_20160914T074612_B02_PLT.jp2 ``` Dump codestream detail with GDAL dump_jp2.py utility (https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/samples/dump_jp2.py) ``` python dump_jp2.py T36JTT_20160914T074612_B02.jp2 > /tmp/dump_sentinel2_ori.txt python dump_jp2.py T36JTT_20160914T074612_B02_PLT.jp2 > /tmp/dump_sentinel2_openjpeg_plt.txt ``` The diff between both show very similar structure, and identical number of packets in PLT markers Now testing with Kakadu (KDU803_Demo_Apps_for_Linux-x86-64_200210) Full file decompression: ``` kdu_expand -i T36JTT_20160914T074612_B02_PLT.jp2 -o tmp.tif Consumed 121 tile-part(s) from a total of 121 tile(s). Consumed 80,318,806 codestream bytes (excluding any file format) = 5.329697 bits/pel. Processed using the multi-threaded environment, with 8 parallel threads of execution ``` Partial decompresson (presumably using PLT markers): ``` kdu_expand -i T36JTT_20160914T074612_B02.jp2 -o tmp.pgm -region "{0.5,0.5},{0.01,0.01}" kdu_expand -i T36JTT_20160914T074612_B02_PLT.jp2 -o tmp2.pgm -region "{0.5,0.5},{0.01,0.01}" diff tmp.pgm tmp2.pgm && echo "same !" ``` ------- Funded by ESA for S2-MPC project
2019-11-17pi.c: avoid integer overflow, resulting in later invalid access to memory in ↵Even Rouault
opj_t2_decode_packets(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18979
2017-07-30src/lib/openjp2/*.h: use OPJ_ prefix for inclusion guards instead of ↵Even Rouault
reserved __ (#587)
2017-07-26Avoid index out of bounds access to pi->include[] (#938)Even Rouault
Fix id:000098,sig:11,src:005411,op:havoc,rep:2 test case
2017-05-15Reformat: apply reformattin on .h files (#128)Even Rouault
2015-09-29Fix typos in comments and stringStefan Weil
Most typos were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-04-03[trunk] updated copyright and added copyright notice required by ISO, in ↵Antonin Descampe
each file; updated AUTHORS, NEWS
2012-11-15[trunk] move opj_bool to OPJ_BOOL to follow the other typeMickael Savinaud
2012-10-29[trunk] Fix remainings issues with doxygen docMathieu Malaterre
Convert DOS files to UNIX eol
2012-10-25[trunk] [trunk] remove old opj_cp and rename opj_cp_v2 to opj_cpMickael Savinaud
2012-10-03[trunk]remove warnings in pi.c through the update of poc struct types with ↵Mickael Savinaud
new opj_types.
2012-10-03[trunk] remove old v1 functions and rename pi_initialise_encode_v2 to ↵Mickael Savinaud
opj_pi_initialise_encode; pi_create_encode_v2 to opj_pi_create_decode; pi_destroy_v2 to opj_pi_destroy; pi_create_decode_v2 to opj_pi_create_decode
2012-10-03[trunk]rename pi_update_encoding_parameters to opj_pi_update_encoding_parametersMickael Savinaud
2012-10-03[trunk] replace pi_next by opj_pi_nextMickael Savinaud
2012-10-03[trunk] update local function of pi.c with the opj_ prefix and the new opj typesMickael Savinaud
2012-09-28[trunk] Start FolderReorgProposal taskMathieu Malaterre
Update issue 177