Even Rouault
433d4d30f5
T1: (failed) optimization attempt to use signed magnitude representation ( #931 )
...
Instead of using two-complement integer representation of data samples during
code-block decoding, use a signed magnitude representation to avoid comparison
branches in passes.
However the (best) timings show that it is actually slightly slower, or at
least no better. 51649 ms with this attempt vs 51536 before on MAPA_005.jp2
reencoded with default options.
Two variants with sign in msb (the default) or in lsb lead to similar
performances
2017-05-22 15:10:42 +02:00
Even Rouault
563bd8499e
Reformat whole codebase with astyle.options ( #128 )
2017-05-09 20:46:20 +02:00
Matthieu Darbois
9a07ccb3d0
Add overflow checks for opj_aligned_malloc ( #841 )
...
See
https://pdfium.googlesource.com/pdfium/+/b20ab6c7acb3be1393461eb650ca8fa4660c937e/third_party/libopenjpeg20/0020-opj_aligned_malloc.patch
2016-09-15 01:57:53 +02:00
Matthieu Darbois
f88c9974e2
Flags in T1 shall be unsigned ( #840 )
...
This will remove some conversion warnings
2016-09-14 23:46:46 +02:00
Matthieu Darbois
0954bc11e3
Fix some warnings ( #838 )
...
Fix warnings introduced by uclouvain/openjpeg#786
2016-09-14 00:12:43 +02:00
Even Rouault
48c16b2c19
Merge branch 'master' of https://github.com/uclouvain/openjpeg into tier1_optimizations_multithreading_2
...
Conflicts:
src/lib/openjp2/t1.c
2016-09-08 10:30:09 +02:00
Matthieu Darbois
9f24b078c7
Change 'restrict' define to 'OPJ_RESTRICT' ( #816 )
...
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-09-06 00:49:53 +02:00
Even Rouault
7d3c7a345f
Be robust to failed allocations of job structures
2016-05-26 23:51:32 +02:00
Even Rouault
5fbb8b2645
Use thread-pool for T1 decoding
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
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
Julien Malik
e1e018a8dc
Fix UBSan gcc warning for first arg to memset non null
2016-05-02 12:13:24 +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
julienmalik
319fc971fe
cppcheck fix for openjp2 ( #740 )
2016-04-29 23:49:17 +02:00
mayeut
20789fed4e
Fix issue 135
...
dwt_interleave_h.gsr105.jp2 now has the same output as kakadu
issue399 is corrupted. Only the corrupted part changes.
Update known failures for x86 MD5
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-issue135.j2k-68-decode-md5
2016-04-27 23:15:47 +02:00
Matthieu Darbois
e6881e7527
Fix negative shift left reported by UBSan ( #758 )
...
Follow-up of #757
This shall have no performance impact on 2’s complement machine where
the compiler replaces the multiplication by power of two (constant) by
a left shift.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
2016-04-27 21:56:09 +02:00
Matthieu Darbois
6f2ac3ee36
Fix negative shift left reported by UBSan ( #757 )
...
This shall have no performance impact on 2’s complement machine where
the compiler replaces the multiplication by power of two (constant) by
a left shift.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
2016-04-26 22:06:06 +02:00
mayeut
ae4799ad07
Add some missing static
...
Still needs to check j2k.c & jp2.c
Update uclouvain/openjpeg#243
2015-07-18 02:39:32 +02:00
Aaron Boxer
c9e231508b
various small T1 optimizations
2015-07-03 15:23:15 +02:00
Matthieu Darbois
e966fef3eb
[trunk] fixed a possible overflow in opj_t1_encode_cblks call to opj_int_fix_mul (fixes issue 141)
2014-12-20 13:03:11 +00:00
Antonin Descampe
8d320bbdf8
[trunk] check number of components when getting mct norm (fixes issue 436)
2014-12-09 12:09:08 +00:00
Antonin Descampe
c3629e37a2
[trunk] significantly reduces memory for single tile RGB encoding (fixes
...
issue 375)
2014-11-03 14:51:41 +00:00
Antonin Descampe
6868ee373e
added memory allocation checks (fixes issue 355)
2014-09-19 10:26:35 +00:00
Antonin Descampe
50a205d20f
[trunk] improve memory management (fixes issue 359)
2014-09-16 15:48:04 +00:00
Antonin Descampe
d19a4ab676
[trunk] updated copyright and added copyright notice required by ISO, in each file; updated AUTHORS, NEWS
2014-04-03 15:30:57 +00:00
Mathieu Malaterre
73c9e85642
[trunk] Another round of fixes for sign conversion warnings.
...
Update issue 256
2014-03-10 16:17:01 +00:00
Mathieu Malaterre
ee3b02932a
[trunk] Another round of fixes for sign conversion warnings.
...
Update issue 256
2014-03-07 11:43:50 +00:00
Mathieu Malaterre
7afad19c77
[trunk] Remove a simple warning about int -> float conversion
2014-03-03 16:02:36 +00:00
Mathieu Malaterre
3c7a7a1675
[trunk] Remove deprecated functions.
...
Update issue 268
2014-03-03 08:30:36 +00:00
Mickael Savinaud
fcf9fa3651
[trunk] add opj_ prefix to some internal define and use the new opj type instead of int and float in some files
2012-11-16 08:29:43 +00:00
Mickael Savinaud
78a8d64a92
[trunk] use OPJ_INT32 instead of int in t2.c
2012-11-15 16:46:08 +00:00
Mickael Savinaud
ec0fe09138
[trunk] move opj_bool to OPJ_BOOL to follow the other type
2012-11-15 13:13:36 +00:00
Mickael Savinaud
7307bb6e9a
[trunk] remove warnings raised by flags -Wall -Wextra -pedantic and vs9 analyzer
2012-11-13 15:16:35 +00:00
Mickael Savinaud
cdea5c8eef
[trunk] remove some warnings from -Wall -Wextra -pedantic
2012-10-26 10:04:55 +00:00
Mickael Savinaud
bcc386e3bb
[trunk]remove some warnings raised by Wall
2012-10-26 09:39:52 +00:00
Mickael Savinaud
b63d618e48
[trunk] remove last warnings from t1
2012-10-25 17:31:18 +00:00
Mickael Savinaud
8864c2d59b
[trunk] rename t1_getwmsedec_v2 to opj_t1_getwmsedec and remove t1_getwmsedec
2012-10-25 17:27:22 +00:00
Mickael Savinaud
c75073fbf4
[trunk] cancel previous commit about use of t1_decode_cblks from v2. We should use t1_decode_cblks from 1.5 because it is faster (rev 557)
2012-10-25 17:23:54 +00:00
Mickael Savinaud
cf4529d058
[trunk] use the opj_ prefix for last t1 functions
2012-10-25 15:50:58 +00:00
Mickael Savinaud
9b6900b058
[trunk] [trunk] remove old opj_tcp and rename opj_tcp_v2 to opj_tcp
2012-10-25 15:15:02 +00:00
Mickael Savinaud
06615a556d
[trunk] rename opj_tcd_truct_v2 to opj_tcd_struct
2012-10-25 14:49:10 +00:00
Mickael Savinaud
db08494776
[trunk] rename flag_t to opj_flag_t
2012-10-24 14:06:10 +00:00