Commit Graph

1919 Commits

Author SHA1 Message Date
Mickael Savinaud f8fc214b11 [trunk] rename local functions in t2 with opj_ prefix 2012-09-27 09:14:58 +00:00
Mickael Savinaud 7861bfa45e rename from t2_skip_packet to opj_t2_skip_packet;
rename from t2_skip_packet_data to opj_t2_skip_packet_data;
2012-09-27 08:56:00 +00:00
Mathieu Malaterre 02734264a1 [trunk] Fix possible code execution vuln
Thanks to Huzaifa Sidhpurwala of Red Hat Security Response Team for patch + dataset to reproduce issue.
Technically kdu_expand works fine on the image...

Fixes issue 175
2012-09-12 17:11:17 +00:00
Mathieu Malaterre 4a845f3d04 [trunk] Fix one remaining issue with C90 compat 2012-09-10 12:46:42 +00:00
Mathieu Malaterre 0452ebdfcd [trunk] Use new gcc feature to actually hide exported symbols
Right now we are only using the Windows/POSIX compatibility layer. This means that we have only been marking explicitely which symbols to export.
What this also means is that for one to explicitely remove non-explicitely marked symbols, one has to set -fvisibility=hidden as CFLAGS
2012-09-10 12:38:22 +00:00
Mathieu Malaterre c8b8c4cf30 [trunk] no need to export MCT_ELEMENT_SIZE symbol 2012-09-10 12:34:46 +00:00
Mathieu Malaterre 1ff1401ff1 [trunk] Fix Heap-based buffer-overflow when decoding openjpeg image
Thanks to Huzaifa Sidhpurwala of Red Hat Security Response Team for report
This does not affect release 1.5.0 and/or 1.5 release branch.

Fixes issue 170
2012-09-10 11:05:15 +00:00
Mathieu Malaterre 3991bbe595 [trunk] Fix some C90 issues. 2012-09-10 09:42:29 +00:00
Mathieu Malaterre 20beb093a1 [trunk] Fix all C90 issues using gcc -pedantic -Wno-long-long to track them
As a side effect, fix all comment style to remove extra gcc output

