summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-03-03PR #894 (without BOOK implementation)dev-restartAntonin Descampe
2016-09-26OPENJPEG_NAMESPACE is configurable by userMathieu Malaterre
2016-09-26Remove typos from comments and man pagesMathieu Malaterre
2016-09-22Fix PNM file reading (#847)Matthieu Darbois
Malformed PNM file could cause a crash in opj_compress. Checks were added to prevent this. Fixes #843 Updates #440
2016-09-21Fix some issues reported by Coverity Scan (#846)Stefan Weil
* test_tile_decoder: Fix potential buffer overflow (coverity) CID 1190155 (#1 of 1): Unbounded source buffer (STRING_SIZE) Using a pointer instead of buffer of fixed size avoids the limit for the length of the input file name. Signed-off-by: Stefan Weil <sw@weilnetz.de> * test_tile_encoder: Fix potential buffer overflow (coverity) CID 1190154 (#1 of 1): Unbounded source buffer (STRING_SIZE) Using a pointer instead of buffer of fixed size avoids the limit for the length of the output file name. This implies that the length can exceed 255, so the data type for variable len had to be fixed, too. Signed-off-by: Stefan Weil <sw@weilnetz.de> * openjpip: Initialize data before returning it This fixes an error reported by Coverity: CID 1190143 (#1 of 1): Uninitialized scalar variable (UNINIT) Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-21Fix potential out-of-bounds read (coverity) (#844)Stefan Weil
* query_parser: Fix potential out-of-bounds read (coverity) CID 1190207 (#1 of 1): Out-of-bounds read (OVERRUN) Variable i must be checked before testing query_param.box_type. Signed-off-by: Stefan Weil <sw@weilnetz.de> * jpip_parser: Fix potential out-of-bounds read (coverity) CID 1190206 (#1 of 1): Out-of-bounds read (OVERRUN) Variable i must be checked before testing query_param.box_type. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-20Merge pull request #834 from trylab/issue833Antonin Descampe
Fix issue 833.
2016-09-20Disable automatic compilation of t1_generate_lutsAntonin Descampe
Fix #831
2016-09-16renamed USE_THREAD to OPJ_USE_THREADAntonin Descampe
renaming to be consistent with previous OPJ CMake options
2016-09-15Remove TODO for overflow check (#842)Matthieu Darbois
The check was already done. It’s been simplified. Reformat to get consistent style throughout the functions.
2016-09-15Add overflow checks for opj_aligned_malloc (#841)Matthieu Darbois
See https://pdfium.googlesource.com/pdfium/+/b20ab6c7acb3be1393461eb650ca8fa4660c937e/third_party/libopenjpeg20/0020-opj_aligned_malloc.patch
2016-09-14Flags in T1 shall be unsigned (#840)Matthieu Darbois
This will remove some conversion warnings
2016-09-14Fix some warnings (#838)Matthieu Darbois
Fix warnings introduced by uclouvain/openjpeg#786
2016-09-13Merge branch 'bit-fields-type' of https://github.com/smuehlst/openjpeg into ↵Antonin Descampe
smuehlst-bit-fields-type
2016-09-13Merge pull request #786 from rouault/tier1_optimizations_multithreadingAntonin Descampe
T1 & DWT multithreading decoding optimizations
2016-09-13Fix issue 833.trylab
Add some overflow check operations.
2016-09-08Fix coverity 113065 (CWE-484) (#824)Matthieu Darbois
2016-09-08Merge branch 'master' of https://github.com/uclouvain/openjpeg into ↵Even Rouault
tier1_optimizations_multithreading_2 Conflicts: src/lib/openjp2/t1.c
2016-09-08opj_thread_pool: fix potential deadlock at thread pool destructionEven Rouault
2016-09-08Cast to size_t before multiplicationMatthieu Darbois
Need to cast to size_t before multiplication otherwise overflow check is useless.
2016-09-08Add sanity check for tile coordinates (#823)Matthieu Darbois
Coordinates are casted from OPJ_UINT32 to OPJ_INT32 Add sanity check for negative values and upper bound becoming lower than lower bound. See also https://pdfium.googlesource.com/pdfium/+/b6befb2ed2485a3805cddea86dc7574510178ea9
2016-09-07Moved type OPJ_BITFIELD from openjpeg.h to opj_includes.hStephan Mühlstrasser
OPJ_BITFIELD is used only in internal headers and must not appear in the public openjpeg.h header.
2016-09-07Merge branch 'master' into bit-fields-typeStephan Mühlstrasser
2016-09-06fix incrementing of "l_tcp->m_nb_mcc_records" in opj_j2k_read_mcc (#820)Matthieu Darbois
2016-09-06Fix an integer overflow issue (#809)trylab
Prevent an integer overflow issue in function opj_pi_create_decode of pi.c.
2016-09-06Add overflow check in opj_tcd_init_tile (#819)Matthieu Darbois
2016-09-06Fix leak & invalid behavior of opj_jp2_read_ihdr (#818)Matthieu Darbois
In case multiple ihdr box are present, only the first one shall be taken into account.
2016-09-06Add overflow check in opj_j2k_update_image_data (#817)Matthieu Darbois
2016-09-06Change 'restrict' define to 'OPJ_RESTRICT' (#816)Matthieu Darbois
Visual Studio 2015 does not pass regression tests with `__restrict` so kept disabled for MSVC. Need to check proper usage of OPJ_RESTRICT (if correct then there’s probably a bug in vc14) Closes #661
2016-08-11[Win32] Use _beginthreadex instead of CreateThread()Even Rouault
2016-07-27Unified bit-field declaration, removed tabs.Stephan Mühlstrasser
2016-07-25Create separate type for bit-fields.Stephan Mühlstrasser
The definition of bit-fields with type OPJ_UINT32 caused complilation errors on IBM iSeries, because OPJ_UINT32 is defined as uint32_t, and uint32_t is defined as unsigned long in <stdint.h>. The definition of bit-fields with an integer type of a specific size doesn't make sense anyway.
2016-07-14jpwl: Remove non-portable data type u_int16_t (fix issue #796) (#797)Stefan Weil
The type casts which used this data type can be removed by changing the signature of function swap16. As this function is called with unsigned variables, this change is reasonable. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-07-12Fix dependency for pkg-config (issue #594) (#795)Stefan Weil
openjpeg provides libopenjp2.pc, so the require statements must refer to libopenjp2 instead of openjp2. Fixes #594 Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-06-21Update tcd.c (#790)maddin200
cppcheck unitialized variable
2016-05-26Be robust to failed allocations of job structuresEven Rouault
2016-05-25opj_decompress: use clock_gettime() instead of getrusage() so as to get the ↵Even Rouault
time spent, and not to the total CPU time
2016-05-25opj_decompress: add a -threads <num_threads> optionEven Rouault
2016-05-25Use thread pool for DWT decodingEven Rouault
2016-05-25Use thread-pool for T1 decodingEven Rouault
2016-05-25Add opj_codec_set_threads() in public API and propagate resulting thread ↵Even Rouault
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-25Add threading and thread pool APIEven Rouault
2016-05-23Fix MSVC210 build issue (use of C99 declaration after statement) introduced ↵Even Rouault
in ba1edf6cd41415594729bc90ad3b0008af48251e
2016-05-23Improve perf of opj_t1_dec_sigpass_mqc_vsc() and ↵Even Rouault
opj_t1_dec_refpass_mqc_vsc() with loop unrolling
2016-05-23Better inlining of opj_t1_updateflagscolflags() w.r.t. flags_strideEven Rouault
2016-05-23opj_t1_dec_clnpass(): remove useless test in the runlen decoding path (of ↵Even Rouault
the non VSC case)
2016-05-23opj_t1_decode_cblks(): tiny perf increase when loop unrollingEven Rouault
2016-05-23Tier 1 decoding: add a colflags arrayEven Rouault
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-22Const'ify lut arrays so they are in the read-only data sectionEven Rouault
2016-05-22Reduce number of occurrences of orient function argumentEven Rouault
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()