T1: (failed) optimization attempt to use signed magnitude representation (#931) t1_dec_signed_magnitude_representation
authorEven Rouault <even.rouault@spatialys.com>
Mon, 22 May 2017 13:10:42 +0000 (15:10 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Mon, 22 May 2017 13:10:42 +0000 (15:10 +0200)
commit433d4d30f5582af650a3880e6071aed415af1bde
treea9fe5f1c98e9162465b78c18e0d38f9f93b312a6
parent83d7a6d4a44833e78321bfd367dc0f822a8d0945
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
src/lib/openjp2/t1.c
src/lib/openjp2/t1.h