Commit Graph

237 Commits

Author SHA1 Message Date
Antonin Descampe c49becae30 fixed version number of openjpeg 2.0.0 in openjpeg.h 2011-07-03 17:58:59 +00:00
Antonin Descampe 9e0e3611c5 [V2] fixed dllexport definition (credit to vincent torri) 2011-04-13 11:01:12 +00:00
Antonin Descampe fef7d00dc8 Fixed internal function names conflict with Jasper (http://code.google.com/p/openjpeg/issues/detail?id=30) 2011-04-12 17:24:30 +00:00
Antonin Descampe a916dcd052 Fix leak in jp2_read_header_procedure() (from even.rouault, see issue 29 on googlecode) 2010-11-25 12:15:07 +00:00
Mathieu Malaterre cc01949777 The original v1.3 branch had:
((int*)tiledp)[(j * tile_w) + i] = tmp / 2;
while v2 had:
((OPJ_INT32*)tiledp)[(j * tile_w) + i] = tmp >> 1;
Divide by two and a right shift operation are only equivalent when the data
is unsigned. In this case the data is signed, so the right shift operation
is incorrectly clearing the sign bit.
Patch from: Sheet Spotter
2010-10-07 17:45:04 +00:00
Antonin Descampe 287be4e683 minor bugs fixed (see issue 31 on googlecode - Thanks to winfried) 2010-10-05 20:58:04 +00:00
Antonin Descampe dea5c48227 fixed problems with partial decodes (non-zero value for cp_reduce) that can cause corrupted images and crashes (issue 41) - thanks to Sheet Spotter 2010-10-05 20:25:01 +00:00
Antonin Descampe 68e1771ae5 fixed minor problems that prevented the solution file from building in Windows (issue 40) - thanks to Sheet Spotter 2010-10-05 20:22:17 +00:00
Luis Ibanez 6ab100903e The lrintf function should use "long" instead of "int"
for the type of its internal variable.
2010-08-22 18:58:28 +00:00
Luis Ibanez 3e5715a994 BUG: The _asm directive is not available in Visual Studio 9, 64bits.
An alternative vainilla implementation has been added here, based
on code from VXL, vnl_math.h.
2010-08-22 00:30:23 +00:00
Luis Ibanez 9f446c88e8 Fix contributed by Bill Lorensen, to make it build in MinGW. 2010-08-22 00:29:14 +00:00
Luis Ibanez 2f9e80da9c BUG: Fixing case in which the pointer the data buffers doesn't
get positioned at the beginning of the buffer after a new
     buffer load. This case only happens when the pointer happens
     to be at the end of the buffer when the request for the new
     block arrives.  Fix contributed by Bill Hoffman.
2010-08-20 21:33:43 +00:00
Mathieu Malaterre cab60a170d Prevent segfault later down in the pipeline 2010-07-01 17:40:57 +00:00
Mathieu Malaterre 786dee8782 Import j2k_dump from trunk (much faster) 2010-06-22 18:26:15 +00:00
Mathieu Malaterre ecd70f033c Start using cmake API for easy packaging 2010-06-21 13:54:49 +00:00
Mathieu Malaterre 0c69d6e1a8 Fix installation 2010-06-21 13:41:12 +00:00
Francois-Olivier Devaux 8a634d0fe3 [v2.0] Fixed problem with Borland C++ Builder (Borland C do not have lrintf). Thanks Marek Mauder for this fix. 2010-04-08 20:20:34 +00:00
Francois-Olivier Devaux f9e6b81176 [v2.0] Fixed pi.c bug (issue 15 on google code). Thanks to Anton Lionel for catching this. 2010-04-08 18:43:29 +00:00
Francois-Olivier Devaux 73b4d32638 Code improvements using 'g++-4.4.0' to trace the code (v2.0). Thanks to Winfried for this patch. 2010-03-24 11:21:19 +00:00
Francois-Olivier Devaux dc9459029f [FOD] Created a new constant in openjpeg.h to differentiate the case when the colorspace is not supported by the library and when it is not specified in the codestream. Suggested by Matteo Italia. 2010-01-20 15:44:59 +00:00
Antonin Descampe ec400c4fa5 V2 branch :
- found a bug in tcd.c that was preventing to find the correct threshold in tcd_rateallocate.c for high-precision images. Applied a temporary patch but a better solution should be found.
- Modified the way raw images with more that 8bpp are read and written
2009-09-10 13:34:19 +00:00
Mathieu Malaterre c5ec4896fe ENH: remove INLINE from forward decl. Fix CMakeLists.txt for UNIX platforms 2008-08-02 16:40:10 +00:00
Antonin Descampe 46c3dc4bdf removed t1_generate_luts.c, useless in version 2 ; updated XCode project file for mac users. 2008-08-01 14:10:34 +00:00
Antonin Descampe 7caaea18b7 Deleting obsolete files and directories, adding v2-specific files and directories, updating existing files to v2. See README.v2 for more info 2008-07-31 18:47:41 +00:00
Parvatha Elangovan cebdbda260 Added the default lossless parameter to opj_set_default_encoder_parameters in openjpeg.c 2008-07-09 11:43:02 +00:00
Antonin Descampe 295ad6b112 fixed a bug in j2k.c (j2k_write_sod) that allowed to get negative rates, thanks zhong1985624 for pointing this. 2008-05-22 16:39:40 +00:00
Antonin Descampe f4d394d932 additional test to avoid crash due to invalid image size, patch by Christopher Layne 2008-05-22 12:34:29 +00:00
Antonin Descampe 65e5ff0fb4 memory leak fixed in openjpeg.c (opj_destroy_cstr_info()), patch by Carsten Juttner 2008-05-22 09:54:44 +00:00
Francois-Olivier Devaux 9652def4de Corrected the wrong syntax of calloc()... 2008-02-29 09:36:12 +00:00
Francois-Olivier Devaux 6d1f3ecc9f Fixed openjpeg.c for proper initialization of codec context structures (dinfo in opj_create_compress() and opj_create_decompress(). Bug fix suggested by Andrey V. Kiselev
Clean up of opj_aligned_malloc(), to just forgo the use of posix_memalign(), as apparently memalign() is what is working better for everyone. Patch by Callum.
2008-02-29 09:33:41 +00:00
Francois-Olivier Devaux 396cb1e102 Removed the J2KViewer module, which has been replaced by OPJViewer and fixed the error handling of j2k_decode in jp2.c, thanks to Robin Cornelius 2008-02-28 11:26:04 +00:00
Parvatha Elangovan 29ea3dde47 In convert.c, corrected imagetobmp() conversion for grayscale. In tcd.c, corrected Rate modification in tcd_init_encode(). 2008-02-05 15:15:38 +00:00
Francois-Olivier Devaux 04966097fc 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. 2008-01-22 10:35:26 +00:00
Antonin Descampe 13209d2565 fixed opj_malloc.h for macosx (bugfix provided by janpeder, thanks) 2008-01-16 19:01:13 +00:00
Parvatha Elangovan 4051e87d06 Patch by Callum Lerwick. Fixed error during encoding using tile option in tcd.c 2008-01-04 15:43:57 +00:00
Francois-Olivier Devaux 4619a94ebf VERSION 1.3.0 RELEASE 2007-12-21 10:39:41 +00:00
Francois-Olivier Devaux 287fb0b8fd Bug fixed by David Bruken. Fixed memory allocation issue in opj_malloc.h.
Possible errors in pi_create_encode handled
2007-12-21 10:19:01 +00:00
Antonin Descampe 847b082b64 changed variables names alpha, beta, gamma, delta in dwt.c to avoid re-declarations on Macosx 2007-12-19 14:45:35 +00:00
Francois-Olivier Devaux 5f995bcf4b Fixed allocation problem in pi.c 2007-12-19 13:57:57 +00:00
Parvatha Elangovan 64ed560f4f In pi.c, removed the Recursive function pi_check_next_level() and modified the code. 2007-12-19 12:28:40 +00:00
Francois-Olivier Devaux 1a33a09726 In mqc.h, changed MQC_NUMCTXS from 32 to 19 as JPEG 2000 only allows 19 possible contexts 2007-12-19 09:13:52 +00:00
Francois-Olivier Devaux 26606c71c8 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 ! 2007-12-10 13:16:01 +00:00
Francois-Olivier Devaux 9e5d165e79 Fixed the maximum number of resolutions a user can discard while decoding.
Added an error state in J2K_STATE (j2k.c)
2007-11-27 14:00:45 +00:00
Francois-Olivier Devaux c458af9cd6 Avoided ABI breakage 2007-11-14 11:34:48 +00:00
Francois-Olivier Devaux 010ae27471 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. 2007-11-14 10:52:02 +00:00
Francois-Olivier Devaux 24e189e4d8 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. 2007-11-14 08:45:00 +00:00
Francois-Olivier Devaux 61a15672bb Patch by Callum Lerwick. Instead of reinventing realloc, j2k_read_sod now just uses opj_realloc in j2k.c 2007-11-14 08:29:12 +00:00
Francois-Olivier Devaux dbeebe72b9 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. 2007-11-13 17:35:12 +00:00
Francois-Olivier Devaux 4bb067642f Patches from Callum Lewick: Fixed some spelling errors in dwt.c. 2007-11-08 14:29:39 +00:00
Francois-Olivier Devaux c38de0728d In t1.c, small change to avoid calling twice t1_getwmsedec()
Patch from Callum Lewick. Basic gcc optimization flags in cmake and makefile match.
2007-11-08 14:26:03 +00:00