Commit Graph

56 Commits

Author SHA1 Message Date
Luc Hermitte 5820e97abe [trunk] realloc is misused and may leak memory (Issue#168) (complements: compilation errors) 2012-08-23 19:34:41 +00:00
Luc Hermitte 4e81ea2a8a [trunk] realloc is misused and may leak memory (Issue#168) 2012-08-22 18:45:31 +00:00
Mickael Savinaud c60a84b6f5 rename t1_enc_sigpass_step and t1_enc_sigpass with opj_ prefix and update type 2012-08-17 14:56:42 +00:00
Mickael Savinaud 3b953cc763 remove deprecated v1 style function t1_destroy; rename t1_destroy_v2 to opj_t1_destroy
remove deprecated v1 style function t1_decode_cblks; rename t1_decode_cblks_v2 to opj_t1_decode_cblks
remove deprecated v1 style function t1_encode_cblks; rename t1_encode_cblks_v2 to opj_t1_encode_cblks
remove deprecated v1 style function t1_create; rename t1_create_v2 to opj_t1_create
2012-08-17 14:28:50 +00:00
Mickael Savinaud 3dab3be859 remove deprecated v1 style function dwt_encode; rename dwt_encode_v2 to opj_dwt_encode
remove deprecated v1 style function dwt_decode; rename dwt_decode_v2 to opj_dwt_decode
remove deprecated v1 style function dwt_getgain; rename dwt_getgain_v2 to opj_dwt_getgain
add opj_dwt_getnorm, opj_dwt_getnorm_real functions 
remove deprecated v1 style function dwt_encode_real; rename dwt_encode_real_v2 to opj_dwt_encode_real
remove deprecated v1 style function dwt_getgain_real; rename dwt_getgain_real_v2 to opj_dwt_getgain_real
rename dwt_calc_explicit_stepsizes to opj_dwt_calc_explicit_stepsizes
2012-08-17 08:27:57 +00:00
Mickael Savinaud 3a78e8010d [trunk] modify image_to_j2k and the lib to support functionalities given by the v2 alpha branch 2012-03-15 10:23:20 +00:00
Mathieu Malaterre b9e216ac6f [trunk] merge r1229 from branch 1.5 over to trunk 2012-03-02 15:24:12 +00:00
Mickael Savinaud b8efd02c7f [trunk] WIP: fix some warnings about a static function and j2k_read_unk_v2 2011-09-27 12:32:28 +00:00
Mickael Savinaud 6561d70664 WIP: update t1, t2, tcd to use same strut as in V2 2011-09-19 16:09:19 +00:00
Mickael Savinaud b551844cc2 Work In Progress: insert elements from V2 framework into the trunk 2011-09-19 13:04:04 +00:00
Mickael Savinaud 676f8f189f removed unused parameters warnings with the solution proposed by myself and Bob Friesenhahn 2011-08-10 08:12:10 +00:00
Antonin Descampe 6106e48397 improved encoding speed in t1_encode_cblks (credit to Giuseppe Baruffa) 2011-07-10 17:32:22 +00:00
Antonin Descampe 88f43b15fa defined new type "opj_bool", and new constants OPJ_FALSE and OPJ_TRUE, to avoid having to deal with "stdbool.h" (patch from Winfried) 2011-05-18 11:02:27 +00:00
Antonin Descampe 0dc7f6a2d3 Fixed doxygen data inside source code (from winfried) 2010-10-24 20:28:22 +00:00
Francois-Olivier Devaux 627f484bce Significant optimizations of MCT, DWT, MQ and T1 modules by Peter Wimmer (thanks Peter) 2010-04-08 17:22:58 +00:00
Antonin Descampe 9324bc4cd4 fixed MCT check bug in t1_getwmsedec. See http://groups.google.com/group/openjpeg/browse_thread/thread/d9d96dd4ec3e7443 for info 2009-11-06 12:52:54 +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 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 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
Francois-Olivier Devaux 9e114bcaa4 Patch from Callum Lewick. Memset patch. See ChangeLog for more details. Thanks Callum ! 2007-10-18 12:26:11 +00:00
Francois-Olivier Devaux 3816e0edf4 Indexes can now be generated when decoding J2K codestreams. 2007-09-07 15:01:55 +00:00
Francois-Olivier Devaux 1d02a8b595 Use <xmmintrin.h> for WIN32, else use <mm_malloc.h> 2007-08-21 12:57:39 +00:00
Francois-Olivier Devaux 07be749bf2 Moved the orient flipping into the ctxno_zc table.
Thanks to Callum Lerwick who provided all these great patches !
2007-08-21 12:51:57 +00:00
Francois-Olivier Devaux 2952874cb8 Replaced the large ctxno_mag lookup table with a small bit of inline-able branchless code 2007-08-21 12:42:55 +00:00
Francois-Olivier Devaux 1cfbdcc9ce Consolidated some calls to mqc_setcurctx. Cleaned up t1_generate_luts to output the proper types. 2007-08-21 12:36:05 +00:00
Francois-Olivier Devaux d4d23c7eb5 Reworks of t1_updateflags to get rid of the shift operation. mqc_setcurctx moved to the header to allow it to be inlined into the t1. 2007-08-21 12:30:08 +00:00
Francois-Olivier Devaux 3810e943b1 Aligned malloc using Intel's _mm_malloc(), cleanup on the t1 memory allocation, getting rid of some leftover debug code 2007-08-21 12:13:54 +00:00
Francois-Olivier Devaux ea9335ff48 Bugs corrected in decoding of command line (getopt.c), in the handling of 16 bit files (t1.c and tcd.c) and the calculation of elapsed time for multiple tiles parts (tcd.c and tdc.h). 2007-06-04 13:23:26 +00:00
Francois-Olivier Devaux 8be8111008 Patch suggested by Callum Lerwick <seg@haxxed.com>: "This makes the t1 data arrays dynamic, which greatly reduces cache thrashing. Also, some minor cleanup to prevent unnecessary casts" 2007-05-22 13:14:13 +00:00
Francois-Olivier Devaux 1bec8fe082 Patch suggested by Callum Lerwick <seg@haxxed.com>: "Some formatting cleanups, so that the long function definitions and calls fit on screen. Use of prefix increment which is theoretically faster, in
practice any sane compiler can optimize a postfix increment but its best not to count on such things. Consolidation of some redundant calculations in the inner loops, which becomes very useful in the future autovectorize patch."
2007-05-21 13:08:10 +00:00
Francois-Olivier Devaux 7d06d7fb5d Patch suggested by Callum Lerwick <seg@haxxed.com>: "This changes the flag code in t1 to use a flag_t type, which can then be changed to reduce RAM usage. It is now typedef to a short." 2007-05-21 12:50:03 +00:00
Francois-Olivier Devaux e0ee9becb4 Patch suggested by Callum Lerwick <seg@haxxed.com>: "This patch makes the t1 LUTs static. I actually intend this as a prelude to possibly eliminating some or all of the LUTs entirely." 2007-05-21 09:44:10 +00:00
Francois-Olivier Devaux 0930d9886b fix.h, dwt.c and t1.c optimized. Thanks a lot to Dzonatas <dzonatas at dzonux.net> and Callum Lerwick <seg at haxxed.com> for these great patches ! 2007-04-05 14:24:19 +00:00
Francois-Olivier Devaux 5a3c1ffe7d Fixed an historical bug in t1.c that leaded to the inclusion of useless 0xFF in the codestream. Thanks to Sylvain, Pascal and Parvatha ! 2007-03-28 08:44:21 +00:00
Parvatha Elangovan 6045158ce6 Fixed j2k_prog_order_list[]. Modifications in j2k.c.
Fixed t1_decode_cblks. Modifications in t1.c.
2007-03-21 13:01:15 +00:00
Francois-Olivier Devaux 7cb2194c8e Algorithmic optimizations in t1.c, thanks to Guido J. ! 2007-02-21 07:57:27 +00:00
Francois-Olivier Devaux ed3aec55fd Copyright update 2007-01-15 09:55:40 +00:00
Antonin Descampe 817681fb98 fixed a bug in t1.c that prevented in some cases a true lossless compression (thanks to Don Mimlitch for reporting this bug) 2006-03-19 18:51:32 +00:00
Antonin Descampe 72de930d08 fixed two initialization problems in t1.c and tcd.c 2006-01-27 16:29:41 +00:00
Antonin Descampe fe33ebe83c fixed a bug in t1_getwmsedec (stepsize was divided by 8192) 2005-12-08 11:01:59 +00:00
Antonin Descampe 95bc884365 OpenJPEG version 1.1 2005-12-08 09:38:47 +00:00
Antonin Descampe f61cda9b7d openjpeg version 1.0 (previous version still available with tag opj0-97) 2005-12-02 13:34:15 +00:00
Antonin Descampe 0ea26e7ba6 small change to avoid signed/unsigned warning during compilation 2005-11-04 11:10:38 +00:00
Antonin Descampe 8f3bd54c3d Changes proposed by Mathieu Malaterre from the GDCM project... Thanks a lot Mathieu
- '//' replaced by '/* */'
- inclusion of int.h in int.c
- inclusion of j2k.h in int.h in order to export symbols
- adding (void) var when a variable is declared but not used
- some explicit cast
- CLOCKS_PER_SEC is declared as float in bcc55, so there is a need to cast it to int for the modulo operation
- some variables changed from float -> double
2005-11-01 10:15:34 +00:00
Antonin Descampe 7ee36c3a4c 1) quantization stepsizes stored as float instead of shifted integers -> fixes a pb of precision when using very small stepsizes. 2) bug fixed when decoding until bitplane 0 -> r-value (1/2) added to the coefficient. 2005-10-27 07:49:29 +00:00
Francois-Olivier Devaux 32ba9920db At lines 577, 692 and 699, zeroing of effective region of code-block rather than the 1024*1024 allocated integers of code-block. This optimization has been proposed by Dmitry Kolyadin. Thanks for your help ! 2005-06-02 15:28:37 +00:00
Francois-Olivier Devaux f9eb8f93c2 Code optimization: t1_flags and t1_data set to zero with memset 2005-05-24 12:15:52 +00:00
Francois-Olivier Devaux 1bdb07cefe fprintf correctly redirected to stderr or stdout 2004-11-15 12:41:35 +00:00
Antonin Descampe 8d2121606d Minor changes for RESET mode 2004-07-16 09:08:27 +00:00