Commit Graph

2391 Commits

Author SHA1 Message Date
Antonin Descampe 48744a1342 setup automatic upload of ABI reports 2016-06-21 16:19:06 +02:00
Even Rouault 7d3c7a345f Be robust to failed allocations of job structures 2016-05-26 23:51:32 +02:00
Even Rouault 69497d35c0 opj_decompress: use clock_gettime() instead of getrusage() so as to get the time spent, and not to the total CPU time 2016-05-25 21:59:43 +02:00
Even Rouault d67cd2220a opj_decompress: add a -threads <num_threads> option 2016-05-25 21:02:07 +02:00
Even Rouault e3eb0a206d .travis.yml: add a conf with OPJ_NUM_THREADS=2 2016-05-25 21:02:07 +02:00
Even Rouault 57b216bb58 Use thread pool for DWT decoding 2016-05-25 21:02:07 +02:00
Even Rouault 5fbb8b2645 Use thread-pool for T1 decoding 2016-05-25 21:02:07 +02:00
Even Rouault d4b7f03cfa Add opj_codec_set_threads() in public API and propagate resulting thread pool to tcd level
By default, only the main thread is used. If opj_codec_set_threads() is not used,
but the OPJ_NUM_THREADS environment variable is set, its value will be
used to initialize the number of threads. The value can be either an integer
number, or "ALL_CPUS". If OPJ_NUM_THREADS is set and this function is called,
this function will override the behaviour of the environment variable.
2016-05-25 21:02:07 +02:00
Even Rouault 54179fe1d5 Add threading and thread pool API 2016-05-25 21:02:07 +02:00
Even Rouault 7092f7ea11 Fix MSVC210 build issue (use of C99 declaration after statement) introduced in ba1edf6cd4 2016-05-23 16:00:28 +02:00
Even Rouault 107eb31531 Improve perf of opj_t1_dec_sigpass_mqc_vsc() and opj_t1_dec_refpass_mqc_vsc() with loop unrolling 2016-05-23 13:45:15 +02:00
Even Rouault 8371491a99 Better inlining of opj_t1_updateflagscolflags() w.r.t. flags_stride 2016-05-23 11:53:54 +02:00
Even Rouault 956c31d5a6 opj_t1_dec_clnpass(): remove useless test in the runlen decoding path (of the non VSC case) 2016-05-23 11:53:54 +02:00
Even Rouault 93f7f90711 opj_t1_decode_cblks(): tiny perf increase when loop unrolling 2016-05-23 11:53:53 +02:00
Even Rouault 1da397e94a Tier 1 decoding: add a colflags array
Addition flag array such that colflags[1+0] is for state of col=0,row=0..3,
colflags[1+1] for col=1, row=0..3, colflags[1+flags_stride] for col=0,row=4..7, ...
This array avoids too much cache trashing when processing by 4 vertical samples
as done in the various decoding steps.
2016-05-23 11:53:53 +02:00
Even Rouault 31882ad7f4 Const'ify lut arrays so they are in the read-only data section 2016-05-22 00:54:06 +02:00
Even Rouault ba1edf6cd4 Reduce number of occurrences of orient function argument
This is essentially used to shift inside the lut_ctxno_zc, which we
can precompute at the beginning of opj_t1_decode_cblk() /
opj_t1_encode_cblk()
2016-05-22 00:50:34 +02:00
Even Rouault 23a01dfdef Specialize decoding passes for 64x64 code blocks 2016-05-21 16:27:35 +02:00
Even Rouault d8fef96f23 Improve code generation in opj_t1_dec_clnpass()
Add a opj_t1_dec_clnpass_step_only_if_flag_not_sig_visit() method that
does the job of opj_t1_dec_clnpass_step_only() assuming the conditions
are met. And use it in opj_t1_dec_clnpass(). The compiler generates
more efficient code.
2016-05-21 15:52:02 +02:00
Even Rouault c539808d09 opj_t1_updateflags(): tiny optimization
We can avoid using a loop-up table with some shift arithmetics.
2016-05-21 15:46:56 +02:00
Kal Conley 426bf8d337 Move some MQC functions into a header for speed
Allow these hot functions to be inlined. This boosts decode performance by ~10%.
2016-05-21 15:18:07 +02:00
Antonin Descampe d0babeb6f6 WIP automatic release 2016-05-15 18:17:24 +02:00
Antonin Descampe d1ca2b4f29 WIP: debug travis run script 2016-05-15 00:53:24 +02:00
Antonin Descampe 8ba0de3e45 Update travis and appveyor to enable automatic releases on tag commit 2016-05-15 00:42:54 +02:00
Antonin Descampe 2e0779e250 Update version number in CMakeLists.txt 2016-05-13 12:31:56 +02:00
Antonin Descampe e55130d3c5 Update NEWS 2016-05-13 12:25:55 +02:00
Stefan Weil 4d2b6a671a Update implementation of opj_calloc (#705) 2016-05-10 22:08:49 +02:00
Stefan Weil aae066debc Add missing source for the JPIP library and executables (issue #658) (#659)
They all need opj_malloc and other functions from opc_malloc.c.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-05-10 22:02:49 +02:00
mayeut 6609719b40 Correct expected result for test of issue 495 2016-05-08 20:26:12 +02:00
mayeut 1a8318f6c2 Fix Out-of-Bounds Access in function opj_tgt_reset
Fix uclouvain/openjpeg#775
2016-05-08 20:10:13 +02:00
mayeut 162f6199c0 Fix Heap Buffer Overflow in function color_cmyk_to_rgb
Fix uclouvain/openjpeg#774
2016-05-08 19:18:05 +02:00
mayeut 8f9cc62b3f Fix division by zero
Fix uclouvain/openjpeg#733
2016-05-08 18:40:12 +02:00
Matthieu Darbois 44a499f2ac Update lcms2 (#773)
Update to mm2/Little-CMS@e342f44
2016-05-03 22:22:03 +02:00
julienmalik 94cfb1b008 Merge pull request #769 from julienmalik/cmake_lowercase
Use lowercase for cmake commands consistenly
2016-05-02 21:57:55 +02:00
Julien Malik 17a0a8a195 Use lowercase for cmake commands consistenly
Inspired from https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/Maintenance/HowToCreateTheCMakeCaseConversion.txt
This needs vim 7.3 and fails with vim 7.4

This also fixes a number of :
- missing empty line at end of files
- useless space at end of lines
2016-05-02 16:05:41 +02:00
julienmalik ba0cf122f6 Merge pull request #767 from julienmalik/fix_memset_null_pointer
Fix UBSan gcc warning for first arg to memset non null
2016-05-02 14:34:32 +02:00
julienmalik da56086e01 Merge pull request #768 from julienmalik/filter_clang_warnings
Ignore clang's summary warning
2016-05-02 14:32:08 +02:00
Julien Malik 04b8cbd27a Ignore clang's summary warning
This assumes prior text has matched some other warning expression.

This reduces the warnings reported for clang build on the dashboard,
which were caused only by the "XXX warnings generated." message.
For some reason they were not reported when not using ctest launchers.

This commit allows to confidently use ctest launchers to improve
dashboard reports.
2016-05-02 12:55:43 +02:00
Julien Malik e1e018a8dc Fix UBSan gcc warning for first arg to memset non null 2016-05-02 12:13:24 +02:00
Matthieu Darbois b51d088267 Update to libtiff-4.0.6 (#764) 2016-05-01 18:05:46 +02:00
mayeut 4f11e89c80 Add tests for recent issues
Update uclouvain/openjpeg#725
Update uclouvain/openjpeg#726
2016-04-30 18:51:36 +02:00
Matthieu Darbois 9a20f8e8d1 Update lcms (#544)
Update to mm2/Little-CMS@0e8234e090
2016-04-30 17:58:04 +02:00
Antonin Descampe 72deb588cb Merge pull request #706 from mayeut/issue135
Fix issue 135
The fix is legal regarding the standard but I did not manage to find out if it covers a bug in opj_t2_read_packet_data or if the file is corrupted
2016-04-30 13:51:01 +02:00
mayeut cd77b6003b Fix some coverity warnings 2016-04-30 12:15:22 +02:00
mayeut f40a2ff2ad Fix bad call to fclose with NULL pointer 2016-04-30 01:50:33 +02:00
Matthieu Darbois be42e72d22 Fix warnings (#763) 2016-04-30 01:12:16 +02:00
Matthieu Darbois 15f081c896 Fix Out-Of-Bounds Read in sycc42x_to_rgb function (#745)
42x Images with an odd x0/y0 lead to subsampled component starting at the
2nd column/line.
That is offset = comp->dx * comp->x0 - image->x0 = 1

Fix #726
2016-04-30 00:33:27 +02:00
Matthieu Darbois ad593c9e06 Fix heap-buffer-overflow in color_esycc_to_rgb (#748)
When all components do not have the same dx/dy, components buffer are
read beyond their end.
Do not convert in this case.

Update uclouvain/openjpeg#725
2016-04-29 23:51:14 +02:00
julienmalik 319fc971fe cppcheck fix for openjp2 (#740) 2016-04-29 23:49:17 +02:00
Matthieu Darbois e166e4a209 Check SSIZ is valid in opj_j2k_read_siz (#762) 2016-04-28 19:20:14 +02:00