In image.c, changed the opj_image_create0() memory allocation from malloc() to calloc() in order to avoid segfaults when freeing the memory allocated for the coding of bad images. Thanks to Christopher Layne for this improvement.
First import of JAVAOpenJPEG, a Java wrapper of OpenJPEG, developed by Patrick Piscaglia of Telemis (www.telemis.com). Thank you Patrick for this new module !
Created the file index.c in the codec directory. This file handles the creation of index files, at encoding and decoding.
Fixed bugs during the creation of the index (PCRL progression order)
Patch by Callum Lerwick. The opj_tcd_cblk array is one of the largest allocations, because it contains a bunch of static buffers. This also makes it a major source of cache thrashing. This patch allocates the buffers from the heap, and dynamically sizes them in the decoder. I have not yet managed to dynamically size them in the encoder, getting the decoder to do it was tricky enough... I also split opj_tcd_cblk_t into separate encode and decode versions. A lot of fields were not used by both, so this cuts its size even further.
Patch by Callum Lerwick. This patch rearranges the largest memory allocations so they're allocated as late as possible, and freed as soon as possible. This cuts memory usage by about half on two large test images.
Patch by Dzonatas and Callum Lerwick. Fp/vectorization patch which basically converts most of the irreversible decode codepath to floating point, eliminating a few rounds of int/fp conversion, resulting in a vast performance improvement, and an increase in accuracy.
Fixed a bug which prevented JPWL from working on multi-tiled images; added some more fields in the interface info structures (keep a list of markers, save start packet number for each tile)
Changed the way the image structure is allocated when the decoding parameters include some resolutions to discard. This should have a significant impact for the decoding of huge images when some resolutions are discarder (-r parameter)
Warning: The output image size is now reduced when discarding resolutions !
BUG: Fix previous patch from Callum Lerwick. I have no clue what CMAKE_INSTALL_LIBDIR refers too. Bump up cmake 2.2 restriction to cmake 2.4 because of previous patch not backward compatible. Properly set the SOVERSION in a cross plateform way (yes WIN32 is a plateform)
Fixed issues with Reading and Writing TIF images in convert.c to avoid segmentation fault.
Fixed issues relating to using user specified rates for CINEMA option for multiple images.
OpenJPEG library interface modified to retain compatibility with version 1.2. Sorry if some of you already adapted their code to the previous interface, but we want to avoid a ABI break....
Patch from Callum Lerwick. Fixed the library linking so it links with the soversion properly set. Fixes up the install targets so that it interacts properly with RPM. Install target for MJ2. Sets some necessary and useful CFLAGS if gcc is in use.
Giuseppe Baruffa [Tue, 11 Sep 2007 15:21:12 +0000 (15:21 +0000)]
JPWL encoding is finalized correctly into the JP2 file format; added an additional structure in opj_codestream_info, to keep a record of the written markers
One more field in the codestream_info struct for recording the number of packets per tile part; JPWL now distributes the EPBs in all the tile part headers
ENH: add Java j2kviewer but do not compile it using cmake since cmake has too poor support for Java. Should create a custom command running ant instead.
ENH: add Java j2kviewer but do not compile it using cmake since cmake has too poor support for Java. Should create a custom command running ant instead.
Added some fields in the codestream_info structure: they are used to record the position of single tile parts. Changed also the write_index function in the codec, to reflect the presence of this new information.
Added the knowledge of JPSEC SEC and INSEC markers (you have to compile the JPWL project). Management of these markers is limited to skipping them without crashing: no real security function at this stage. Deprecated USE_JPSEC and USE_JPWL will be removed next
Giuseppe Baruffa [Thu, 12 Jul 2007 08:31:01 +0000 (08:31 +0000)]
Fixed a bug in JPWL module, which prevented to exploit the full error correction capability of RS codes (e.g. it gave up at 5 errors, even if 6 were correctable); defined a JPWL_MAXIMUM_EPB_ROOM for better customization of the maximum dimension of EPBs (the dimension is pre-calculated on an hypothesis, if it goes beyond 65535 there will be problems, thus we give a little less than the max, let's say 65450)