Fixes issue 173
2012-09-10 09:04:47 +00:00
Mickael Savinaud 3135642ff5 [trunk] Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block.  This is no longer the preferred style.
Thanks to Hans Johnson
2012-08-30 17:20:03 +00:00
Mickael Savinaud d5bb3b0039 [trunk] Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command names became case-insensitive.  Now the preferred style is lower-case.
This also changes all the key words to lower case. The primary reason for changing key words is that all documentation for CMakeLists.txt now shows the key words as lower case. Even the printed “Mastering CMake v5” uses lower case.
Thanks to Hans Johnson
2012-08-30 17:14:39 +00:00
Mickael Savinaud f16216e270 [trunk] STYLE: Clean up documentation errors
Functions should only have formal documentation in one place, and preferably in the declaration (i.e. repeated documentaiton should not be at both the declaration and the definition, because it causes too much maintenance to keep them syncronized).  In cases where the definition is also the declaration (as is often the case for static functions in the .c files) the documentation was preserved at the first use of the function signature.
Functions that are formally documented should contain documentation for each function argument. 
The clang 3.1 compiler issues documentation warnings when the documentation block with @params preceeding a declaration does not match the argument list.  This patch set follows a convention used elsewere in openjpeg to add a placeholder FIXME DOC description where one was previously missing.
Thanks to Hans Johnson.
2012-08-30 16:56:31 +00:00
Mickael Savinaud de9e1a0693 [trunk] Remove all non-ascii characters (Several compilers and development tools are confused by non-ascii characters in source code. These have been removed) thanks to Hans Johnson 2012-08-30 16:51:30 +00:00
Mickael Savinaud 47b18d89f6 [trunk] COMP: Fix one warning identified by clang31 :
openjpeg/applications/codec/j2k_dump.c:362 col 29: warning: equality comparison
with extraneous parentheses
(thanks to Hans Johnson)
2012-08-30 16:34:17 +00:00
Mickael Savinaud 3f5b474b16 [trunk] COMP: Remove compiler warning (warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]) thnaks to Hans Johnson 2012-08-30 16:22:40 +00:00
Mickael Savinaud b103fec939 [trunk] COMP: _v2 code remove (thanks to Hans Johnson and Winfried) 2012-08-30 15:43:09 +00:00
Luc Hermitte 728be68bfe [trunk] memory leaks on ppm_data, found in tests NR-p1_05.j2k-dump, NR-p1_03.j2k-dump, ETS-C1P1-p1_03.j2k-decode, ETS-C0P1-p1_03.j2k-decode, ETS-C0P1-p1_05.j2k-decode 2012-08-23 19:37:31 +00:00
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
Luc Hermitte 7bfdb31c77 [trunk] j2k_to_image gives fff-topic error message for non-openable files (Issue#167) 2012-08-22 18:22:20 +00:00
Mickael Savinaud 44cec04294 fix a compilation error 2012-08-17 15:02:18 +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 859ce39666 rename local functions and struct with opj_ prefix 2012-08-17 13:47:45 +00:00
Mickael Savinaud 7c6ea4ed00 rename local dwt functions
remove deprecated v1 style function dwt_decode_tile; rename dwt_decode_tile_v2 to opj_dwt_decode_tile
2012-08-17 09:12:07 +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 062ed99894 rename local tcd functions with opj_ prefix 2012-08-16 16:44:09 +00:00
Mickael Savinaud d275fc90cf remove deprecated v1 style function tcd_decode_tile; rename tcd_decode_tile_v2 to opj_tcd_decode_tile
remove deprecated v1 style function tcd_free_decode
remove deprecated v1 style function tcd_free_decode_tile
2012-08-16 16:27:59 +00:00
Mickael Savinaud dbc4c47b15 remove deprecated v1 style function tcd_destroy; rename tcd_destroy_v2 to opj_tcd_destroy
rename tcd_init_v2 to opj_tcd_init 
remove deprecated v1 style function tcd_malloc_encode
remove deprecated v1 style function tcd_free_encode
remove deprecated v1 style function tcd_init_encode
remove deprecated v1 style function tcd_malloc_decode
remove deprecated v1 style function tcd_malloc_decode_tile
remove deprecated v1 style function tcd_makelayer_fixed; rename tcd_makelayer_fixed_v2 to opj_tcd_makelayer_fixed
remove deprecated v1 style function tcd_rateallocate_fixed; rename tcd_rateallocate_fixed_v2 to opj_tcd_rateallocate_fixed
remove deprecated v1 style function tcd_makelayer; rename tcd_makelayer_v2 to opj_tcd_makelayer
remove deprecated v1 style function tcd_rateallocate; rename tcd_rateallocate_v2 to opj_tcd_rateallocate
remove deprecated v1 style function tcd_encode_tile; rename tcd_encode_tile_v2 to opj_tcd_encode_tile
2012-08-16 16:23:07 +00:00
Mickael Savinaud e6d97ce928 remove deprecated v1 style function tcd_create; rename tcd_create_v2 to opj_tcd_create 2012-08-16 15:51:55 +00:00
Mickael Savinaud b7473285ec rename tcd functions with opj_ prefix 2012-08-16 15:48:20 +00:00
Mickael Savinaud 8b7107b81f optimization of dwt_deinterleave_h, dwt_deinterleave_v from v2 branch; update type with OPJ_type 2012-08-16 15:33:33 +00:00
Mickael Savinaud d1251b2850 correct warnings in j2k.c 2012-08-16 14:29:02 +00:00
Mickael Savinaud e972589554 remove deprecated v1 style function j2k_write_eoc; rename j2k_write_eoc_v2 to opj_j2k_write_eoc 2012-08-16 14:19:00 +00:00
Mickael Savinaud 0f19c958da remove deprecated v1 style function j2k_read_eoc; rename j2k_read_eoc_v2 to opj_j2k_read_eoc 2012-08-16 14:16:28 +00:00
Mickael Savinaud 2935fbc089 clean style and remove old v1 style structure in j2k.c 2012-08-16 14:08:58 +00:00
Mickael Savinaud f47fc4f111 remove deprecated v1 style function j2k_add_mhmarker; rename j2k_add_mhmarker_v2 to opj_j2k_add_mhmarker
remove deprecated v1 style function j2k_add_tlmarker; rename j2k_add_tlmarker_v2 to opj_j2k_add_tlmarker
2012-08-16 13:53:23 +00:00
Mickael Savinaud 01c95cb07e remove deprecated v1 style function j2k_create_compress; rename opj_j2k_create_compress_v2 to opj_j2k_create_compress 2012-08-16 13:46:43 +00:00
Mickael Savinaud 1f94541732 rename j2k functions with opj_ prefix 2012-08-16 13:44:02 +00:00
Mickael Savinaud ff43b4dca0 remove deprecated v1 style function j2k_setup_encoder; rename opj_j2k_setup_encoder_v2 to opj_j2k_setup_encoder 2012-08-16 13:37:34 +00:00
Mickael Savinaud 5d494e940f remove deprecated v1 style function j2k_get_num_tp; rename j2k_get_num_tp_v2 to opj_j2k_get_num_tp 2012-08-16 13:34:26 +00:00
Mickael Savinaud 30de580afe remove deprecated v1 style function j2k_calculate_tp; rename j2k_calculate_tp_v2 to opj_j2k_calculate_tp 2012-08-16 13:31:22 +00:00
Mickael Savinaud 0c13350ea4 rename local j2k function with opj_ prefix 2012-08-16 13:28:52 +00:00
Mickael Savinaud 83a661c360 remove deprecated v1 style function j2k_write_rgn; rename j2k_write_rgn_v2 to opj_j2k_write_rgn 2012-08-16 13:20:16 +00:00
Mickael Savinaud 38ec1325c4 remove deprecated v1 style function j2k_write_sod; rename j2k_write_sod_v2 to opj_j2k_write_sod 2012-08-16 13:16:38 +00:00
Mickael Savinaud 2ca2e83ce5 remove deprecated v1 style function j2k_write_sot; rename j2k_write_sot_v2 to opj_j2k_write_sot 2012-08-16 13:14:00 +00:00
Mickael Savinaud a9908ba7bd remove deprecated v1 style function j2k_write_tlm; rename j2k_write_tlm_v2 to opj_j2k_write_tlm 2012-08-16 13:11:26 +00:00
Mickael Savinaud 9f874c00aa rename local j2k function with opj_ prefix 2012-08-16 13:09:36 +00:00
Mickael Savinaud b52cdf6a95 rename local j2k function with opj_ prefix 2012-08-16 13:07:36 +00:00
Mickael Savinaud 40e637d9e1 remove deprecated v1 style function j2k_write_poc; rename j2k_write_poc_v2 to opj_j2k_write_poc
rename j2k_write_poc_in_memory to opj_j2k_write_poc_in_memory
rename j2k_get_max_poc_size to opj_j2k_get_max_poc_size
2012-08-16 13:03:20 +00:00